From c43712bd82c255725ea9255ec69d20d9dc8d4eb2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 10 Nov 2007 05:19:24 +0000 Subject: [PATCH] Refactored non-standard extension of cmsfields (should use updateCMSFields instead). originally committed in r40265 and r36951 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44568 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 35 ++++++----------------------------- lang/en_US.php | 3 +-- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index a558abbfb..642b72575 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -871,27 +871,6 @@ class SiteTree extends DataObject { } } - //------------------------------------------------------------------------------------// - - /** - * Holds callback functions to be called when getCMSFields() is called - * - * @var array - */ - static $cms_additions = array(); - - - /** - * Allows modules to extend the cms editing form for all pages in the site - * - * @param mixed $function the name of your function, either as a string, - * or in the form array('class','function) - */ - static function ExtendCMS($function) - { - self::$cms_additions[] = $function; - } - /** * The default value of the priority field depends on the depth of the page in * the site tree, so it must be calculated dynamically. @@ -1042,9 +1021,12 @@ class SiteTree extends DataObject { new LiteralField( "", "

" . - _t( - 'SiteTree.METANOTEPRIORITY', - "Manually specify a Priority for this page" + sprintf( + _t( + 'SiteTree.METANOTEPRIORITY', + "Manually specify a Google Sitemaps priority for this page (%s)" + ), + '?' ) . "

" ), @@ -1117,11 +1099,6 @@ class SiteTree extends DataObject { $tabAccess->setTitle(_t('SiteTree.TABACCESS', "Access")); $tabBacklinks->setTitle(_t('SiteTree.TABBACKLINKS', "BackLinks")); - foreach(self::$cms_additions as $extension) - { - $fields = call_user_func($extension,$fields); - } - $this->extend('updateCMSFields', $fields); return $fields; diff --git a/lang/en_US.php b/lang/en_US.php index b06b5dc78..9784fc9d5 100644 --- a/lang/en_US.php +++ b/lang/en_US.php @@ -62,8 +62,7 @@ $lang['en_US']['SiteTree']['METADESC'] = 'Description'; $lang['en_US']['SiteTree']['METAKEYWORDS'] = 'Keywords'; $lang['en_US']['SiteTree']['METAADVANCEDHEADER'] = 'Advanced Options...'; $lang['en_US']['SiteTree']['METAEXTRA'] = 'Custom Meta Tags'; -$lang['en_US']['SiteTree']['METANOTEPRIORITY'] = 'Manually specify a Priority for this page: - (valid values are from 0 to 1, a zero will remove this page from the index)'; +$lang['en_US']['SiteTree']['METANOTEPRIORITY'] = 'Manually specify a Google Sitemaps priority for this page (%s)'; $lang['en_US']['SiteTree']['METAPAGEPRIO'] = 'Page Priority'; $lang['en_US']['SiteTree']['PAGETYPE'] = array( 'Page type',