5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author Andreas Gohr <andi@splitbrain.org>
9 // xdebug_start_profiling();
11 if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__
).'/');
13 if (isset($_SERVER['HTTP_X_DOKUWIKI_DO'])){
14 $ACT = trim(strtolower($_SERVER['HTTP_X_DOKUWIKI_DO']));
15 } elseif (!empty($IDX)) {
17 } elseif (isset($_REQUEST['do'])) {
18 $ACT = $_REQUEST['do'];
23 require_once(DOKU_INC
.'inc/init.php');
24 require_once(DOKU_INC
.'inc/common.php');
25 require_once(DOKU_INC
.'inc/events.php');
26 require_once(DOKU_INC
.'inc/pageutils.php');
27 require_once(DOKU_INC
.'inc/html.php');
28 require_once(DOKU_INC
.'inc/auth.php');
29 require_once(DOKU_INC
.'inc/actions.php');
32 $QUERY = trim($_REQUEST['id']);
35 $REV = $_REQUEST['rev'];
36 $IDX = $_REQUEST['idx'];
37 $DATE = $_REQUEST['date'];
38 $RANGE = $_REQUEST['lines'];
39 $HIGH = $_REQUEST['s'];
40 if(empty($HIGH)) $HIGH = getGoogleQuery();
42 $TEXT = cleanText($_POST['wikitext']);
43 $PRE = cleanText($_POST['prefix']);
44 $SUF = cleanText($_POST['suffix']);
45 $SUM = $_REQUEST['summary'];
48 $REV = preg_replace('/[^0-9]/','',$REV);
50 //make infos about the selected page available
53 //export minimal infos to JS, plugins can add more
55 $JSINFO['namespace'] = (string) $INFO['namespace'];
59 if($conf['allowdebug'] && $ACT == 'debug'){
64 //send 404 for missing pages if configured or ID has special meaning to bots
65 if(!$INFO['exists'] &&
66 ($conf['send404'] ||
preg_match('/^(robots\.txt|sitemap\.xml(\.gz)?|favicon\.ico|crossdomain\.xml)$/',$ID)) &&
67 ($ACT == 'show' ||
substr($ACT,0,7) == 'export_') ){
68 header('HTTP/1.0 404 Not Found');
71 //prepare breadcrumbs (initialize a static var)
72 if ($conf['breadcrumbs']) breadcrumbs();
75 checkUpdateMessages();
77 $tmp = array(); // No event data
78 trigger_event('DOKUWIKI_STARTED',$tmp);
81 session_write_close();
86 $tmp = array(); // No event data
87 trigger_event('DOKUWIKI_DONE', $tmp);
89 // xdebug_dump_function_profile(1);