From ab24fc7f2b46da9840c7a6a441c67d433f32a28e Mon Sep 17 00:00:00 2001 From: Adrian Lang Date: Fri, 23 Oct 2009 10:56:01 +0200 Subject: Remove (unset) action param from AUTH_LOGIN_CHECK data, init $ACL before firing the event darcs-hash:20091023085601-e4919-5c800a07bcf70c34720a39e7bca9a1250b973b32.gz --- doku.php | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'doku.php') 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(); -- cgit v1.2.3