diff options
author | andi <andi@splitbrain.org> | 2005-04-29 22:53:20 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-29 22:53:20 +0200 |
commit | 6c7843b5addbca9ae2dc1d9d19be8d67663eb8e5 (patch) | |
tree | a9a3f0f481e32f2ce5cb3b256b25b5f482b0b777 /inc/common.php | |
parent | 093ec9e4fcc037744441b83e6ab1a7193c258f96 (diff) | |
download | rpg-6c7843b5addbca9ae2dc1d9d19be8d67663eb8e5.tar.gz rpg-6c7843b5addbca9ae2dc1d9d19be8d67663eb8e5.tar.bz2 |
added internal rewriting
darcs-hash:20050429205320-9977f-6bf54f3b022104a0a9aefa882dfba09a98bc9c2a.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/inc/common.php b/inc/common.php index 8cfe4eea8..84c6bded4 100644 --- a/inc/common.php +++ b/inc/common.php @@ -183,6 +183,9 @@ function idfilter($id,$ue=true){ /** * This builds a link to a wikipage * + * It handles URL rewriting and adds additional parameter if + * given in $more + * * @author Andreas Gohr <andi@splitbrain.org> */ function wl($id='',$more='',$abs=false){ @@ -196,12 +199,15 @@ function wl($id='',$more='',$abs=false){ $xlink = DOKU_BASE; } - if(!$conf['userewrite']){ - $xlink .= DOKU_SCRIPT.'?id='.$id; - if($more) $xlink .= '&'.$more; - }else{ + if($conf['userewrite'] == 2){ + $xlink .= DOKU_SCRIPT.'/'.$id; + if($more) $xlink .= '?'.$more; + }elseif($conf['userewrite']){ $xlink .= $id; if($more) $xlink .= '?'.$more; + }else{ + $xlink .= DOKU_SCRIPT.'?id='.$id; + if($more) $xlink .= '&'.$more; } return $xlink; |