-
Notifications
You must be signed in to change notification settings - Fork 24
/
exponent.php
85 lines (68 loc) · 2.29 KB
/
exponent.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
##################################################
#
# Copyright (c) 2004-2023 OIC Group, Inc.
#
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################
/** @define "BASE" "." */
/**
* The file that initializes everything
*
* @link http://www.gnu.org/licenses/gpl.txt GPL http://www.gnu.org/licenses/gpl.txt
* @package Exponent-CMS
*/
// Initialize the exponent environment
require_once('exponent_bootstrap.php');
// Initialize the MVC framework - for objects we need loaded now
require_once(BASE.'framework/core/expFramework.php');
// Initialize the Sessions subsystem
expSession::initialize();
// Initialize the Theme subsystem
expTheme::initialize();
// Initialize the language subsystem
expLang::initialize();
// Initialize the Database subsystem
$db = expDatabase::connect(DB_USER,DB_PASS,DB_HOST.':'.DB_PORT,DB_NAME);
// Initialize the Modules subsystem & Create the list of available/active controllers
$available_controllers = expModules::initializeControllers();
// Initialize the History (Flow) subsystem.
$history = new expHistory(); //<--This is the new flow subsystem
// Initialize the javascript subsystem
if (expJavascript::inAjaxAction())
set_error_handler('handleErrors');
// Validate the session and populate the $user variable
if ($db->havedb) {
$user = new user();
//the default user is anonymous?
// if (!expSession::loggedIn()) {
//TODO: Maxims initial anonymous user implementation, we need an anonymous user record
//user::login("anonymous", "anonymous");
// }
expSession::validate();
}
// The flag to use a mobile theme variation.
if (!defined('MOBILE')) {
if (defined('FORCE_MOBILE') && FORCE_MOBILE && $user->isAdmin()) {
define('MOBILE',true);
} else {
define('MOBILE',expTheme::is_mobile());
}
}
// Initialize permissions variables
$exponent_permissions_r = expSession::get("permissions");
// initialize the expRouter
$router = new expRouter();
// Initialize the navigation hierarchy
if ($db->havedb)
$sections = section::initializeNavigation();
?>