1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 22:57:14 +02:00
This commit is contained in:
marj
2009-08-08 08:11:02 +00:00
parent ffb7d5eab9
commit 6a3cb3456c

View File

@@ -9,9 +9,9 @@
* e107 Preference Handler * e107 Preference Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
* $Revision: 1.8 $ * $Revision: 1.9 $
* $Date: 2009-08-06 22:19:47 $ * $Date: 2009-08-08 08:11:02 $
* $Author: secretr $ * $Author: marj_nl_fr $
*/ */
if (!defined('e107_INIT')) { exit; } if (!defined('e107_INIT')) { exit; }
@@ -325,7 +325,7 @@ class e_pref extends e_model
$id = $this->prefid; $id = $this->prefid;
$data = $force ? false : $this->getPrefCache(true); $data = $force ? false : $this->getPrefCache(true);
if(false !== $data) if($data !== false)
{ {
//var_dump('Pref cache used: '.$this->alias); //var_dump('Pref cache used: '.$this->alias);
$this->pref_cache = e107::getArrayStorage()->WriteArray($data, false); //runtime cache $this->pref_cache = e107::getArrayStorage()->WriteArray($data, false); //runtime cache
@@ -351,7 +351,8 @@ class e_pref extends e_model
$this->setPrefCache($row['e107_value'], true); $this->setPrefCache($row['e107_value'], true);
} }
if(empty($data)) $data = array(); if(empty($data))
$data = array();
return $this->loadData($data, false); return $this->loadData($data, false);
} }
@@ -400,7 +401,7 @@ class e_pref extends e_model
if(e107::getDb()->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('{$this->prefid}', '".addslashes($dbdata)."') ")) if(e107::getDb()->db_Select_gen("REPLACE INTO `#core` (e107_name,e107_value) values ('{$this->prefid}', '".addslashes($dbdata)."') "))
{ {
if(true === $this->set_backup) if($this->set_backup === true)
{ {
if($this->serial_bc) if($this->serial_bc)
{ {
@@ -476,7 +477,7 @@ class e_pref extends e_model
if($save) if($save)
{ {
ecache::set_sys('Config_'.(true !== $save ? $save : $this->alias), $cache_string, true); ecache::set_sys('Config_'.($save !== true ? $save : $this->alias), $cache_string, true);
} }
return $this; return $this;
} }
@@ -1669,7 +1670,7 @@ class e_model
*/ */
public function __toString() public function __toString()
{ {
return $this->toString((true === func_get_arg(0))); return $this->toString((func_get_arg(0) === true));
} }
} }