Permalink
Browse files

BUGFIX Returning TRUE on Translatable->hasTranslation() if called on …

…a record that is in the current locale

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@91032 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 175304d commit e567b47f077d50f58fa1fb6b5470346b857ac960 @chillu chillu committed Nov 9, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/model/Translatable.php
@@ -1175,7 +1175,10 @@ function canEdit($member) {
* @return boolean
*/
function hasTranslation($locale) {
- return (array_search($locale, $this->getTranslatedLocales()) !== false);
+ return (
+ $this->owner->Locale == $locale
+ || array_search($locale, $this->getTranslatedLocales()) !== false
+ );
}
function AllChildrenIncludingDeleted($context = null) {

0 comments on commit e567b47

Please sign in to comment.