diff options
author | Adrian Lang <lang@cosmocode.de> | 2010-07-01 13:02:28 +0200 |
---|---|---|
committer | Adrian Lang <lang@cosmocode.de> | 2010-07-01 13:02:28 +0200 |
commit | 9708106bad6f238d9aeaccc35258350a66604a6c (patch) | |
tree | c8c14e3f3ad2522bf32947b2725001b396f03719 | |
parent | b26cdbbe55ab83f30ecba9deee8b3541cb005a88 (diff) | |
download | rpg-9708106bad6f238d9aeaccc35258350a66604a6c.tar.gz rpg-9708106bad6f238d9aeaccc35258350a66604a6c.tar.bz2 |
Fix ns: and ns:start handling
-rw-r--r-- | inc/pageutils.php | 4 | ||||
-rw-r--r-- | inc/parser/renderer.php | 14 |
2 files changed, 5 insertions, 13 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index a2efdc5d5..969a6ea0d 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -185,10 +185,10 @@ function noNSorNS($id) { global $conf; $p = noNS($id); - if ($p == $conf['start']) { + if ($p == $conf['start'] || $p == false) { $p = curNS($id); if ($p == false) { - return noNS($id); + return $conf['start']; } } return $p; diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 4dac75d21..7e52cfce2 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -271,20 +271,12 @@ class Doku_Renderer extends DokuWiki_Plugin { list($name,$hash) = explode('#',$name,2); if($hash) return $hash; - //trim colons or slash of a namespace link - $name = rtrim($name,':'); - if($conf['useslash']) - $name = rtrim($name,'/'); - + $name = strtr($name,';',':'); if($conf['useslash']){ - $nssep = '[:;/]'; - }else{ - $nssep = '[:;]'; + $name = strtr($name,'/',':'); } - $name = preg_replace('!.*'.$nssep.'!','',$name); - if(!$name) return $this->_simpleTitle($conf['start']); - return $name; + return noNSorNS($name); } /** |