Skip to content

Commit

Permalink
Updates/removes comments regarding loading of system constants
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Jan 26, 2015
1 parent d759610 commit b5733a2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 22 deletions.
3 changes: 2 additions & 1 deletion exponent.php
Expand Up @@ -52,7 +52,8 @@
$history = new expHistory(); //<--This is the new flow subsystem

// Initialize the javascript subsystem
if (expJavascript::inAjaxAction()) set_error_handler('handleErrors');
if (expJavascript::inAjaxAction())
set_error_handler('handleErrors');

// Validate the session and populate the $user variable
if ($db->havedb) {
Expand Down
4 changes: 2 additions & 2 deletions exponent_bootstrap.php
Expand Up @@ -59,7 +59,7 @@ function __realpath($path) {
require_once(dirname(__realpath(__FILE__)) . '/exponent_constants.php');

// load the code version
require_once(BASE.'exponent_version.php');
require_once(BASE . 'exponent_version.php');

/*
* EXPONENT Constant
Expand All @@ -69,7 +69,7 @@ function __realpath($path) {
*/
define('EXPONENT', EXPONENT_VERSION_MAJOR);

// load the constants from the global config, theme config, and then default config settings
// load the constants from the global config and then default config settings
require_once(BASE . 'framework/core/subsystems/expSettings.php'); // we don't have our autoloader loaded yet

// Process PHP-wrapper settings (ini_sets and settings, and autoloader)
Expand Down
12 changes: 7 additions & 5 deletions exponent_constants.php
Expand Up @@ -486,22 +486,19 @@
* The relative path to Exponent's core javascript.
*/
define('JS_RELATIVE', PATH_RELATIVE . 'framework/core/assets/js/');
// define('JS_PATH',PATH_RELATIVE.'framework/core/assets/js/'); //TODO deprecated
/** exdoc
* The absolute url to Exponent's core javascript.
*/
define('JS_URL', URL_FULL . 'framework/core/assets/js/');
// define('JS_FULL',URL_FULL.'framework/core/assets/js/'); //TODO deprecated
}

/**
* YUI 3 Version Constants
* Changing the version here lets Exponent adjust where to look
*/
if (!defined('YUI3_RELATIVE')) {
define('YUI3_VERSION', '3.17.2');
define('YUI3_VERSION', '3.18.1');
define('YUI3_RELATIVE', PATH_RELATIVE . 'external/yui/' . YUI3_VERSION . '/build/');
// define('YUI3_PATH', PATH_RELATIVE.'external/yui/'.YUI3_VERSION.'/build/'); //TODO deprecated
define('YUI3_URL', URL_FULL . 'external/yui/' . YUI3_VERSION . '/build/');
}

Expand All @@ -512,7 +509,6 @@
if (!defined('YUI2_RELATIVE')) {
define('YUI2_VERSION', '2.9.0');
define('YUI2_RELATIVE', PATH_RELATIVE . 'external/yui/2in3/dist/' . YUI2_VERSION . '/build/');
// define('YUI2_PATH', PATH_RELATIVE.'external/yui/2in3/dist/'.YUI2_VERSION.'/build/'); //TODO deprecated
define('YUI2_URL', URL_FULL . 'external/yui/2in3/dist/' . YUI2_VERSION . '/build/');
}

Expand All @@ -537,6 +533,12 @@
// define('JQUERYUI_SCRIPT', JQUERY_RELATIVE.'js/jquery-ui-'.JQUERYUI_VERSION.'.custom.min.js');
define('JQUERYUI_SCRIPT', JQUERY_RELATIVE . 'js/jquery-ui.min.js');
} // local jQueryUI script
if (!defined('JQUERYUI_THEME')) {
define('JQUERYUI_THEME', 'exponent');
} // jQueryUI theme
if (!defined('JQUERYUI_CSS')) {
define('JQUERYUI_CSS', JQUERY_RELATIVE . 'css/' . JQUERYUI_THEME . '/jquery-ui.min.css');
} // local jQueryUI stylesheet
}

/**
Expand Down
1 change: 0 additions & 1 deletion exponent_version.php
Expand Up @@ -20,7 +20,6 @@
// the RELEASE constant is changed by the build scripts at code freeze
define('RELEASE','%%RELEASE%%');
if (RELEASE != '%%RELEASE%%') {

/* exdoc
* This is the major version number of Exponent; the 1 in 1.96.2-beta3
*/
Expand Down
3 changes: 1 addition & 2 deletions framework/core/subsystems/expSettings.php
Expand Up @@ -50,8 +50,7 @@ function exponent_unhtmlentities($str)
@include_once(BASE . "framework/conf/config.php");
if (!defined('SITE_TITLE')) { // check for upgrade from older file structure
if (!file_exists(BASE . "framework/conf/config.php") && file_exists(BASE . "conf/config.php")) {
rename(BASE . "conf/config.php", BASE . "framework/conf/config.php"); //FIXME until 2.2.3
// copy(BASE."conf/config.php",BASE."framework/conf/config.php"); //FIXME remove in 2.2.3
rename(BASE . "conf/config.php", BASE . "framework/conf/config.php");
@include_once(BASE . "framework/conf/config.php");
}
}
Expand Down
9 changes: 2 additions & 7 deletions framework/core/subsystems/expTheme.php
Expand Up @@ -31,7 +31,8 @@ public static function initialize()
global $auto_dirs2;

// Initialize the theme subsystem 1.0 compatibility layer if requested
if (defined('OLD_THEME_COMPATIBLE') && OLD_THEME_COMPATIBLE) require_once(BASE.'framework/core/compat/theme.php');
if (defined('OLD_THEME_COMPATIBLE') && OLD_THEME_COMPATIBLE)
require_once(BASE.'framework/core/compat/theme.php');

if (!defined('DISPLAY_THEME')) {
/* exdoc
Expand Down Expand Up @@ -74,12 +75,6 @@ public static function initialize()
if (!defined('SWATCH')) {
define('SWATCH', "''");
} // Twitter Bootstrap theme
if (!defined('JQUERYUI_THEME')) {
define('JQUERYUI_THEME', 'exponent');
} // jQueryUI theme
if (!defined('JQUERYUI_CSS')) {
define('JQUERYUI_CSS', JQUERY_RELATIVE . 'css/' . JQUERYUI_THEME . '/jquery-ui.min.css');
} // local jQueryUI stylesheet

// add our theme folder into autoload to prioritize custom (theme) modules
array_unshift($auto_dirs2, BASE . 'themes/' . DISPLAY_THEME . '/modules');
Expand Down
6 changes: 4 additions & 2 deletions index.php
Expand Up @@ -38,7 +38,8 @@ function epb($buffer, $mode) {
require_once('exponent.php');

//active global timer if in DEVELOPMENT mode
if(DEVELOPMENT) $timer = new expTimer();
if(DEVELOPMENT)
$timer = new expTimer();

// if the user has turned on sef_urls then we need to route the request, otherwise we can just
// skip it and default back to the old way of doing things.
Expand Down Expand Up @@ -115,7 +116,8 @@ function epb($buffer, $mode) {
}

//write page build/load time if in DEVELOPMENT mode with logging
if(DEVELOPMENT && LOGGER) eLog($timer->mark() . ' - ' . $section . '/' . $sectionObj->sef_name, gt('LOAD TIME'));
if(DEVELOPMENT && LOGGER)
eLog($timer->mark() . ' - ' . $section . '/' . $sectionObj->sef_name, gt('LOAD TIME'));

if (EXPORT_AS_PDF == 1) {
$content = ob_get_clean();
Expand Down
3 changes: 1 addition & 2 deletions reset.php
Expand Up @@ -20,8 +20,7 @@
// Initialize the Exponent Framework
require_once('exponent.php');

//Fire off the clear all caches via an exponent action.
//redirect_to(array("controller"=>"administration","action"=>"clear_all_caches"));
//Fire off the clear all caches
administrationController::clear_all_caches();

?>

0 comments on commit b5733a2

Please sign in to comment.