From f964c030725ee5ea516a68a941aafc9d556cbd2b Mon Sep 17 00:00:00 2001 From: Nikolay Gorylenko Date: Mon, 3 Aug 2015 11:32:30 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=E2=89=88do=20not=20evaluate=20LOGGING=5FMO?= =?UTF-8?q?DE=20and=20APP=5FLOCALE=20during=20build=20phase;=20fix=20path?= =?UTF-8?q?=20for=20contab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- docker/.env.docker | 2 -- docker/entrypoint.sh | 6 ------ 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index eea72d88..eac17878 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.co EXPOSE 8000 -COPY crontab /etc/cron.d/artisan-schedule +COPY docker/crontab /etc/cron.d/artisan-schedule RUN chmod 0644 /etc/cron.d/artisan-schedule RUN touch /var/log/cron.log diff --git a/docker/.env.docker b/docker/.env.docker index b28f9a0f..fed757fa 100644 --- a/docker/.env.docker +++ b/docker/.env.docker @@ -25,5 +25,3 @@ REDIS_HOST={{REDIS_HOST}} REDIS_DATABASE={{REDIS_DATABASE}} REDIS_PORT={{REDIS_PORT}} -LOGGING_MODE={{LOGGING_MODE}} -APP_LOCALE={{APP_LOCALE}} diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 5f0de106..0a73b813 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -28,9 +28,6 @@ REDIS_HOST=${REDIS_HOST:-null} REDIS_DATABASE=${REDIS_DATABASE:-null} REDIS_PORT=${REDIS_PORT:-null} -LOGGING_MODE=${LOGGING_MODE:-daily} -APP_LOCALE=${APP_LOCALE:-en} - # configure env file sed 's,{{APP_ENV}},'"${APP_ENV}"',g' -i /var/www/html/.env @@ -60,9 +57,6 @@ sed 's,{{REDIS_HOST}},'"${REDIS_HOST}"',g' -i /var/www/html/.env sed 's,{{REDIS_DATABASE}},'"${REDIS_DATABASE}"',g' -i /var/www/html/.env sed 's,{{REDIS_PORT}},'"${REDIS_PORT}"',g' -i /var/www/html/.env -sed 's,{{LOGGING_MODE}},'"${LOGGING_MODE}"',g' -i /var/www/html/.env -sed 's,{{APP_LOCALE}},'"${APP_LOCALE}"',g' -i /var/www/html/.env - #Clear cache /usr/bin/php composer.phar install --no-dev -o From 167b90265fcbc08244a51e5ed6e0e2b73dd5d028 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 3 Aug 2015 08:53:50 +0100 Subject: [PATCH 2/4] Remove deleted_at as a date field --- app/Models/Subscriber.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Subscriber.php b/app/Models/Subscriber.php index 91472f66..9891a717 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -42,7 +42,7 @@ class Subscriber extends Model implements HasPresenter * * @var array */ - protected $dates = ['deleted_at', 'verified_at']; + protected $dates = ['verified_at']; /** * Overrides the models boot method. From c7b55401d411dc954ebcc4d155c1d37a478aafd9 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 3 Aug 2015 08:54:40 +0100 Subject: [PATCH 3/4] Casts the subscriber --- app/Models/Subscriber.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Models/Subscriber.php b/app/Models/Subscriber.php index 9891a717..21bd8d14 100644 --- a/app/Models/Subscriber.php +++ b/app/Models/Subscriber.php @@ -44,6 +44,16 @@ class Subscriber extends Model implements HasPresenter */ protected $dates = ['verified_at']; + /** + * The attributes that should be casted to native types. + * + * @var string[] + */ + protected $casts = [ + 'email' => 'string', + 'verify_code' => 'string', + ]; + /** * Overrides the models boot method. */ From 22b0e105ee5ab1397cf08ab6e72c8d08d18a1238 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Mon, 3 Aug 2015 08:58:07 +0100 Subject: [PATCH 4/4] Fix showing of verified subscribers when they're not. Fixes #855 --- resources/views/dashboard/subscribers/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/dashboard/subscribers/index.blade.php b/resources/views/dashboard/subscribers/index.blade.php index 81050f88..94c2a488 100644 --- a/resources/views/dashboard/subscribers/index.blade.php +++ b/resources/views/dashboard/subscribers/index.blade.php @@ -30,7 +30,7 @@

{{ $subscriber->created_at }}

- @if(is_null($subscriber->verified_at)) + @if(is_null($subscriber->getOriginal('verified_at'))) {{ trans('dashboard.subscribers.not_verified') }} @else {{ trans('dashboard.subscribers.verified') }}