root/releases/0.65/includes.php

Revision 482, 3.2 kB (checked in by ben, 2 years ago)

.htaccess has been renamed to htaccess-dist for distribution. Added check to includes.php (with warning to see the INSTALL file if .htaccess is not found), and notes to both INSTALL and QUICKINSTALL.

  • 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     // Load datalib
21         require_once($CFG->dirroot.'lib/datalib.php');
22
23     // Load elgglib
24         require_once($CFG->dirroot.'lib/elgglib.php');
25
26     // Load setup.php which will initialize database connections and such like.
27         require_once($CFG->dirroot.'lib/setup.php');
28
29     // Load required system files: do not edit this line.
30         require_once(dirname(__FILE__)."/includes_system.php");
31
32     // Load constants
33         require_once($CFG->dirroot.'lib/constants.php');
34         
35     // Check database
36         require_once($CFG->dirroot.'lib/dbsetup.php');
37
38     /***************************************************************************
39     *    INSERT PLUGINS HERE
40     *    Eventually this should be replaced with plugin autodiscovery
41     ****************************************************************************/
42         
43     // XMLRPC
44     //    @include($CFG->dirroot . "units/rpc/main.php");
45     
46     /***************************************************************************
47     *    CONTENT MODULES
48     *    This should make languages easier, although some kind of
49     *    selection process will be required
50     ****************************************************************************/
51         
52     // General
53         include_once($CFG->dirroot . "content/general/main.php");
54     // Main index
55         include_once($CFG->dirroot . "content/mainindex/main.php");
56     // User-related
57         include_once($CFG->dirroot . "content/users/main.php");
58     
59     /***************************************************************************
60     *    HELP MODULES
61     ****************************************************************************/
62         
63     // Include main
64         include_once($CFG->dirroot . "help/mainindex/main.php");
65         
66     // Visual editor (tinyMCE)
67         @include($CFG->dirroot . "units/tinymce/main.php");
68     
69     // Calendaring system
70     //    require($CFG->dirroot . "units/calendar/main.php");
71     
72     /***************************************************************************
73     *    START-OF-PAGE RUNNING
74     ****************************************************************************/
75     
76         run("init");
77         
78     // Walled garden checking: if we're not logged in,
79     // and walled garden functionality is turned on, redirect to
80     // the logon screen
81         if (!empty($CFG->walledgarden) && context != "login" && !logged_on) {
82             
83             header("Location: " . $CFG->wwwroot . "login/index.php");
84             exit();
85             
86         }
87         
88 ?>
Note: See TracBrowser for help on using the browser.