diff --git a/core/ViewableData.php b/core/ViewableData.php index 8f1941399..472861d21 100755 --- a/core/ViewableData.php +++ b/core/ViewableData.php @@ -752,17 +752,6 @@ class ViewableData extends Object implements IteratorAggregate { public function Top() { return SSViewer::topLevel(); } - - // DEPRECATED ------------------------------------------------------------------------------------------------------ - - /** - * @deprecated 2.3 use {@link ViewableData::XML_val()} - * @todo this cannot throw an error yet, as alot of core classes still use it - */ - public function val($field, $arguments = null) { - return $this->XML_val($field, $arguments); - } - } /** diff --git a/core/model/DataObject.php b/core/model/DataObject.php index 5231a2652..8201a0478 100755 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -530,10 +530,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity * Get the translated user friendly singular name of this DataObject * same as singular_name() but runs it through the translating function * - * NOTE: - * It uses as default text if no translation found the $add_action when - * defined or else the default text is singular_name() - * * Translating string is in the form: * $this->class.SINGULARNAME * Example: @@ -823,10 +819,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 +833,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 +890,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity } } - // DEPRECATED 2.3: use populateDefaults() - $this->extend('augmentPopulateDefaults'); - $this->extend('populateDefaults'); } @@ -2332,16 +2317,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return $val; } - /** - * @deprecated 2.3 (For external use) Please use hasField(), hasDatabaseField(), hasOwnTableDatabaseField() instead - * - * @param string $field Name of the field - * @return string The field type of the given field - */ - public function fieldExists($field) { - return $this->hasOwnTableDatabaseField($field); - } - /** * Return the DBField object that represents the given field. * This works similarly to obj() with 2 key differences: @@ -2575,24 +2550,6 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity return $query; } - /** - * Get a bunch of fields in an HTML LI, like this: - * - name: value - * - name: value - * - name: value - * - * @deprecated 2.3 Use custom code - * @return string The fields as an HTML unordered list - */ - function listOfFields() { - $fields = func_get_args(); - $result = ""; - return $result; - } - /** * Return all objects matching the filter * sub-classes are automatically selected and included @@ -2915,9 +2872,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); diff --git a/core/model/Image.php b/core/model/Image.php index f606d5d70..d64a15cac 100755 --- a/core/model/Image.php +++ b/core/model/Image.php @@ -99,7 +99,7 @@ class Image extends File { */ function getTag() { if(file_exists(Director::baseFolder()."/".$this->Filename)) { - $url = $this->URL(); + $url = $this->getURL(); $title = ($this->Title) ? $this->Title : $this->Filename; if ($this->Title) { @@ -120,7 +120,7 @@ class Image extends File { * @return string */ function forTemplate() { - return $this->Tag(); + return $this->getTag(); } /** @@ -441,26 +441,6 @@ class Image extends File { return self::ORIENTATION_SQUARE; } } - - - - // ################### - // DEPRECATED - // ################### - - /** - * @deprecated Use getTag() instead - */ - function Tag() { - return $this->getTag(); - } - - /** - * @deprecated Use getURL() instead - */ - function URL() { - return $this->getURL(); - } } /** diff --git a/core/model/RedirectorPage.php b/core/model/RedirectorPage.php index ba3ed21f5..8d162c8dc 100755 --- a/core/model/RedirectorPage.php +++ b/core/model/RedirectorPage.php @@ -7,8 +7,6 @@ */ class RedirectorPage extends Page { - static $add_action = "Redirector to another page"; - static $icon = array("cms/images/treeicons/page-shortcut","file"); static $db = array( diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 0dd3d1a4b..08733041c 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -135,15 +135,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid static $default_sort = "Sort"; - /** - * The text shown in the create page dropdown. If - * this is not set, default to "Create a ClassName". - * - * @deprecated 2.3 Use ".TITLE" in the i18n language tables instead - * @var string - */ - static $add_action = null; - /** * If this is false, the class cannot be created in the CMS. * @var boolean @@ -667,10 +658,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; @@ -701,10 +688,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; @@ -736,10 +719,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; @@ -795,10 +774,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; @@ -839,10 +814,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; @@ -875,10 +846,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); @@ -914,10 +881,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); @@ -1187,9 +1150,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid $currentLang = ($this->hasExtension('Translatable')) ? Translatable::get_current_locale() : i18n::get_locale(); $tags .= "\n"; - // DEPRECATED 2.3: Use MetaTags - $this->extend('updateMetaTags', $tags); - $this->extend('MetaTags', $tags); return $tags; @@ -2352,10 +2312,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid ); } + /** + * Return the translated Singular name + * + * @return String + */ function i18n_singular_name() { - $addAction = $this->stat('add_action'); - $name = (!empty($addAction)) ? $addAction : $this->singular_name(); - return _t($this->class.'.SINGULARNAME', $name); + return _t($this->class.'.SINGULARNAME', $this->singular_name()); } /** diff --git a/core/model/VirtualPage.php b/core/model/VirtualPage.php index fa056a06e..f2b436f17 100755 --- a/core/model/VirtualPage.php +++ b/core/model/VirtualPage.php @@ -6,8 +6,6 @@ * @package cms */ class VirtualPage extends Page { - - static $add_action = "Virtual page (another page's content)"; static $icon = array("cms/images/treeicons/page-shortcut-gold","file"); diff --git a/forms/ComplexTableField.php b/forms/ComplexTableField.php index a8493ef4f..fa29bc657 100755 --- a/forms/ComplexTableField.php +++ b/forms/ComplexTableField.php @@ -318,18 +318,6 @@ JS; function Title() { return $this->addTitle ? $this->addTitle : parent::Title(); } - - /** - * Returns the content of this formfield without surrounding layout. Triggered by Javascript - * to update content after a DetailForm-save-action. - * - * @deprecated Use the field link itself, instead - Form/fields/TableFieldName - * @return String - */ - function ajax_render() { - user_error("Deprecated; access the field's root link instead", E_USER_NOTICE); - return $this->renderWith($this->template); - } /** * Calculates the number of columns needed for colspans diff --git a/forms/ConfirmedFormAction.php b/forms/ConfirmedFormAction.php deleted file mode 100755 index ba60176e0..000000000 --- a/forms/ConfirmedFormAction.php +++ /dev/null @@ -1,49 +0,0 @@ -confirmation = $confirmation; - } else { - $this->confirmation = _t('ConfirmedFormAction.CONFIRMATION', "Are you sure?", PR_MEDIUM, 'Confirmation popup before executing the form action'); - } - - parent::__construct($action, $title, $form); - } - - function Field() { - $attributes = array( - 'type' => 'submit', - 'class' => ($this->extraClass() ? $this->extraClass() : ''), - 'id' => $this->id(), - 'name' => $this->Name(), - 'value' => $this->attrTitle(), - 'tabindex' => $this->getTabIndex(), - 'onclick' => "return confirm('$this->confirmation');" - ); - - return $this->createTag('input', $attributes); - } -} - - -?> \ No newline at end of file diff --git a/security/Group.php b/security/Group.php index e4be6b566..0f3808b9a 100644 --- a/security/Group.php +++ b/security/Group.php @@ -336,10 +336,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; @@ -370,10 +366,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; diff --git a/security/Member.php b/security/Member.php index e3c5c436f..e68df10dd 100644 --- a/security/Member.php +++ b/security/Member.php @@ -1415,14 +1415,6 @@ class Member_SignupEmail extends Email { '; } - - function MemberData() { - return $this->template_data->listOfFields( - "FirstName", "Surname", "Email", - "Phone", "Mobile", "Street", - "Suburb", "City", "Postcode" - ); - } }