diff options
author | Stephen Warren <swarren@wwwdotorg.org> | 2010-02-22 22:09:14 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2010-02-22 22:09:14 +0100 |
commit | 4fc51abc5736d818d029640029d3de0f8ab8cc15 (patch) | |
tree | 6c274942564eee63674b234fc87fb205e8856c58 | |
parent | f77ccdf72d9702956edd4917d261b908636fd690 (diff) | |
download | rpg-4fc51abc5736d818d029640029d3de0f8ab8cc15.tar.gz rpg-4fc51abc5736d818d029640029d3de0f8ab8cc15.tar.bz2 |
Omit do=show from URLs
It looks like when there is no "do=" parameter to doku.php, "show" is
assumed. When clean URLs are used (via mod_rewrite), regular
page-to-page links hence just link to "pagename". However, if you "Show
pagesource", then "Show page", the browser is sent back to
"pagename?do=show" instead of just "pagename". This seems like a "less
clean" URL to me.
So, the attached patch removes "do=show" from URLs in this case, so
cleaner URLs are used.
-rw-r--r-- | inc/template.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/template.php b/inc/template.php index df0c94437..f15b51694 100644 --- a/inc/template.php +++ b/inc/template.php @@ -630,7 +630,7 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ 'class="action source" accesskey="v" rel="nofollow"',1); } }else{ - $out .= tpl_link(wl($ID,'do=show'), + $out .= tpl_link(wl($ID,''), $pre.(($inner)?$inner:$lang['btn_show']).$suf, 'class="action show" accesskey="v" rel="nofollow"',1); } @@ -659,7 +659,7 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ break; case 'back': if ($parent = tpl_getparent($ID)) { - $out .= tpl_link(wl($parent,'do=show'), + $out .= tpl_link(wl($parent,''), $pre.(($inner)?$inner:$lang['btn_back']).$suf, 'class="action back" accesskey="b" rel="nofollow"',1); } |