2004-02-28 03:04:02 +00:00
|
|
|
<?php
|
2006-01-13 17:33:37 +00:00
|
|
|
|
2006-07-14 05:35:31 +00:00
|
|
|
# Initialise common code
|
|
|
|
|
require_once( './includes/WebStart.php' );
|
2006-01-13 12:10:59 +00:00
|
|
|
|
2006-01-13 17:33:37 +00:00
|
|
|
# Initialize MediaWiki base class
|
|
|
|
|
require_once( "includes/Wiki.php" );
|
|
|
|
|
$mediaWiki = new MediaWiki();
|
2006-01-13 12:52:04 +00:00
|
|
|
|
2006-01-13 17:33:37 +00:00
|
|
|
wfProfileIn( 'main-misc-setup' );
|
|
|
|
|
OutputPage::setEncodings(); # Not really used yet
|
2005-12-29 20:46:25 +00:00
|
|
|
|
2006-01-13 17:33:37 +00:00
|
|
|
# Query string fields
|
|
|
|
|
$action = $wgRequest->getVal( 'action', 'view' );
|
|
|
|
|
$title = $wgRequest->getVal( 'title' );
|
2006-01-13 12:10:59 +00:00
|
|
|
|
2006-03-27 18:53:15 +00:00
|
|
|
#
|
|
|
|
|
# Send Ajax requests to the Ajax dispatcher.
|
|
|
|
|
#
|
|
|
|
|
if ( $wgUseAjax && $action == 'ajax' ) {
|
2006-07-26 23:35:49 +00:00
|
|
|
require_once( $IP . '/includes/AjaxDispatcher.php' );
|
2006-03-27 18:53:15 +00:00
|
|
|
|
|
|
|
|
$dispatcher = new AjaxDispatcher();
|
|
|
|
|
$dispatcher->performAction();
|
|
|
|
|
|
|
|
|
|
exit;
|
|
|
|
|
}
|
|
|
|
|
|
2006-01-13 17:33:37 +00:00
|
|
|
$wgTitle = $mediaWiki->checkInitialQueries( $title,$action,$wgOut, $wgRequest, $wgContLang );
|
2006-01-11 19:33:15 +00:00
|
|
|
if ($wgTitle == NULL) {
|
|
|
|
|
unset( $wgTitle );
|
2005-12-29 20:46:25 +00:00
|
|
|
}
|
|
|
|
|
|
2006-01-13 17:33:37 +00:00
|
|
|
wfProfileOut( 'main-misc-setup' );
|
|
|
|
|
|
2006-01-11 15:46:01 +00:00
|
|
|
# Setting global variables in mediaWiki
|
2006-01-15 23:07:19 +00:00
|
|
|
$mediaWiki->setVal( 'Server', $wgServer );
|
|
|
|
|
$mediaWiki->setVal( 'DisableInternalSearch', $wgDisableInternalSearch );
|
|
|
|
|
$mediaWiki->setVal( 'action', $action );
|
|
|
|
|
$mediaWiki->setVal( 'SquidMaxage', $wgSquidMaxage );
|
|
|
|
|
$mediaWiki->setVal( 'EnableDublinCoreRdf', $wgEnableDublinCoreRdf );
|
|
|
|
|
$mediaWiki->setVal( 'EnableCreativeCommonsRdf', $wgEnableCreativeCommonsRdf );
|
|
|
|
|
$mediaWiki->setVal( 'CommandLineMode', $wgCommandLineMode );
|
|
|
|
|
$mediaWiki->setVal( 'UseExternalEditor', $wgUseExternalEditor );
|
|
|
|
|
$mediaWiki->setVal( 'DisabledActions', $wgDisabledActions );
|
2006-01-11 13:28:23 +00:00
|
|
|
|
2006-01-13 17:33:37 +00:00
|
|
|
$wgArticle = $mediaWiki->initialize ( $wgTitle, $wgOut, $wgUser, $wgRequest );
|
2006-01-11 19:33:15 +00:00
|
|
|
$mediaWiki->finalCleanup ( $wgDeferredUpdateList, $wgLoadBalancer, $wgOut );
|
2006-01-13 17:33:37 +00:00
|
|
|
|
|
|
|
|
# Not sure when $wgPostCommitUpdateList gets set, so I keep this separate from finalCleanup
|
2006-01-11 15:46:01 +00:00
|
|
|
$mediaWiki->doUpdates( $wgPostCommitUpdateList );
|
2006-01-13 17:33:37 +00:00
|
|
|
|
2006-01-11 15:46:01 +00:00
|
|
|
$mediaWiki->restInPeace( $wgLoadBalancer );
|
2004-02-28 03:04:02 +00:00
|
|
|
?>
|