Author: sevein
Date: Thu Jun 21 11:17:50 2012
New Revision: 11786
Log:
Pass culture value using placeholders
Modified:
trunk/lib/model/QubitSetting.php
Modified: trunk/lib/model/QubitSetting.php
==============================================================================
--- trunk/lib/model/QubitSetting.php Thu Jun 21 00:02:40 2012 (r11785)
+++ trunk/lib/model/QubitSetting.php Thu Jun 21 11:17:50 2012 (r11786)
@@ -53,12 +53,14 @@
(CASE WHEN (current.CULTURE IS NOT NULL AND current.CULTURE <> "")
THEN current.CULTURE ELSE source.CULTURE END) AS culture
FROM '.QubitSetting::TABLE_NAME.'
LEFT JOIN '.QubitSettingI18n::TABLE_NAME.' current
- ON (setting.ID = current.id AND current.CULTURE =
"'.sfContext::getInstance()->user->getCulture().'")
+ ON (setting.ID = current.id AND current.CULTURE = ?)
LEFT JOIN '.QubitSettingI18n::TABLE_NAME.' source
- ON (setting.ID = source.id AND source.CULTURE = setting.SOURCE_CULTURE
AND source.CULTURE <> "'.sfContext::getInstance()->user->getCulture().'")';
+ ON (setting.ID = source.id AND source.CULTURE = setting.SOURCE_CULTURE
AND source.CULTURE <> ?)';
$settings = array();
- foreach (QubitPdo::fetchAll($sql) as $qubitSetting)
+ $culture = sfContext::getInstance()->user->getCulture();
+
+ foreach (QubitPdo::fetchAll($sql, array($culture, $culture)) as
$qubitSetting)
{
if ($qubitSetting->scope)
{
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.