From: <jon...@us...> - 2012-10-05 14:03:42
|
Revision: 43301 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=43301&view=rev Author: jonnybradley Date: 2012-10-05 14:03:32 +0000 (Fri, 05 Oct 2012) Log Message: ----------- [FIX] categ module: Use same tree pre-processing as tiki-browse_categories.php to work out roots properly (previously was sometimes ending up with no categories when in category jail) Modified Paths: -------------- trunk/modules/mod-func-categories.php Modified: trunk/modules/mod-func-categories.php =================================================================== --- trunk/modules/mod-func-categories.php 2012-10-05 13:26:10 UTC (rev 43300) +++ trunk/modules/mod-func-categories.php 2012-10-05 14:03:32 UTC (rev 43301) @@ -107,11 +107,16 @@ $tree_nodes[] = array( "id" => $cat["categId"], "parent" => $cat["parentId"], + 'parentId' => $cat['parentId'], + 'categId' => $cat['categId'], "data" => '<a class="catname" href="'.$url.'">' . htmlspecialchars($cat['name']) . '</a><br />' ); } + $res = ''; $tm = new BrowseTreeMaker('mod_categ' . $module_params['module_position'] . $module_params['module_ord']); - $res = $tm->make_tree($categId, $tree_nodes); + foreach ($categlib->findRoots($tree_nodes) as $node) { + $res .= $tm->make_tree($node, $tree_nodes); + } $smarty->assign('tree', $res); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |