diff --git a/syntax/indexmenu.php b/syntax/indexmenu.php index d91322d..82092d9 100644 --- a/syntax/indexmenu.php +++ b/syntax/indexmenu.php @@ -769,10 +769,14 @@ public function parseNs($ns, $id = false) if ($ns == '..') { $ns = ":"; } - $ns = "$ns:arandompagehere"; - $resolver = new PageResolver($id); - $ns = getNs($resolver->resolveId($ns)); - return $ns === false ? '' : $ns; + if (class_exists('dokuwiki\File\PageResolver')) { + $ns = "$ns:arandompagehere"; + $resolver = new PageResolver($id); + $ns = getNs($resolver->resolveId($ns)); + return $ns === false ? '' : $ns; + } else { + return resolve_id(getNS($id), $ns); + } } /**