-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from nerun/deprecation
Fix deprecations: html_li_index and PageResolver
- Loading branch information
Showing
3 changed files
with
13 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* @author Samuele Tognini <[email protected]> | ||
* | ||
*/ | ||
|
||
use dokuwiki\File\PageResolver; | ||
if(!defined('DOKU_INC')) die(); | ||
if(!defined('INDEXMENU_IMG_ABSDIR')) define('INDEXMENU_IMG_ABSDIR', DOKU_PLUGIN."indexmenu/images"); | ||
|
||
|
@@ -428,7 +428,7 @@ private function _indexmenu($myns) { | |
// the toggle interacts with hide needed for js option. | ||
$output = "\n"; | ||
$output .= '<div><div id="nojs_'.$js_name.'" data-jsajax="'.utf8_encodeFN($js_opts['jsajax']).'" class="indexmenu_nojs">'."\n"; | ||
$output .= html_buildlist($data, 'idx', array($this, "_html_list_index"), "html_li_index"); | ||
$output .= html_buildlist($data, 'idx', array($this, "_html_list_index"), "tagListItem"); | ||
$output .= "</div></div>\n"; | ||
$output .= $output_tmp; | ||
return $output; | ||
|
@@ -617,13 +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 = ":.."; | ||
return resolve_id(getNS($id), $ns); | ||
//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; | ||
} | ||
|
||
/** | ||
|