@@ -61,16 +61,16 @@ protected function _makeTreeItems($key, &$ret, $prefix_orig, $prefix_curr = '',
6161 if ($ key > 0 ) {
6262 if (count ($ tags ) > 0 ) {
6363 foreach ($ tags as $ tag ) {
64- $ ret [$ key ][$ tag ] = $ this ->_tree [$ key ]['obj ' ]->getVar ($ tag );
64+ $ ret [$ key ][$ tag ] = $ this ->tree [$ key ]['obj ' ]->getVar ($ tag );
6565 }
6666 } else {
67- $ ret [$ key ]['forum_name ' ] = $ this ->_tree [$ key ]['obj ' ]->getVar ('forum_name ' );
67+ $ ret [$ key ]['forum_name ' ] = $ this ->tree [$ key ]['obj ' ]->getVar ('forum_name ' );
6868 }
6969 $ ret [$ key ]['prefix ' ] = $ prefix_curr ;
7070 $ prefix_curr .= $ prefix_orig ;
7171 }
72- if (isset ($ this ->_tree [$ key ]['child ' ]) && !empty ($ this ->_tree [$ key ]['child ' ])) {
73- foreach ($ this ->_tree [$ key ]['child ' ] as $ childkey ) {
72+ if (isset ($ this ->tree [$ key ]['child ' ]) && !empty ($ this ->tree [$ key ]['child ' ])) {
73+ foreach ($ this ->tree [$ key ]['child ' ] as $ childkey ) {
7474 $ this ->_makeTreeItems ($ childkey , $ ret , $ prefix_orig , $ prefix_curr , $ tags );
7575 }
7676 }
@@ -148,10 +148,10 @@ public function getAllChild_object($key, &$ret, $depth = 0)
148148 return ;
149149 }
150150
151- if (isset ($ this ->_tree [$ key ]['child ' ])) {
152- foreach ($ this ->_tree [$ key ]['child ' ] as $ childkey ) {
153- if (isset ($ this ->_tree [$ childkey ]['obj ' ])) {
154- $ ret ['child ' ][$ childkey ] = $ this ->_tree [$ childkey ]['obj ' ];
151+ if (isset ($ this ->tree [$ key ]['child ' ])) {
152+ foreach ($ this ->tree [$ key ]['child ' ] as $ childkey ) {
153+ if (isset ($ this ->tree [$ childkey ]['obj ' ])) {
154+ $ ret ['child ' ][$ childkey ] = $ this ->tree [$ childkey ]['obj ' ];
155155 }
156156 $ this ->getAllChild_object ($ childkey , $ ret ['child ' ][$ childkey ], $ depth );
157157 }
@@ -192,15 +192,15 @@ public function getAllChild_array($key, &$ret, array $tags = array(), $depth = 0
192192 return ;
193193 }
194194
195- if (isset ($ this ->_tree [$ key ]['child ' ])) {
196- foreach ($ this ->_tree [$ key ]['child ' ] as $ childkey ) {
197- if (isset ($ this ->_tree [$ childkey ]['obj ' ])) {
195+ if (isset ($ this ->tree [$ key ]['child ' ])) {
196+ foreach ($ this ->tree [$ key ]['child ' ] as $ childkey ) {
197+ if (isset ($ this ->tree [$ childkey ]['obj ' ])) {
198198 if (count ($ tags ) > 0 ) {
199199 foreach ($ tags as $ tag ) {
200- $ ret ['child ' ][$ childkey ][$ tag ] = $ this ->_tree [$ childkey ]['obj ' ]->getVar ($ tag );
200+ $ ret ['child ' ][$ childkey ][$ tag ] = $ this ->tree [$ childkey ]['obj ' ]->getVar ($ tag );
201201 }
202202 } else {
203- $ ret ['child ' ][$ childkey ]['forum_name ' ] = $ this ->_tree [$ childkey ]['obj ' ]->getVar ('forum_name ' );
203+ $ ret ['child ' ][$ childkey ]['forum_name ' ] = $ this ->tree [$ childkey ]['obj ' ]->getVar ('forum_name ' );
204204 }
205205 }
206206
@@ -238,11 +238,11 @@ public function &makeArrayTree($key = 0, $tags = null, $depth = 0)
238238 */
239239 public function &_getParentForums ($ key , array $ ret = array (), $ uplevel = 0 )
240240 {
241- if (isset ($ this ->_tree [$ key ]['parent ' ]) && isset ($ this ->_tree [$ this ->_tree [$ key ]['parent ' ]]['obj ' ])) {
242- $ ret [$ uplevel ] = $ this ->_tree [$ this ->_tree [$ key ]['parent ' ]]['obj ' ];
243- if ($ this ->_tree [$ key ]['parent ' ] !== $ key ) {
244- //$parents = $this->getParentForums($this->_tree [$key]['parent'], $ret, $uplevel+1);
245- $ parents = $ this ->getParentForums ($ this ->_tree [$ key ]['parent ' ]);
241+ if (isset ($ this ->tree [$ key ]['parent ' ]) && isset ($ this ->tree [$ this ->tree [$ key ]['parent ' ]]['obj ' ])) {
242+ $ ret [$ uplevel ] = $ this ->tree [$ this ->tree [$ key ]['parent ' ]]['obj ' ];
243+ if ($ this ->tree [$ key ]['parent ' ] !== $ key ) {
244+ //$parents = $this->getParentForums($this->tree [$key]['parent'], $ret, $uplevel+1);
245+ $ parents = $ this ->getParentForums ($ this ->tree [$ key ]['parent ' ]);
246246 foreach (array_keys ($ parents ) as $ newkey ) {
247247 $ ret [$ newkey ] = $ parents [$ newkey ];
248248 }
@@ -261,9 +261,9 @@ public function &getParentForums($key, $reverse = true)
261261 {
262262 $ ret = array ();
263263 $ pids = array ();
264- if (isset ($ this ->_tree [$ key ]['parent ' ]) && isset ($ this ->_tree [$ this ->_tree [$ key ]['parent ' ]]['obj ' ])) {
265- $ pids [] = $ this ->_tree [$ this ->_tree [$ key ]['parent ' ]]['obj ' ]->getVar ($ this ->_myId );
266- $ parents = $ this ->_getParentForums ($ this ->_tree [$ key ]['parent ' ], $ ret );
264+ if (isset ($ this ->tree [$ key ]['parent ' ]) && isset ($ this ->tree [$ this ->tree [$ key ]['parent ' ]]['obj ' ])) {
265+ $ pids [] = $ this ->tree [$ this ->tree [$ key ]['parent ' ]]['obj ' ]->getVar ($ this ->_myId );
266+ $ parents = $ this ->_getParentForums ($ this ->tree [$ key ]['parent ' ], $ ret );
267267 foreach (array_keys ($ parents ) as $ newkey ) {
268268 if (!is_object ($ newkey )) {
269269 continue ;
0 commit comments