diff options
author | Tom N Harris <tnharris@whoopdedo.org> | 2011-03-14 20:39:30 -0400 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-11-18 20:11:43 +0100 |
commit | 3755fc25fd2934f8d887f713a48b342ef252cfee (patch) | |
tree | bfb08bd89e821dc0f1e7be87057efea2808fb0e8 | |
parent | c786a1b6200b051466db67a1791f46bbd375bb3b (diff) | |
download | rpg-3755fc25fd2934f8d887f713a48b342ef252cfee.tar.gz rpg-3755fc25fd2934f8d887f713a48b342ef252cfee.tar.bz2 |
Combine subsequent calls to strtr into a single transformation
-rw-r--r-- | inc/pageutils.php | 5 | ||||
-rw-r--r-- | inc/parser/renderer.php | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index ef82eebcd..ca4936a82 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -115,11 +115,10 @@ function cleanID($raw_id,$ascii=false,$media=false){ $id = utf8_strtolower($id); //alternative namespace seperator - $id = strtr($id,';',':'); if($conf['useslash']){ - $id = strtr($id,'/',':'); + $id = strtr($id,';/','::'); }else{ - $id = strtr($id,'/',$sepchar); + $id = strtr($id,';/',':'.$sepchar); } if($conf['deaccent'] == 2 || $ascii) $id = utf8_romanize($id); diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index 2c78f220a..7df369478 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -274,9 +274,10 @@ class Doku_Renderer extends DokuWiki_Plugin { list($name,$hash) = explode('#',$name,2); if($hash) return $hash; - $name = strtr($name,';',':'); if($conf['useslash']){ - $name = strtr($name,'/',':'); + $name = strtr($name,';/',';:'); + }else{ + $name = strtr($name,';',':'); } return noNSorNS($name); |