Skip to content

Commit

Permalink
Better fix, from devel branch. Thx Klap-in.
Browse files Browse the repository at this point in the history
  • Loading branch information
nerun committed Dec 14, 2023
1 parent 82562c8 commit 73ed217
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions syntax/indexmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,15 +617,18 @@ private function _getTitle($ns, $headpage, &$hns) {
* @return string id of namespace
*/
public function _parse_ns($ns, $id = FALSE) {
if(!$id) {
if(!$id === false) {
global $ID;
$id = $ID;
}
//Just for old reelases compatibility
if(empty($ns) || $ns == '..') $ns = ":..";
$resolver = new PageResolver($ns);
$id = $resolver->resolveId(getNS($id));
return $id;
//Just for old reelases compatibility, .. was an old version for : in the docs of indexmenu
if ($ns == '..') {
$ns = ":";
}
$ns = "$ns:arandompagehere";
$resolver = new PageResolver($id);
$ns = getNs($resolver->resolveId($ns));
return $ns === false ? '' : $ns;
}

/**
Expand Down

0 comments on commit 73ed217

Please sign in to comment.