root/releases/0.672/includes.php

Revision 742, 3.8 kB (checked in by sven, 2 years ago)

very rudimentary memcached experiment

  • Property svn:eol-style set to native
Line 
1 <?php
2
3     // error_reporting(E_ERROR | E_WARNING | E_PARSE);
4
5     // All installation specific parameters should be in a file
6     // that is not part of the standard distribution.
7         if (!file_exists(dirname(__FILE__)."/config.php")) {
8             die('Elgg configuration error: config.php is missing. Please see INSTALL file.');
9         }
10         require_once(dirname(__FILE__)."/config.php");
11
12     // Check for .htaccess
13         if (!file_exists(dirname(__FILE__)."/.htaccess")) {
14             die('Elgg configuration error: .htaccess is missing. Please see INSTALL file.');
15         }
16
17     // Check config values make sense
18         require_once(dirname(__FILE__).'/sanitychecks.php');
19
20     /***************************************************************************
21     *    HELPER LIBRARIES
22     ****************************************************************************/
23
24     // Load cache lib
25         require_once($CFG->dirroot.'lib/cache/lib.php');
26
27     // Load datalib
28         require_once($CFG->dirroot.'lib/datalib.php');
29
30     // Load elgglib
31         require_once($CFG->dirroot.'lib/elgglib.php');
32
33     // Load constants
34         require_once($CFG->dirroot.'lib/constants.php');
35
36     /***************************************************************************
37     *    CORE FUNCTIONALITY LIBRARIES
38     ****************************************************************************/
39
40     // Load setup.php which will initialize database connections and such like.
41         require_once($CFG->dirroot.'lib/setup.php');
42
43     // Load required system files: do not edit this line.
44         require_once(dirname(__FILE__)."/includes_system.php");
45
46     // User functions
47         require_once($CFG->dirroot.'lib/userlib.php');
48
49     // Check database
50         require_once($CFG->dirroot.'lib/dbsetup.php');
51
52     /***************************************************************************
53     *    PLUGIN INITIALISATION
54     ****************************************************************************/
55
56     // XMLRPC
57         @include($CFG->dirroot . "units/rpc/main.php");
58
59         if ($allmods = get_list_of_plugins('mod') ) {
60             foreach ($allmods as $mod) {
61                 $mod_init = $mod . '_init';
62                 if (function_exists($mod_init)) {
63                     $mod_init();
64                    }
65            }
66         }
67
68     /***************************************************************************
69     *    CONTENT MODULES
70     *    This should make languages easier, although some kind of
71     *    selection process will be required
72     ****************************************************************************/
73
74     // General
75         include_once($CFG->dirroot . "content/general/main.php");
76     // Main index
77         include_once($CFG->dirroot . "content/mainindex/main.php");
78     // User-related
79         include_once($CFG->dirroot . "content/users/main.php");
80
81     /***************************************************************************
82     *    HELP MODULES
83     ****************************************************************************/
84
85     // Include main
86         include_once($CFG->dirroot . "help/mainindex/main.php");
87
88     // Visual editor (tinyMCE)
89         @include($CFG->dirroot . "units/tinymce/main.php");
90
91     // Calendaring system
92     //    require($CFG->dirroot . "units/calendar/main.php");
93
94     /***************************************************************************
95     *    START-OF-PAGE RUNNING
96     ****************************************************************************/
97
98         run("init");
99
100     // Walled garden checking: if we're not logged in,
101     // and walled garden functionality is turned on, redirect to
102     // the logon screen
103         if (!empty($CFG->walledgarden) && (context != "external" || !defined("context")) && !logged_on) {
104             header("Location: " . $CFG->wwwroot . "login/index.php");
105             exit();
106         }
107
108 ?>
109
Note: See TracBrowser for help on using the browser.