wiki.techinc.nl/includes/Setup.php
Lee Daniel Crocker d82c14fb4f Initial revision
2003-04-14 23:10:40 +00:00

37 lines
1 KiB
PHP

<?
# 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/Language.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" );
global $wgUser, $wgLang, $wgOut, $wgTitle;
global $wgArticle, $wgDeferredUpdateList, $wgLinkCache;
$wgOut = new OutputPage();
$wgLangClass = "Language" . ucfirst( $wgLanguageCode );
if( ! class_exists( $wgLangClass ) ) {
include_once( "$IP/Utf8Case.php" );
$wgLangClass = "LanguageUtf8";
}
$wgLang = new $wgLangClass();
$wgUser = new User();
$wgUser->loadFromSession();
$wgDeferredUpdateList = array();
$wgLinkCache = new LinkCache();
?>