Author: bshaffer
Date: 2010-02-01 03:16:31 +0100 (Mon, 01 Feb 2010)
New Revision: 27374
Modified:
plugins/csSettingsPlugin/trunk/lib/model/doctrine/PlugincsSetting.class.php
Log:
ensures checkbox and yesno setting types return boolean values (instead of
strings)
Modified:
plugins/csSettingsPlugin/trunk/lib/model/doctrine/PlugincsSetting.class.php
===================================================================
--- plugins/csSettingsPlugin/trunk/lib/model/doctrine/PlugincsSetting.class.php
2010-02-01 01:58:55 UTC (rev 27373)
+++ plugins/csSettingsPlugin/trunk/lib/model/doctrine/PlugincsSetting.class.php
2010-02-01 02:16:31 UTC (rev 27374)
@@ -66,4 +66,16 @@
$this['value'] = $this['setting_default'];
}
}
+
+ public function getValue()
+ {
+ switch ($this['type'])
+ {
+ case 'checkbox':
+ case 'yesno':
+ return (bool) $this->_get('value');
+ }
+
+ return $this->_get('value');
+ }
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" 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/symfony-svn?hl=en.