APICHANGE: removed deprecated extend calls

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@93632 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Will Rossiter 2009-11-26 20:40:49 +00:00
parent 7ca85245d5
commit e0f1fa8c3a
3 changed files with 0 additions and 53 deletions

View File

@ -823,10 +823,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
*/
protected function onBeforeWrite() {
$this->brokenOnWrite = false;
// DEPRECATED 2.3: use onBeforeWrite()
$dummy = null;
$this->extend('augmentBeforeWrite', $dummy);
$dummy = null;
$this->extend('onBeforeWrite', $dummy);
@ -841,10 +837,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* @uses DataObjectDecorator->onAfterWrite()
*/
protected function onAfterWrite() {
// DEPRECATED 2.3: use onAfterWrite()
$dummy = null;
$this->extend('augmentAfterWrite', $dummy);
$dummy = null;
$this->extend('onAfterWrite', $dummy);
}
@ -902,9 +894,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
}
}
// DEPRECATED 2.3: use populateDefaults()
$this->extend('augmentPopulateDefaults');
$this->extend('populateDefaults');
}
@ -2915,9 +2904,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
DB::alteration_message("Added default records to $className table","created");
}
}
// DEPRECATED 2.3: Use requireDefaultRecords()
$this->extend('augmentDefaultRecords', $dummy);
// Let any extentions make their own database default data
$this->extend('requireDefaultRecords', $dummy);

View File

@ -660,10 +660,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return $this->$method($member);
}
// DEPRECATED 2.3: Use can()
$results = $this->extend('alternateCan', $member);
if($results && is_array($results)) if(!min($results)) return false;
$results = $this->extend('can', $member);
if($results && is_array($results)) if(!min($results)) return false;
@ -694,10 +690,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
if($member && Permission::checkMember($member, "ADMIN")) return true;
// DEPRECATED 2.3: use canAddChildren() instead
$results = $this->extend('alternateCanAddChildren', $member);
if($results && is_array($results)) if(!min($results)) return false;
$results = $this->extend('canAddChildren', $member);
if($results && is_array($results)) if(!min($results)) return false;
@ -729,10 +721,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// admin override
if($member && Permission::checkMember($member, array("ADMIN", "SITETREE_VIEW_ALL"))) return true;
// DEPRECATED 2.3: use canView() instead
$results = $this->extend('alternateCanView', $member);
if($results && is_array($results)) if(!min($results)) return false;
// decorated access checks
$results = $this->extend('canView', $member);
if($results && is_array($results)) if(!min($results)) return false;
@ -788,10 +776,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
return true;
}
// DEPRECATED 2.3: use canDelete() instead
$results = $this->extend('alternateCanDelete', $memberID);
if($results && is_array($results)) if(!min($results)) return false;
// decorated access checks
$results = $this->extend('canDelete', $memberID);
if($results && is_array($results)) if(!min($results)) return false;
@ -832,10 +816,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
if($member && Permission::checkMember($member, "ADMIN")) return true;
// DEPRECATED 2.3: use canCreate() instead
$results = $this->extend('alternateCanCreate', $member);
if($results && is_array($results)) if(!min($results)) return false;
// decorated permission checks
$results = $this->extend('canCreate', $member);
if($results && is_array($results)) if(!min($results)) return false;
@ -868,10 +848,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
else $memberID = Member::currentUserID();
if($memberID && Permission::checkMember($memberID, array("ADMIN", "SITETREE_EDIT_ALL"))) return true;
// DEPRECATED 2.3: use canEdit() instead
$results = $this->extend('alternateCanEdit', $memberID);
if($results && is_array($results)) if(!min($results)) return false;
// decorated access checks
$results = $this->extend('canEdit', $memberID);
@ -907,10 +883,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
if($member && Permission::checkMember($member, "ADMIN")) return true;
// DEPRECATED 2.3: use canPublish() instead
$results = $this->extend('alternateCanPublish', $member);
if($results && is_array($results)) if(!min($results)) return false;
// If we have a result, then that means at least one decorator specified alternateCanPublish
// Allow the permission check only if *all* voting decorators allow it.
$results = $this->extend('canPublish', $member);
@ -1180,9 +1152,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$currentLang = ($this->hasExtension('Translatable')) ? Translatable::get_current_locale() : i18n::get_locale();
$tags .= "<meta http-equiv=\"Content-Language\" content=\"". i18n::convert_rfc1766($currentLang) ."\"/>\n";
// DEPRECATED 2.3: Use MetaTags
$this->extend('updateMetaTags', $tags);
$this->extend('MetaTags', $tags);
return $tags;

View File

@ -338,10 +338,6 @@ class Group extends DataObject {
public function canEdit($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) $member = Member::currentUser();
// DEPRECATED 2.3: use canView() instead
$results = $this->extend('alternateCanView', $member);
if($results && is_array($results)) if(!min($results)) return false;
// decorated access checks
$results = $this->extend('canEdit', $member);
if($results && is_array($results)) if(!min($results)) return false;
@ -372,10 +368,6 @@ class Group extends DataObject {
public function canView($member = null) {
if(!$member || !(is_a($member, 'Member')) || is_numeric($member)) $member = Member::currentUser();
// DEPRECATED 2.3: use canView() instead
$results = $this->extend('alternateCanView', $member);
if($results && is_array($results)) if(!min($results)) return false;
// decorated access checks
$results = $this->extend('canView', $member);
if($results && is_array($results)) if(!min($results)) return false;