Source for file define.php
Documentation is available at define.php
* @subpackage config_files
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
//BE CAREFULL THIS FILE IS A SYSTEM FILE : use define_release.ini and define_db.ini for settings
/////////////////////////////////////
/////////////////////////////////////
if(strpos($_SERVER["SCRIPT_FILENAME"], 'admin') !== false) define('CURRENT_APP', 'admin');
else define('CURRENT_APP', 'public');
// $GLOBALS['APPS'] = array('admin', 'public');
$GLOBALS['authorized_theme_sections'] = array ('THEME_SETTINGS');
$GLOBALS['authorized_db_sections'] = array ('DATABASE');
$GLOBALS['authorized_release_sections'] = array ('LANGUAGE_SETTINGS','NOTIFICATION_SETTINGS','LOCALES_SETTINGS','MODULES_SETTINGS','DEBUG_SETTINGS', 'COMMENT_SETTINGS', 'SYSTEM_SETTINGS', 'SERVER_SETTINGS','MAIL_SETTINGS','MAIL_INFORMATIONS', 'SUPPORT_SETTINGS','LOGS_SETTINGS');
$GLOBALS['current_title'] = array(); // HTML <title> tag
$GLOBALS['links'] = array(); // Localized variables
$GLOBALS['filters'] = array(); // Localized (filters) variables
$GLOBALS['menuitems'] = array (
'workgroup-subscription',
// INI file to PHP Constants
include_once ("../class/class.config_file.php");
$CONFIG->initializeIniParams();
define('CURRENT_APP_URL', SITE_ROOT_URL. CURRENT_APP. '/');
define('THEME_ADMIN_PATH', "../". THEME_DIRECTORY. "/admin/". THEME_ADMIN. "/");
define('THEME_PUBLIC_PATH', "../". THEME_DIRECTORY. "/public/". THEME_PUBLIC. "/");
if(defined('MOD_DEBUG') && MOD_DEBUG == true) {
require_once('../class/system/PHP_Debug/dbg.conf.php');
require_once('../class/system/PHP_Debug/PHP/Debug.php');
$Dbg->addSetting($renderer, 'app_renderer_mode');
$Dbg->addSettings($options, 'app_settings');
$Dbg->add('Admin theme : <b>'. THEME_ADMIN. '</b> | Public theme : <b>'. THEME_PUBLIC . '</b>');
$debug_line = $Dbg->add('Pre-execute and includes');
// Bootstrap (common includes)
include_once("../config/server.php");
include_once("../lib/items.php");
include_once("../lib/lib_common.php");
include_once('../lib/lang.php');
include_once('../class/class.culture.php');
define('U_L', culture::getInstance()->getVar('current'));
// Include ONLY the desired language PRODUCTION mode
include(themePath('../languages/' . U_L. '/define.php'));
$GLOBALS['links'] = array_merge($GLOBALS['links'], $l10n_links);
$GLOBALS['filters'] = array_merge($GLOBALS['filters'], $l10n_filters);
// Plugins Init - Dispatcher + installed plugins
include_once("../lib/vendor/sfEventDispatcher/sfEventDispatcher.php");
$dispatcher = new sfEventDispatcher();
if(defined('MOD_PLUGINS') && MOD_PLUGINS == 1) {
include_once('../class/class.plugin.php');
if($plug->is_active()) $plug->loadPlugin();
* These globals have to be declared after $GLOBALS['links'] array.
$GLOBALS['multiSelect_includes'] = array('project|add', 'project|mod');
$GLOBALS['textboxList_includes'] = array('workshop|add', 'workshop|mod',
$GLOBALS['fancyUpload_includes'] = array('files');
// finally, we include user configuration file if exists
|