MINOR: Use Deprecation class to indicated deprecated methods in cms.

This commit is contained in:
Sam Minnee 2011-10-29 12:02:32 +13:00
parent d63bcb63ae
commit 4e7cb308d5
3 changed files with 3 additions and 5 deletions

View File

@ -398,6 +398,7 @@ HTML;
* templates directly in the template. * templates directly in the template.
*/ */
function LangAttributes() { function LangAttributes() {
Deprecation::notice('2.5', 'Use ContentLocale() instead and write attribute names suitable to XHTML/HTML instead.');
$locale = $this->ContentLocale(); $locale = $this->ContentLocale();
return "xml:lang=\"$locale\" lang=\"$locale\""; return "xml:lang=\"$locale\" lang=\"$locale\"";
} }

View File

@ -2464,6 +2464,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @deprecated 3.0 Use getTreeTitle() * @deprecated 3.0 Use getTreeTitle()
*/ */
function TreeTitle() { function TreeTitle() {
Deprecation::notice('3.0', 'Use getTreeTitle() instead.');
return $this->getTreeTitle(); return $this->getTreeTitle();
} }

View File

@ -7,11 +7,7 @@
abstract class SiteTreeDecorator extends SiteTreeExtension { abstract class SiteTreeDecorator extends SiteTreeExtension {
public function __construct() { public function __construct() {
// TODO Re-enable before we release 3.0 beta, for now it "breaks" too many modules Deprecation::notice('3.0', 'Use SiteTreeExtension instead.');
// user_error(
// 'SiteTreeDecorator is deprecated, please use SiteTreeExtension instead.',
// E_USER_NOTICE
// );
parent::__construct(); parent::__construct();
} }