2005-01-12 21:24:54 +01:00
|
|
|
<?php
|
2005-01-14 17:40:57 +01:00
|
|
|
/**
|
|
|
|
* DokuWiki mainscript
|
|
|
|
*
|
|
|
|
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
|
|
|
|
* @author Andreas Gohr <andi@splitbrain.org>
|
|
|
|
*/
|
2005-02-19 11:20:55 +01:00
|
|
|
|
|
|
|
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__)).'/');
|
|
|
|
require_once(DOKU_INC.'inc/init.php');
|
|
|
|
require_once(DOKU_INC.'inc/common.php');
|
|
|
|
require_once(DOKU_INC.'inc/html.php');
|
|
|
|
require_once(DOKU_INC.'inc/parser.php');
|
|
|
|
require_once(DOKU_INC.'lang/en/lang.php');
|
|
|
|
require_once(DOKU_INC.'lang/'.$conf['lang'].'/lang.php');
|
|
|
|
require_once(DOKU_INC.'inc/auth.php');
|
2005-03-06 19:31:59 +01:00
|
|
|
require_once(DOKU_INC.'inc/actions.php');
|
2005-01-12 21:24:54 +01:00
|
|
|
|
|
|
|
//import variables
|
|
|
|
$QUERY = trim($_REQUEST['id']);
|
|
|
|
$ID = cleanID($_REQUEST['id']);
|
|
|
|
$REV = $_REQUEST['rev'];
|
|
|
|
$ACT = $_REQUEST['do'];
|
|
|
|
$IDX = $_REQUEST['idx'];
|
|
|
|
$DATE = $_REQUEST['date'];
|
|
|
|
$RANGE = $_REQUEST['lines'];
|
|
|
|
$HIGH = $_REQUEST['s'];
|
|
|
|
if(empty($HIGH)) $HIGH = getGoogleQuery();
|
2005-02-20 11:45:06 +01:00
|
|
|
|
|
|
|
# $ACL_USER = urldecode($_REQUEST['acl_user']);
|
|
|
|
# $ACL_SCOPE = urldecode($_REQUEST['acl_scope']);
|
|
|
|
# $ACL_LEVEL = $_REQUEST['acl_level'];
|
|
|
|
# $ACL_CHECKBOX = $_REQUEST['acl_checkbox'];
|
2005-01-12 21:24:54 +01:00
|
|
|
|
|
|
|
$TEXT = cleanText($_POST['wikitext']);
|
|
|
|
$PRE = cleanText($_POST['prefix']);
|
|
|
|
$SUF = cleanText($_POST['suffix']);
|
|
|
|
$SUM = $_REQUEST['summary'];
|
|
|
|
|
2005-03-01 19:16:38 +01:00
|
|
|
//sanitize revision
|
|
|
|
$REV = preg_replace('/[^0-9]/','',$REV);
|
|
|
|
|
2005-01-12 21:24:54 +01:00
|
|
|
//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 defaults
|
|
|
|
if(empty($ID)) $ID = $conf['start'];
|
|
|
|
if(empty($ACT)) $ACT = 'show';
|
|
|
|
|
|
|
|
|
|
|
|
if($ACT == 'debug'){
|
|
|
|
html_debug();
|
|
|
|
exit;
|
|
|
|
}
|
2005-02-26 14:33:25 +01:00
|
|
|
|
|
|
|
//make infos about the selected page available
|
|
|
|
$INFO = pageinfo();
|
2005-01-12 21:24:54 +01:00
|
|
|
|
2005-03-06 19:31:59 +01:00
|
|
|
act_dispatch($ACT);
|
2005-01-29 12:36:21 +01:00
|
|
|
|
|
|
|
//restore old umask
|
|
|
|
umask($conf['oldumask']);
|
2005-01-12 21:24:54 +01:00
|
|
|
?>
|