mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR FIX: columns quoted properly
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86508 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
05c17d6f91
commit
9ec8c5c310
@ -335,7 +335,7 @@ class Translatable extends DataObjectDecorator {
|
||||
$translationGroupID = $this->getTranslationGroup();
|
||||
if(is_numeric($translationGroupID)) {
|
||||
$query = new SQLQuery(
|
||||
'DISTINCT Locale',
|
||||
'DISTINCT "Locale"',
|
||||
sprintf(
|
||||
'"%s" LEFT JOIN "%s" ON "%s"."OriginalID" = "%s"."ID"',
|
||||
$baseDataClass,
|
||||
@ -1133,7 +1133,10 @@ class Translatable extends DataObjectDecorator {
|
||||
*/
|
||||
static function get_existing_content_languages($className = 'SiteTree', $where = '') {
|
||||
$baseTable = ClassInfo::baseDataClass($className);
|
||||
$query = new SQLQuery('Distinct Locale',$baseTable,$where,"",'Locale');
|
||||
//We don't quote $where if it is empty:
|
||||
if($where!='')
|
||||
$where="\"$where\"";
|
||||
$query = new SQLQuery("Distinct \"Locale\"","\"$baseTable\"",$where, '', "\"Locale\"");
|
||||
$dbLangs = $query->execute()->column();
|
||||
$langlist = array_merge((array)Translatable::default_locale(), (array)$dbLangs);
|
||||
$returnMap = array();
|
||||
|
Loading…
Reference in New Issue
Block a user