cvs: pear /DB_NestedSet/NestedSet CoolMenu.php

From: Date: Tue, 25 Oct 2005 21:48:07 +0000
Subject: cvs: pear /DB_NestedSet/NestedSet CoolMenu.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35859@lists.php.net to get a copy of this message
datenpunk Tue Oct 25 17:48:07 2005 EDT Modified files: /pear/DB_NestedSet/NestedSet CoolMenu.php Log: Fixed Bug #2969. Thanks to 'bate' for the patch http://cvs.php.net/diff.php/pear/DB_NestedSet/NestedSet/CoolMenu.php?r1=1.3&r2=1.4&ty=u Index: pear/DB_NestedSet/NestedSet/CoolMenu.php diff -u pear/DB_NestedSet/NestedSet/CoolMenu.php:1.3 pear/DB_NestedSet/NestedSet/CoolMenu.php:1.4 --- pear/DB_NestedSet/NestedSet/CoolMenu.php:1.3 Sun Dec 28 15:38:28 2003 +++ pear/DB_NestedSet/NestedSet/CoolMenu.php Tue Oct 25 17:48:02 2005 @@ -16,7 +16,7 @@ // | Authors: Andy Crain <apcrain@fuse.net> | // +----------------------------------------------------------------------+ // -// $Id: CoolMenu.php,v 1.3 2003/12/28 20:38:28 datenpunk Exp $ +// $Id: CoolMenu.php,v 1.4 2005/10/25 21:48:02 datenpunk Exp $ // // {{{ DB_NestedSet_CoolMenu:: class @@ -110,6 +110,9 @@ static $rootlevel; + // variable init + $coolMenu = ''; + // always start at level 1 if (!isset($params['currentLevel'])) { $params['currentLevel'] = 1; @@ -145,7 +148,7 @@ $params['structure'][$key]['hit'] = $node['hit'] = true; // figure out max length for textfields, increase if necessary--NEEDED? - if (!$this->_strlenByLevel[$params['currentLevel'] - $this->_levelOffset] || + if (empty($this->_strlenByLevel[$params['currentLevel'] - $this->_levelOffset]) || strlen($node[$params['textField']]) > $this->_strlenByLevel[$params['currentLevel'] - $this->_levelOffset]) { $this->_strlenByLevel[$params['currentLevel'] - $this->_levelOffset] = strlen($node[$params['textField']]); }; @@ -286,6 +289,8 @@ */ function _buildMenuProperties($properties) { + // variable init + $menu_properties = ''; foreach($properties as $prop_key => $prop_val){ $menu_properties .= $this->_menuName . ".$prop_key=$prop_val\n"; }

« previous php.pear.cvs (#35859) next »