Skip to content

Commit

Permalink
Encode the provided top-level NS with utf8_encodeFN() (as is done in …
Browse files Browse the repository at this point in the history
…a couple of dozen other places in DW). Thanks to Ryuu and tosmatt.
  • Loading branch information
samwilson committed Jun 20, 2013
1 parent d36b62c commit f9dafbc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion syntax.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,21 @@ function _makecombo($dest_ns) {
return $ret;
}

/**
* Get a list of namespaces below the given namespace.
* Recursively fetches subnamespaces.
*
* Includes inc/search.php
* @global array $conf Site configuration variables
* @uses utf8_encodeFN
* @param string $tns The top namespace
* @return array Multi-dimensional array of all namespaces below $tns
*/
function _getnslist($tns = '') {
require_once(DOKU_INC . 'inc/search.php');
global $conf;
if ($tns == '') $tns = $conf['datadir'];
if (!is_dir($tns)) $tns = str_replace(':', '/', $tns);
if (!is_dir($tns)) $tns = utf8_encodeFN(str_replace(':', '/', $tns));
$data = array();
$exclude = $this->getConf('addpage_exclude');

Expand Down

0 comments on commit f9dafbc

Please sign in to comment.