Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempts to restore Hogfather compatibility #294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions syntax/indexmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general resolve_id() should not be used. But I guess the old code did this already…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the old code already uses this function. I noticed that there's a lot of depreciation errors about IndexMenu plug-in, as it still references "resolve_id" and "resolve_pageid" functions that wasn't migrated to PageResolver yet, so I believe that we migrate all those functions or keep it until we migrate them all.

}
}

/**
Expand Down
Loading