mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
a92413f1b7
commit
033e51c280
@ -1080,6 +1080,20 @@ class Translatable extends DataObjectDecorator {
|
||||
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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user