mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed SQL quoting in Translatable
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@69961 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
690f982a69
commit
1c40434a67
@ -253,6 +253,8 @@ class Translatable extends DataObjectDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getTranslatedLangs() {
|
function getTranslatedLangs() {
|
||||||
|
$langs = array();
|
||||||
|
|
||||||
$class = ClassInfo::baseDataClass($this->owner->class); //Base Class
|
$class = ClassInfo::baseDataClass($this->owner->class); //Base Class
|
||||||
if($this->owner->hasExtension("Versioned") && Versioned::current_stage() == "Live") {
|
if($this->owner->hasExtension("Versioned") && Versioned::current_stage() == "Live") {
|
||||||
$class = $class."_Live";
|
$class = $class."_Live";
|
||||||
@ -427,7 +429,7 @@ class Translatable extends DataObjectDecorator {
|
|||||||
if(!Translatable::is_enabled()) return;
|
if(!Translatable::is_enabled()) return;
|
||||||
|
|
||||||
if($this->isTranslation()) {
|
if($this->isTranslation()) {
|
||||||
$query->where[0] = '\"ParentID\" = '.$this->getOriginalPage()->ID;
|
$query->where[0] = '"ParentID" = '.$this->getOriginalPage()->ID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user