From 18fe0a96e78e28e4b147253fd7f327c4e02e0cbb Mon Sep 17 00:00:00 2001 From: Raissa North Date: Fri, 1 Dec 2017 16:34:10 +1300 Subject: [PATCH 1/3] FIX Add missing translation for GridFieldBlogPostState --- code/forms/gridfield/GridFieldBlogPostState.php | 2 +- lang/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/code/forms/gridfield/GridFieldBlogPostState.php b/code/forms/gridfield/GridFieldBlogPostState.php index 3d01ce4..b57662b 100644 --- a/code/forms/gridfield/GridFieldBlogPostState.php +++ b/code/forms/gridfield/GridFieldBlogPostState.php @@ -20,7 +20,7 @@ class GridFieldBlogPostState extends GridFieldSiteTreeState $modifiedLabel = ''; if ($record->isModifiedOnStage) { - $modifiedLabel = '' . _t('GridFieldBlogPostState.Modified') . ''; + $modifiedLabel = '' . _t('GridFieldBlogPostState.Modified', 'Modified') . ''; } if (!$record->isPublished()) { diff --git a/lang/en.yml b/lang/en.yml index 891b51a..e332072 100755 --- a/lang/en.yml +++ b/lang/en.yml @@ -121,6 +121,7 @@ en: PermissionFail: 'You don''t have permission to create a {class}.' GridFieldBlogPostState: Draft: ' Saved as Draft on {date}' + Modified: 'Modified' Published: ' Published on {date}' Timer: ' Publish at {date}' TagCloudWidget: From f948afe2710d90d0392b6647327010644f2de229 Mon Sep 17 00:00:00 2001 From: 3Dgoo Date: Tue, 20 Feb 2018 07:47:49 +1030 Subject: [PATCH 2/3] Fixing non int pagination variable server error If a user tries to paginate the blog using a value that is not an integer SilverStripe will throw a server error. Example. Visiting `blog/?start=10.1` will cause the following server error: ```You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10.1' at line 8``` This change casts the pagination variable to an int before using it. --- code/model/Blog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/Blog.php b/code/model/Blog.php index daf70af..a05477e 100644 --- a/code/model/Blog.php +++ b/code/model/Blog.php @@ -1044,7 +1044,7 @@ class Blog_Controller extends Page_Controller $posts->setPageLength($pageSize); // Set current page - $start = $this->request->getVar($posts->getPaginationGetVar()); + $start = (int)$this->request->getVar($posts->getPaginationGetVar()); $posts->setPageStart($start); return $posts; From 767250435e28933f0a9f7046093833693601af6d Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 20 Feb 2018 11:01:09 +1300 Subject: [PATCH 3/3] Remove PHP 5.3 from Travis builds --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a10d844..58d05be 100755 --- a/.travis.yml +++ b/.travis.yml @@ -36,7 +36,7 @@ matrix: env: DB=PGSQL CORE_RELEASE=3.5 - php: 5.4 env: DB=SQLITE - - php: 5.3 + - php: 5.4 env: DB=MYSQL - php: 7.1 env: DB=MYSQL CORE_RELEASE=3.6