Do not cache app settings in session

This commit is contained in:
Frederic Guillot
2016-01-14 21:42:28 -05:00
parent a8f404421f
commit 9e24bb2ef0
8 changed files with 196 additions and 118 deletions

View File

@@ -47,10 +47,12 @@ abstract class Setting extends Base
*/
public function getOption($name, $default = '')
{
return $this->db
$value = $this->db
->table(self::TABLE)
->eq('option', $name)
->findOneColumn('value') ?: $default;
->findOneColumn('value');
return $value === null || $value === false || $value === '' ? $default : $value;
}
/**