diff --git a/ingo/lib/Storage/Filters/Prefs.php b/ingo/lib/Storage/Filters/Prefs.php index a57595bfb99..c913d3a7e34 100644 --- a/ingo/lib/Storage/Filters/Prefs.php +++ b/ingo/lib/Storage/Filters/Prefs.php @@ -24,12 +24,12 @@ class Ingo_Storage_Filters_Prefs extends Ingo_Storage_Filters { /** * Constructor. + * + * @param Horde_Prefs $p Prefs object to retrieve data from. */ - public function __construct() + public function __construct(Horde_Prefs $p) { - global $prefs; - - if ($rules = @unserialize($prefs->getValue('rules'))) { + if ($rules = @unserialize($p->getValue('rules'))) { $this->_filters = $rules; } } diff --git a/ingo/lib/Storage/Prefs.php b/ingo/lib/Storage/Prefs.php index 29059ac4b62..8009abb528f 100644 --- a/ingo/lib/Storage/Prefs.php +++ b/ingo/lib/Storage/Prefs.php @@ -52,7 +52,7 @@ protected function _retrieve($field, $readonly = false) break; case self::ACTION_FILTERS: - $ob = new Ingo_Storage_Filters_Prefs(); + $ob = new Ingo_Storage_Filters_Prefs($this->_prefs()); break; case self::ACTION_FORWARD: