summaryrefslogtreecommitdiff
path: root/doku.php
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2009-10-23 10:56:01 +0200
committerAdrian Lang <lang@cosmocode.de>2009-10-23 10:56:01 +0200
commitab24fc7f2b46da9840c7a6a441c67d433f32a28e (patch)
tree983ae918524b70e329d104ea017f4c4e0928958a /doku.php
parenta0fe6e280288f42911535b6790f72e27a16f5113 (diff)
downloadrpg-ab24fc7f2b46da9840c7a6a441c67d433f32a28e.tar.gz
rpg-ab24fc7f2b46da9840c7a6a441c67d433f32a28e.tar.bz2
Remove (unset) action param from AUTH_LOGIN_CHECK data, init $ACL before firing the event
darcs-hash:20091023085601-e4919-5c800a07bcf70c34720a39e7bca9a1250b973b32.gz
Diffstat (limited to 'doku.php')
-rw-r--r--doku.php21
1 files changed, 11 insertions, 10 deletions
diff --git a/doku.php b/doku.php
index 2ee9badc0..ef5db0f13 100644
--- a/doku.php
+++ b/doku.php
@@ -9,6 +9,17 @@
// xdebug_start_profiling();
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/');
+
+if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){
+ $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
+} elseif (!empty($IDX)) {
+ $ACT = 'index';
+} elseif (isset($_REQUEST['do'])) {
+ $ACT = $_REQUEST['do'];
+} else {
+ $ACT = 'show';
+}
+
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/events.php');
@@ -22,7 +33,6 @@ $QUERY = trim($_REQUEST['id']);
$ID = getID();
$NS = getNS($ID);
$REV = $_REQUEST['rev'];
-$ACT = $_REQUEST['do'];
$IDX = $_REQUEST['idx'];
$DATE = $_REQUEST['date'];
$RANGE = $_REQUEST['lines'];
@@ -37,15 +47,6 @@ $SUM = $_REQUEST['summary'];
//sanitize revision
$REV = preg_replace('/[^0-9]/','',$REV);
-//we accept the do param as HTTP header, too:
-if(!empty($_SERVER['HTTP_X_DOKUWIKI_DO'])){
- $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
-}
-
-if(!empty($IDX)) $ACT='index';
-//set default #FIXME not needed here? done in actions?
-if(empty($ACT)) $ACT = 'show';
-
//make infos about the selected page available
$INFO = pageinfo();