new file and folder icons
[elgg.git] / includes_system.php
blobf6e2331d0ca496a3c3dba0d42e043a442ecd2b4a
1 <?php
3 // ELGG system includes
5 /***************************************************************************
6 * INSERT SYSTEM UNITS HERE
7 * You should ideally not edit this file.
8 ****************************************************************************/
13 // Sanity checks - conditions under which Elgg will refuse to run
14 // TODO - this'll no doubt want polishing and gettexting :) - Sven
16 $diemessages = array();
18 if (!defined("path") || (substr(path, -1) != "/")) {
19 $diemessages[] = "Configuration problem: The 'path' setting in includes.php must end with a forward slash (/).";
21 if (!defined("url") || (substr(url, -1) != "/")) {
22 $diemessages[] = "Configuration problem: The 'url' setting in includes.php must end with a forward slash (/).";
24 if (ini_get('register_globals')) {
25 // this shouldn't be needed due to the htaccess file, but just in case...
26 $diemessages[] = "
27 Configuration problem: The PHP setting 'register_globals', which is a huge security risk, is turned on.
28 There should be a line in the .htaccess file as follows: <code>php_flag register_globals off</code>
31 if (!ini_get('magic_quotes_gpc')) {
32 // this shouldn't be needed due to the htaccess file, but just in case...
33 $diemessages[] = "
34 Configuration problem: The PHP setting 'magic_quotes_gpc' is turned off.
35 There should be a line in the .htaccess file as follows: <code>php_flag magic_quotes_gpc on</code>
38 if (!function_exists('mysql_query')) {
39 // people have been having a spot of trouble installing elgg without the mysql php module...
40 $diemessages[] = "
41 Installation problem: Can't find the PHP MySQL module.
42 Even with PHP and MySQL installed, sometimes the module to connect them is missing.
43 Please check your PHP installation.
48 if (count($diemessages)) {
49 $diebody = '<html><body><h1>Error - Elgg cannot run</h1><ul>';
50 $diebody .= '<li>' . implode("</li><li>", $diemessages) . '</li>';
51 $diebody .= '</ul><p>Please read the INSTALL file for more information.</p></body></html>';
52 die($diebody);
53 } else {
54 unset($diemessages);
60 if (!defined("ELGG_DEBUG")) {
61 define("ELGG_DEBUG", false);
63 if (ELGG_DEBUG === true) {
64 error_reporting(E_ALL ^ E_NOTICE);
65 ini_set("display_errors", true);
71 // Plug-in engine (must be loaded first)
72 require(path . "units/engine/main.php");
73 // Language / internationalisation
74 require(path . "units/gettext/main.php");
75 // Database
76 require(path . "units/db/main.php");
77 // Display
78 require(path . "units/display/main.php");
79 // Users
80 require(path . "units/users/main.php");
81 // Templates
82 require(path . "units/templates/main.php");
83 // Edit permissions
84 require(path . "units/permissions/main.php");
86 // User icons
87 include(path . "units/icons/main.php");
88 // Profiles
89 include(path . "units/profile/main.php");
91 // Weblog
92 include(path . "units/weblogs/main.php");
94 // File repository
95 include(path . "units/files/main.php");
97 // Communities
98 require(path . "units/communities/main.php");
100 // Friends
101 include(path . "units/friends/main.php");
102 // Friend groups
103 include(path . "units/groups/main.php");
105 // 'Your network'
106 require(path . "units/network/main.php");
108 // Search
109 require(path . "units/search/main.php");
111 // Invite-a-friend
112 require(path . "units/invite/main.php");
114 // Admin system
115 require(path . "units/admin/main.php");
117 // XML parsing
118 require(path . "units/xml/main.php");
120 // Your Resources
121 require(path . "units/magpie/main.php");