From: Michael M Slusarz Date: Sat, 28 Aug 2010 22:17:49 +0000 (-0600) Subject: Use getOption(). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9fd10a6e5c2b365c56984d1d75a34ef694aad228;p=horde.git Use getOption(). --- diff --git a/framework/Tree/lib/Horde/Tree/Base.php b/framework/Tree/lib/Horde/Tree/Base.php index 36dd90fc6..b3132fdb3 100644 --- a/framework/Tree/lib/Horde/Tree/Base.php +++ b/framework/Tree/lib/Horde/Tree/Base.php @@ -105,9 +105,9 @@ abstract class Horde_Tree_Base implements Countable $this->_instance = $name; $this->setOption($params); - if (!empty($this->_options['session']) && - !isset($_SESSION[$this->_options['session']][$this->_instance])) { - $_SESSION[$this->_options['session']][$this->_instance] = array(); + if (($sess = $this->getOption('session')) && + !isset($_SESSION[$sess][$this->_instance])) { + $_SESSION[$sess][$this->_instance] = array(); } } @@ -198,8 +198,8 @@ abstract class Horde_Tree_Base implements Countable { $nodeid = $this->_nodeId($id); - if (!empty($this->_options['session'])) { - $sess = &$_SESSION[$this->_options['session']][$this->_instance]; + if (($session = $this->getOption('session'))) { + $sess = &$_SESSION[$session][$this->_instance]; $toggle_id = Horde_Util::getFormData(Horde_Tree::TOGGLE . $this->_instance); if ($nodeid == $toggle_id) {