From 1a9cdee0f2ffe024d936a73ebd779bc94b35ff60 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Nov 2017 14:31:23 +1300 Subject: [PATCH 1/6] Remove obsolete branch alias --- composer.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/composer.json b/composer.json index dd97754..8073483 100755 --- a/composer.json +++ b/composer.json @@ -15,11 +15,7 @@ "require-dev": { "phpunit/PHPUnit": "~3.7@stable" }, - "extra": { - "branch-alias": { - "2.x-dev": "2.5.x-dev" - } - }, + "extra": [], "license": "BSD-2-Clause", "authors": [ { From 0efaef958a0e5c9a1b15a291a713b3107f27e49f Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Mon, 20 Nov 2017 14:31:48 +1300 Subject: [PATCH 2/6] Update branch alias for 2.6.x-dev --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dd97754..566e67c 100755 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "extra": { "branch-alias": { - "2.x-dev": "2.5.x-dev" + "2.x-dev": "2.6.x-dev" } }, "license": "BSD-2-Clause", From 18fe0a96e78e28e4b147253fd7f327c4e02e0cbb Mon Sep 17 00:00:00 2001 From: Raissa North Date: Fri, 1 Dec 2017 16:34:10 +1300 Subject: [PATCH 3/6] 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 483a384fb1456e24f5f2871bb314965458db110c Mon Sep 17 00:00:00 2001 From: 3Dgoo Date: Tue, 20 Feb 2018 07:47:49 +1030 Subject: [PATCH 4/6] 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 238ddcd..3475e39 100644 --- a/code/model/Blog.php +++ b/code/model/Blog.php @@ -1043,7 +1043,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 f948afe2710d90d0392b6647327010644f2de229 Mon Sep 17 00:00:00 2001 From: 3Dgoo Date: Tue, 20 Feb 2018 07:47:49 +1030 Subject: [PATCH 5/6] 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 6/6] 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