2003-04-14 23:10:40 +00:00
|
|
|
<?
|
|
|
|
|
# The main wiki script and things like database
|
|
|
|
|
# conversion and maintenance scripts all share a
|
|
|
|
|
# common setup of including lots of classes and
|
|
|
|
|
# setting up a few globals.
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
global $IP;
|
|
|
|
|
include_once( "$IP/GlobalFunctions.php" );
|
|
|
|
|
include_once( "$IP/Namespace.php" );
|
|
|
|
|
include_once( "$IP/Skin.php" );
|
|
|
|
|
include_once( "$IP/OutputPage.php" );
|
|
|
|
|
include_once( "$IP/DifferenceEngine.php" );
|
|
|
|
|
include_once( "$IP/SearchEngine.php" );
|
|
|
|
|
include_once( "$IP/User.php" );
|
|
|
|
|
include_once( "$IP/LinkCache.php" );
|
|
|
|
|
include_once( "$IP/Title.php" );
|
|
|
|
|
include_once( "$IP/Article.php" );
|
2003-08-31 09:46:37 +00:00
|
|
|
include_once( "$IP/MagicWord.php" );
|
2003-08-30 09:39:34 +00:00
|
|
|
include_once( "$IP/MemCachedClient.inc.php" );
|
2003-09-01 13:13:56 +00:00
|
|
|
include_once( "$IP/Block.php" );
|
2003-08-11 13:53:20 +00:00
|
|
|
|
2003-04-14 23:10:40 +00:00
|
|
|
global $wgUser, $wgLang, $wgOut, $wgTitle;
|
|
|
|
|
global $wgArticle, $wgDeferredUpdateList, $wgLinkCache;
|
2003-08-31 09:46:37 +00:00
|
|
|
global $wgMemc, $wgMagicWords, $wgMwRedir;
|
2003-08-11 13:53:20 +00:00
|
|
|
|
|
|
|
|
class MemCachedClientforWiki extends MemCachedClient {
|
|
|
|
|
function _debug( $text ) {
|
|
|
|
|
wfDebug( "memcached: $text\n" );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$wgMemc = new MemCachedClientforWiki();
|
|
|
|
|
if( $wgUseMemCached ) {
|
|
|
|
|
$wgMemc->set_servers( $wgMemCachedServers );
|
2003-08-13 11:11:50 +00:00
|
|
|
$wgMemc->set_debug( $wgMemCachedDebug );
|
2003-08-11 13:53:20 +00:00
|
|
|
}
|
2003-04-14 23:10:40 +00:00
|
|
|
|
2003-08-30 09:39:34 +00:00
|
|
|
include_once( "$IP/Language.php" );
|
|
|
|
|
|
2003-04-14 23:10:40 +00:00
|
|
|
$wgOut = new OutputPage();
|
2003-08-31 09:46:37 +00:00
|
|
|
wfDebug( "\n\n" );
|
|
|
|
|
|
2003-04-14 23:10:40 +00:00
|
|
|
$wgLangClass = "Language" . ucfirst( $wgLanguageCode );
|
|
|
|
|
if( ! class_exists( $wgLangClass ) ) {
|
2003-08-30 09:39:34 +00:00
|
|
|
include_once( "$IP/LanguageUtf8.php" );
|
2003-04-14 23:10:40 +00:00
|
|
|
$wgLangClass = "LanguageUtf8";
|
|
|
|
|
}
|
|
|
|
|
$wgLang = new $wgLangClass();
|
|
|
|
|
|
2003-10-16 13:30:45 +00:00
|
|
|
if( !isset( $wgProfiling ) )
|
|
|
|
|
$wgProfiling = false;
|
|
|
|
|
|
|
|
|
|
if ( $wgProfiling ) {
|
|
|
|
|
include_once( "$IP/Profiling.php" );
|
|
|
|
|
} else {
|
|
|
|
|
function wfProfileIn( $fn ) {}
|
|
|
|
|
function wfProfileOut( $fn = "" ) {}
|
|
|
|
|
function wfGetProfilingOutput( $s, $e ) {}
|
|
|
|
|
function wfProfileClose() {}
|
|
|
|
|
}
|
|
|
|
|
|
2003-08-11 13:53:20 +00:00
|
|
|
$wgUser = User::loadFromSession();
|
2003-04-14 23:10:40 +00:00
|
|
|
$wgDeferredUpdateList = array();
|
|
|
|
|
$wgLinkCache = new LinkCache();
|
2003-08-31 09:46:37 +00:00
|
|
|
$wgMagicWords = array();
|
|
|
|
|
$wgMwRedir =& MagicWord::get( MAG_REDIRECT );
|
2003-04-14 23:10:40 +00:00
|
|
|
?>
|