Initial revision
[lhc/web/wiklou.git] / includes / Setup.php
1 <?
2 # The main wiki script and things like database
3 # conversion and maintenance scripts all share a
4 # common setup of including lots of classes and
5 # setting up a few globals.
6 #
7
8 global $IP;
9 include_once( "$IP/GlobalFunctions.php" );
10 include_once( "$IP/Language.php" );
11 include_once( "$IP/Namespace.php" );
12 include_once( "$IP/Skin.php" );
13 include_once( "$IP/OutputPage.php" );
14 include_once( "$IP/DifferenceEngine.php" );
15 include_once( "$IP/SearchEngine.php" );
16 include_once( "$IP/User.php" );
17 include_once( "$IP/LinkCache.php" );
18 include_once( "$IP/Title.php" );
19 include_once( "$IP/Article.php" );
20
21 global $wgUser, $wgLang, $wgOut, $wgTitle;
22 global $wgArticle, $wgDeferredUpdateList, $wgLinkCache;
23
24 $wgOut = new OutputPage();
25 $wgLangClass = "Language" . ucfirst( $wgLanguageCode );
26 if( ! class_exists( $wgLangClass ) ) {
27 include_once( "$IP/Utf8Case.php" );
28 $wgLangClass = "LanguageUtf8";
29 }
30 $wgLang = new $wgLangClass();
31
32 $wgUser = new User();
33 $wgUser->loadFromSession();
34 $wgDeferredUpdateList = array();
35 $wgLinkCache = new LinkCache();
36
37 ?>