From dd98ee92a57def37f662dcb57ba7d3795e77f0a1 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 17 Nov 2016 10:15:57 +1300 Subject: [PATCH 1/6] Remove obsolete branch-alias --- composer.json | 54 +++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/composer.json b/composer.json index 46ea759..02dafb7 100644 --- a/composer.json +++ b/composer.json @@ -1,31 +1,31 @@ { - "name": "silverstripe/contentreview", - "type": "silverstripe-module", - "description": "Flags pages for periodical author review (incl. reporting)", - "homepage": "http://silverstripe.org", - "license": "BSD-3-Clause", - "keywords": ["silverstripe", "cms", "workflow"], - "authors": [ - { - "name": "SilverStripe", - "homepage": "http://silverstripe.com" - }, - { - "name": "The SilverStripe Community", - "homepage": "http://silverstripe.org" - } - ], - "require": { - "composer/installers": "*", - "silverstripe/framework": "~3.1", - "silverstripe/cms": "~3.1" - }, + "name": "silverstripe/contentreview", + "type": "silverstripe-module", + "description": "Flags pages for periodical author review (incl. reporting)", + "homepage": "http://silverstripe.org", + "license": "BSD-3-Clause", + "keywords": [ + "silverstripe", + "cms", + "workflow" + ], + "authors": [ + { + "name": "SilverStripe", + "homepage": "http://silverstripe.com" + }, + { + "name": "The SilverStripe Community", + "homepage": "http://silverstripe.org" + } + ], + "require": { + "composer/installers": "*", + "silverstripe/framework": "~3.1", + "silverstripe/cms": "~3.1" + }, "suggests": { "silverstripe/queuedjobs": "Automatically schedules content review emails to be sent, only requiring one crontask to be created" }, - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - } -} + "extra": [] +} \ No newline at end of file From 272afd4670db3f9f588b8ced9a89370328a60ef0 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 17 Nov 2016 11:02:06 +1300 Subject: [PATCH 2/6] Remove broken string --- lang/en.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/lang/en.yml b/lang/en.yml index c45cc11..b157a98 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -26,7 +26,6 @@ en: REVIEWFREQUENCYDESCRIPTION: 'The review date will be set to this far in the future whenever the page is published' REVIEWHEADER: 'Content review' REVIEWNOTES: 'Review notes' - 'REVIEWNOTESDESCRIPTION ': 'Add comments for the content of this page.' REVIEWSUCCESSFUL: 'Content reviewed successfully' SAVE: Save SETTINGSFROM: 'Options are' From 40a1ce4ee800b2e3b655f6bbba1c37efe5e937d8 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 17 Nov 2016 11:07:37 +1300 Subject: [PATCH 3/6] Fix invalid composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 02dafb7..701b53a 100644 --- a/composer.json +++ b/composer.json @@ -24,8 +24,8 @@ "silverstripe/framework": "~3.1", "silverstripe/cms": "~3.1" }, - "suggests": { + "suggest": { "silverstripe/queuedjobs": "Automatically schedules content review emails to be sent, only requiring one crontask to be created" }, "extra": [] -} \ No newline at end of file +} From ea4b6f5357d42b1427c27b81d7580cea6d406a46 Mon Sep 17 00:00:00 2001 From: NightJar Date: Fri, 24 Mar 2017 11:52:35 +1300 Subject: [PATCH 4/6] Avoid fatal errors when trying to edit in the CMS If a page has it's `ContentReviewType` `Disabled` (either directly or on a parent via a `Inherit`) **AND ** has a `NextReviewDate` in the past, the page will cause a fatal error when attempting to load it for editing in the CMS. We can avoid this by checking if a pages Options are a boolean value (false for disabled) before trying to call methods on it. Addresses issue #55 --- code/extensions/SiteTreeContentReview.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/extensions/SiteTreeContentReview.php b/code/extensions/SiteTreeContentReview.php index 381c369..6b0654d 100644 --- a/code/extensions/SiteTreeContentReview.php +++ b/code/extensions/SiteTreeContentReview.php @@ -454,6 +454,10 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider $options = $this->getOptions(); + if (!$options || !$options->hasExtension($this->class)) { + return false; + } + if ($options->OwnerGroups()->count() == 0 && $options->OwnerUsers()->count() == 0) { return false; } From 7bae7e2c34bb7b159372ee7b1813b26b7d7bb7f0 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 15 Jun 2017 10:14:41 +1200 Subject: [PATCH 5/6] Add PHP7 + SS3.6 build to Travis configuration --- .travis.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c91e69..034de2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details +# See https://github.com/silverstripe/silverstripe-travis-support for setup details sudo: false @@ -8,11 +8,9 @@ php: - 5.3 - 5.4 - 5.5 - - 5.6 - - 7.0 env: - - DB=MYSQL CORE_RELEASE=3.2 + - DB=MYSQL CORE_RELEASE=3.5 matrix: include: @@ -22,12 +20,12 @@ matrix: env: DB=MYSQL CORE_RELEASE=3.1 - php: 5.6 env: DB=PGSQL CORE_RELEASE=3.2 - allow_failures: - - php: 7.0 + - php: 7.1 + env: DB=MYSQL CORE_RELEASE=3.6 before_script: - composer self-update || true - - git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support + - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss - cd ~/builds/ss - composer install From 12198e21e675ab8e17eddd074a980bda9f341dd1 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 15 Jun 2017 14:21:41 +1200 Subject: [PATCH 6/6] FIX Remove specific page edit URL from tests to ensure multi SS version compatibility --- tests/ContentReviewCMSPageEditControllerTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ContentReviewCMSPageEditControllerTest.php b/tests/ContentReviewCMSPageEditControllerTest.php index 32cd4ba..f7c3d1c 100644 --- a/tests/ContentReviewCMSPageEditControllerTest.php +++ b/tests/ContentReviewCMSPageEditControllerTest.php @@ -67,7 +67,7 @@ class ContentReviewCMSPageEditControllerTest extends ContentReviewBaseTest ); $this->get('admin/pages/edit/show/' . $page->ID); - $response = $this->post("admin/pages/edit/EditForm", $data); + $response = $this->post(singleton('CMSPageEditController')->getEditForm($page->ID)->FormAction(), $data); $this->assertEquals("OK", $response->getStatusDescription()); $this->assertEquals(200, $response->getStatusCode()); @@ -90,8 +90,8 @@ class ContentReviewCMSPageEditControllerTest extends ContentReviewBaseTest ); $this->get('admin/pages/edit/show/' . $page->ID); - $response = $this->post("admin/pages/edit/EditForm", $data); - + $response = $this->post(singleton('CMSPageEditController')->getEditForm($page->ID)->FormAction(), $data); + $this->assertEquals("OK", $response->getStatusDescription()); $this->assertEquals(200, $response->getStatusCode()); $this->assertEquals(1, $page->ReviewLogs()->count());