Skip to content
Snippets Groups Projects
Commit 4fc51abc authored by Stephen Warren's avatar Stephen Warren Committed by Andreas Gohr
Browse files

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.
parent f77ccdf7
No related branches found
No related tags found
No related merge requests found
...@@ -630,7 +630,7 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ ...@@ -630,7 +630,7 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){
'class="action source" accesskey="v" rel="nofollow"',1); 'class="action source" accesskey="v" rel="nofollow"',1);
} }
}else{ }else{
$out .= tpl_link(wl($ID,'do=show'), $out .= tpl_link(wl($ID,''),
$pre.(($inner)?$inner:$lang['btn_show']).$suf, $pre.(($inner)?$inner:$lang['btn_show']).$suf,
'class="action show" accesskey="v" rel="nofollow"',1); 'class="action show" accesskey="v" rel="nofollow"',1);
} }
...@@ -659,7 +659,7 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ ...@@ -659,7 +659,7 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){
break; break;
case 'back': case 'back':
if ($parent = tpl_getparent($ID)) { if ($parent = tpl_getparent($ID)) {
$out .= tpl_link(wl($parent,'do=show'), $out .= tpl_link(wl($parent,''),
$pre.(($inner)?$inner:$lang['btn_back']).$suf, $pre.(($inner)?$inner:$lang['btn_back']).$suf,
'class="action back" accesskey="b" rel="nofollow"',1); 'class="action back" accesskey="b" rel="nofollow"',1);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment