mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
core prefs: clearPrefCache method added - second try
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
* e107 Preference Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/pref_class.php,v $
|
||||
* $Revision: 1.27 $
|
||||
* $Date: 2009-11-03 10:47:16 $
|
||||
* $Revision: 1.28 $
|
||||
* $Date: 2009-11-03 10:57:15 $
|
||||
* $Author: secretr $
|
||||
*/
|
||||
|
||||
@@ -611,17 +611,18 @@ class e_pref extends e_admin_model
|
||||
|
||||
/**
|
||||
* Clear pref cache
|
||||
*
|
||||
*
|
||||
* @param string $cache_name default to current alias
|
||||
* @param boolean $runtime clear runtime cache as well ($this->pref_cache)
|
||||
* @return e_pref
|
||||
*/
|
||||
protected function clearPrefCache($runtime = false)
|
||||
protected function clearPrefCache($cache_name = '', $runtime = true)
|
||||
{
|
||||
if($runtime)
|
||||
{
|
||||
$this->pref_cache = $cache_string;
|
||||
$this->pref_cache = '';
|
||||
}
|
||||
ecache::clear_sys('Config_'.$this->alias);
|
||||
ecache::clear_sys('Config_'.(!empty($cache_name) ? $cache_name : $this->alias));
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -634,20 +635,6 @@ class e_pref extends e_admin_model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear preferences cache
|
||||
*
|
||||
* @param object $cache_name [optional]
|
||||
* @return e_pref
|
||||
*/
|
||||
public function clearPrefCache($cache_name = '')
|
||||
{
|
||||
$this->pref_cache = '';
|
||||
ecache::clear_sys('Config_'.(!empty($cache_name) ? $cache_name : $this->alias));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set $set_backup option
|
||||
*
|
||||
|
Reference in New Issue
Block a user