Add PHP7.2 support

This commit is contained in:
Daniel Hensby 2017-12-01 12:00:12 +00:00
parent 54047719c0
commit b9f2f1d4b3
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
4 changed files with 7 additions and 7 deletions

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)