1<?php 2/** 3 * DokuWiki mainscript 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Andreas Gohr <andi@splitbrain.org> 7 */ 8 9 //xdebug_start_profiling(); 10 11 if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__)).'/'); 12 require_once(DOKU_INC.'inc/init.php'); 13 require_once(DOKU_INC.'inc/common.php'); 14 require_once(DOKU_INC.'inc/html.php'); 15 require_once(DOKU_INC.'inc/parser.php'); 16 require_once(DOKU_INC.'lang/en/lang.php'); 17 require_once(DOKU_INC.'lang/'.$conf['lang'].'/lang.php'); 18 require_once(DOKU_INC.'inc/auth.php'); 19 require_once(DOKU_INC.'inc/actions.php'); 20 21 //import variables 22 $QUERY = trim($_REQUEST['id']); 23 $ID = cleanID($_REQUEST['id']); 24 $REV = $_REQUEST['rev']; 25 $ACT = $_REQUEST['do']; 26 $IDX = $_REQUEST['idx']; 27 $DATE = $_REQUEST['date']; 28 $RANGE = $_REQUEST['lines']; 29 $HIGH = $_REQUEST['s']; 30 if(empty($HIGH)) $HIGH = getGoogleQuery(); 31 32# $ACL_USER = urldecode($_REQUEST['acl_user']); 33# $ACL_SCOPE = urldecode($_REQUEST['acl_scope']); 34# $ACL_LEVEL = $_REQUEST['acl_level']; 35# $ACL_CHECKBOX = $_REQUEST['acl_checkbox']; 36 37 $TEXT = cleanText($_POST['wikitext']); 38 $PRE = cleanText($_POST['prefix']); 39 $SUF = cleanText($_POST['suffix']); 40 $SUM = $_REQUEST['summary']; 41 42 //sanitize revision 43 $REV = preg_replace('/[^0-9]/','',$REV); 44 45 //we accept the do param as HTTP header, too: 46 if(!empty($_SERVER['HTTP_X_DOKUWIKI_DO'])){ 47 $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO'])); 48 } 49 50 if(!empty($IDX)) $ACT='index'; 51 //set defaults 52 if(empty($ID)) $ID = $conf['start']; 53 if(empty($ACT)) $ACT = 'show'; 54 55 56 if($ACT == 'debug'){ 57 html_debug(); 58 exit; 59 } 60 61 //make infos about the selected page available 62 $INFO = pageinfo(); 63 64 act_dispatch($ACT); 65 66 //restore old umask 67 umask($conf['oldumask']); 68 69 //xdebug_dump_function_profile(3); 70?> 71