BUGFIX Re-added Translatable->isTranslation() for more friendly deprecation (originally removed in r73338)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74065 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-04-03 16:38:51 +00:00
parent a92413f1b7
commit 033e51c280

View File

@ -1079,6 +1079,20 @@ class Translatable extends DataObjectDecorator {
static function get_one_by_lang($class, $lang, $filter = '', $cache = false, $orderby = "") {
return self::get_one_by_locale($class, i18n::get_locale_from_lang($lang), $filter, $cache, $orderby);
}
/**
* Determines if the record has a locale,
* and if this locale is different from the "default locale"
* set in {@link Translatable::default_locale()}.
* Does not look at translation groups to see if the record
* is based on another record.
*
* @return boolean
* @deprecated 2.4
*/
function isTranslation() {
return ($this->owner->Locale && ($this->owner->Locale != Translatable::default_locale()));
}
}