Merge pull request #2046 from dhensby/pulls/3/php7.2

Add PHP7.2 support
This commit is contained in:
Damian Mooyman 2018-02-02 09:25:46 +13:00 committed by GitHub
commit a3edbd6d34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 8 deletions

View File

@ -14,7 +14,7 @@ addons:
env: env:
global: global:
- CORE_RELEASE=3.5 - CORE_RELEASE=3
matrix: matrix:
include: include:

View File

@ -422,7 +422,7 @@ JS
$actions = new FieldList( $actions = new FieldList(
FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Apply Filter')) FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Apply Filter'))
->addExtraClass('ss-ui-action-constructive'), ->addExtraClass('ss-ui-action-constructive'),
Object::create('ResetFormAction', 'clear', _t('CMSMain_left_ss.RESET', 'Reset')) SS_Object::create('ResetFormAction', 'clear', _t('CMSMain_left_ss.RESET', 'Reset'))
); );
$form = new Form($this, 'filter', $fields, $actions); $form = new Form($this, 'filter', $fields, $actions);

View File

@ -368,7 +368,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
$actions = new FieldList( $actions = new FieldList(
FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Search')) FormAction::create('doSearch', _t('CMSMain_left_ss.APPLY_FILTER', 'Search'))
->addExtraClass('ss-ui-action-constructive'), ->addExtraClass('ss-ui-action-constructive'),
Object::create('ResetFormAction', 'clear', _t('CMSMain_left_ss.CLEAR_FILTER', 'Clear')) SS_Object::create('ResetFormAction', 'clear', _t('CMSMain_left_ss.CLEAR_FILTER', 'Clear'))
); );
// Use <button> to allow full jQuery UI styling on the all of the Actions // Use <button> to allow full jQuery UI styling on the all of the Actions

View File

@ -13,7 +13,7 @@
* @package cms * @package cms
* @subpackage content * @subpackage content
*/ */
abstract class CMSSiteTreeFilter extends Object implements LeftAndMain_SearchFilter { abstract class CMSSiteTreeFilter extends SS_Object implements LeftAndMain_SearchFilter {
/** /**
* @var Array Search parameters, mostly properties on {@link SiteTree}. * @var Array Search parameters, mostly properties on {@link SiteTree}.

View File

@ -196,7 +196,7 @@ class SilverStripeNavigatorItem extends ViewableData {
* @return boolean * @return boolean
*/ */
public function isArchived() { public function isArchived() {
if(!Object::has_extension($this->record->ClassName, 'Versioned')) return false; if(!SS_Object::has_extension($this->record->ClassName, 'Versioned')) return false;
if(!isset($this->record->_cached_isArchived)) { if(!isset($this->record->_cached_isArchived)) {
$baseTable = ClassInfo::baseDataClass($this->record->class); $baseTable = ClassInfo::baseDataClass($this->record->class);
@ -294,7 +294,7 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
public function canView($member = null) { public function canView($member = null) {
return ( return (
Object::has_extension($this->record->ClassName, 'Versioned') SS_Object::has_extension($this->record->ClassName, 'Versioned')
&& $this->getDraftPage() && $this->getDraftPage()
// Don't follow redirects in preview, they break the CMS editing form // Don't follow redirects in preview, they break the CMS editing form
&& !($this->record instanceof RedirectorPage) && !($this->record instanceof RedirectorPage)
@ -351,7 +351,7 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
public function canView($member = null) { public function canView($member = null) {
return ( return (
Object::has_extension($this->record->ClassName, 'Versioned') SS_Object::has_extension($this->record->ClassName, 'Versioned')
&& $this->getLivePage() && $this->getLivePage()
// Don't follow redirects in preview, they break the CMS editing form // Don't follow redirects in preview, they break the CMS editing form
&& !($this->record instanceof RedirectorPage) && !($this->record instanceof RedirectorPage)
@ -418,7 +418,7 @@ class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem {
public function canView($member = null) { public function canView($member = null) {
return ( return (
Object::has_extension($this->record->ClassName, 'Versioned') SS_Object::has_extension($this->record->ClassName, 'Versioned')
&& $this->isArchived() && $this->isArchived()
// Don't follow redirects in preview, they break the CMS editing form // Don't follow redirects in preview, they break the CMS editing form
&& !($this->record instanceof RedirectorPage) && !($this->record instanceof RedirectorPage)