summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2013-03-08 18:15:02 +0100
committerMichael Hamann <michael@content-space.de>2013-03-08 18:15:02 +0100
commit4e90caaad144f84c8a9e59ddd3ba38a52135e1ad (patch)
tree921fbaf5df98dc29e016a5977880e8efe614e466 /inc/pageutils.php
parent5721a1547938df76003c6d91ea003dc1c70abd94 (diff)
downloadrpg-4e90caaad144f84c8a9e59ddd3ba38a52135e1ad.tar.gz
rpg-4e90caaad144f84c8a9e59ddd3ba38a52135e1ad.tar.bz2
Redirect only in the show action to namespace start pages FS#2743
When the current page id ends with ":" (or "/" with useslash enabled) DokuWiki tries to find the start page of namespaces automatically and then redirects to this page. The target of the redirect is always the show action regardless if the current request contains another action or is an ajax request. In practice you can get this problem when your search query ends with ":" (e.g. because you want to match a namespace), then you are redirected to the show action. This change completely disables the redirect when $ACT is undefined or the current action is not "show".
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r--inc/pageutils.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index ca4936a82..5043d2263 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -21,6 +21,7 @@
function getID($param='id',$clean=true){
global $INPUT;
global $conf;
+ global $ACT;
$id = $INPUT->str($param);
@@ -75,7 +76,7 @@ function getID($param='id',$clean=true){
// fall back to default
$id = $id.$conf['start'];
}
- send_redirect(wl($id,'',true));
+ if (isset($ACT) && $ACT === 'show') send_redirect(wl($id,'',true));
}
if($clean) $id = cleanID($id);