|
6 | 6 | * @author Samuele Tognini <samuele@samuele.netsons.org> |
7 | 7 | * |
8 | 8 | */ |
9 | | - |
| 9 | +use dokuwiki\File\PageResolver; |
10 | 10 | if(!defined('DOKU_INC')) die(); |
11 | 11 | if(!defined('INDEXMENU_IMG_ABSDIR')) define('INDEXMENU_IMG_ABSDIR', DOKU_PLUGIN."indexmenu/images"); |
12 | 12 |
|
@@ -428,7 +428,7 @@ private function _indexmenu($myns) { |
428 | 428 | // the toggle interacts with hide needed for js option. |
429 | 429 | $output = "\n"; |
430 | 430 | $output .= '<div><div id="nojs_'.$js_name.'" data-jsajax="'.utf8_encodeFN($js_opts['jsajax']).'" class="indexmenu_nojs">'."\n"; |
431 | | - $output .= html_buildlist($data, 'idx', array($this, "_html_list_index"), "html_li_index"); |
| 431 | + $output .= html_buildlist($data, 'idx', array($this, "_html_list_index"), "tagListItem"); |
432 | 432 | $output .= "</div></div>\n"; |
433 | 433 | $output .= $output_tmp; |
434 | 434 | return $output; |
@@ -617,13 +617,18 @@ private function _getTitle($ns, $headpage, &$hns) { |
617 | 617 | * @return string id of namespace |
618 | 618 | */ |
619 | 619 | public function _parse_ns($ns, $id = FALSE) { |
620 | | - if(!$id) { |
| 620 | + if(!$id === false) { |
621 | 621 | global $ID; |
622 | 622 | $id = $ID; |
623 | 623 | } |
624 | | - //Just for old reelases compatibility |
625 | | - if(empty($ns) || $ns == '..') $ns = ":.."; |
626 | | - return resolve_id(getNS($id), $ns); |
| 624 | + //Just for old reelases compatibility, .. was an old version for : in the docs of indexmenu |
| 625 | + if ($ns == '..') { |
| 626 | + $ns = ":"; |
| 627 | + } |
| 628 | + $ns = "$ns:arandompagehere"; |
| 629 | + $resolver = new PageResolver($id); |
| 630 | + $ns = getNs($resolver->resolveId($ns)); |
| 631 | + return $ns === false ? '' : $ns; |
627 | 632 | } |
628 | 633 |
|
629 | 634 | /** |
|
0 commit comments