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