issue 2662 conding convention in config

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12232 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-11-15 08:04:47 +00:00
parent f324540321
commit 7928ad163b
2 changed files with 1488 additions and 1396 deletions

View file

@ -1,278 +1,285 @@
<?php <?php
/**
* set the include of the class file and other environment configurations
*
* @file config/config.inc.php
* @author NHN (developers@xpressengine.com)
*/
@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
if(!defined('__ZBXE__')) exit();
/**
* Display XE's full version.
* The version should be revised when releasing even if no change is made.
* XE core's version name is designated development stage. Basically consist of 4 numbers. For example X.X.X.X.
* First position number means 'major' update.
* Second position number means 'minor' update.
* Third position number '0, 1, 2, 3' means 'status' update.
* Forth position number means 'patch' update.
* Third position number for status display is consist of 0~3 numbers.
* '0' means 'alpha' status.
* '1' means 'beta' status.
* '2' means 'release candidate' status.
* '3' means 'final' status.
*/
define('__XE_VERSION__', '1.7.0.0');
/**
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead.
*/
define('__ZBXE_VERSION__', __XE_VERSION__);
/**
* The base path to where you installed zbXE Wanted
*/
define('_XE_PATH_', str_replace('config/config.inc.php', '', str_replace('\\', '/', __FILE__)));
// Set can use other method instead cookie to store session id(for file upload)
ini_set('session.use_only_cookies', 0);
if(file_exists(_XE_PATH_.'config/package.inc.php'))
{
require _XE_PATH_.'config/package.inc.php';
}
else
{
/** /**
* set the include of the class file and other environment configurations * Package type
*/
define('_XE_PACKAGE_','XE');
/**
* Location
*/
define('_XE_LOCATION_','en');
/**
* Location site
*/
define('_XE_LOCATION_SITE_','http://www.xpressengine.org/');
/**
* Download server
*/
define('_XE_DOWNLOAD_SERVER_','http://en.download.xpressengine.org/');
}
/*
* user configuration files which override the default settings
* save the following information into config/config.user.inc.php
* <?php
* define('__DEBUG__', 0);
* define('__DEBUG_OUTPUT__', 0);
* define('__DEBUG_PROTECT__', 1);
* define('__DEBUG_PROTECT_IP__', '127.0.0.1');
* define('__DEBUG_DB_OUTPUT__', 0);
* define('__LOG_SLOW_QUERY__', 0);
* define('__OB_GZHANDLER_ENABLE__', 1);
* define('__ENABLE_PHPUNIT_TEST__', 0);
* define('__PROXY_SERVER__', 'http://domain:port/path');
* define('__XE_CDN_PREFIX__', 'http://yourCdnDomain.com/path/');
* define('__XE_CDN_VERSION__', 'yourCdnVersion');
*/
if(file_exists(_XE_PATH_.'config/config.user.inc.php'))
{
require _XE_PATH_.'config/config.user.inc.php';
}
if(!defined('__DEBUG__'))
{
/**
* output debug message(bit value)
* *
* @file config/config.inc.php * <pre>
* @author NHN (developers@xpressengine.com) * 0: generate debug messages/not display
**/ * 1: display messages through debugPrint() function
* 2: output execute time, Request/Response info
@error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED); * 4: output DB query history
* </pre>
if(!defined('__ZBXE__')) exit(); */
define('__DEBUG__', 0);
}
if(!defined('__DEBUG_OUTPUT__'))
{
/** /**
* Display XE's full version. * output location of debug message
* The version should be revised when releasing even if no change is made. *
* <pre>
* XE core's version name is designated development stage. Basically consist of 4 numbers. For example X.X.X.X. * 0: connect to the files/_debug_message.php and output
* 1: HTML output as a comment on the bottom (when response method is the HTML)
* First position number means 'major' update. * 2: Firebug console output (PHP 4 & 5. Firebug/FirePHP plug-in required)
* Second position number means 'minor' update. * </pre>
* Third position number '0, 1, 2, 3' means 'status' update.
* Forth position number means 'patch' update.
* Third position number for status display is consist of 0~3 numbers.
* '0' means 'alpha' status.
* '1' means 'beta' status.
* '2' means 'release candidate' status.
* '3' means 'final' status.
*/ */
define('__XE_VERSION__', '1.7.0.0'); define('__DEBUG_OUTPUT__', 0);
}
if(!defined('__DEBUG_PROTECT__'))
{
/** /**
* @deprecated __ZBXE_VERSION__ will be removed. Use __XE_VERSION__ instead. * output comments of the firePHP console and browser
*
* <pre>
* 0: No limit (not recommended)
* 1: Allow only specified IP addresses
* </pre>
*/ */
define('__ZBXE_VERSION__', __XE_VERSION__); define('__DEBUG_PROTECT__', 1);
}
if(!defined('__DEBUG_PROTECT_IP__'))
{
/** /**
* The base path to where you installed zbXE Wanted * Set a ip address to allow debug
*/ */
define('_XE_PATH_', str_replace('config/config.inc.php', '', str_replace('\\', '/', __FILE__))); define('__DEBUG_PROTECT_IP__', '127.0.0.1');
}
if(!defined('__DEBUG_DB_OUTPUT__'))
// Set can use other method instead cookie to store session id(for file upload) {
ini_set('session.use_only_cookies', 0); /**
* DB error message definition
*
if(file_exists(_XE_PATH_.'config/package.inc.php')) { * <pre>
require _XE_PATH_.'config/package.inc.php'; * 0: No output
} else { * 1: files/_debug_db_query.php connected to the output
/** * </pre>
* Package type
*/
define('_XE_PACKAGE_','XE');
/**
* Location
*/
define('_XE_LOCATION_','en');
/**
* Location site
*/
define('_XE_LOCATION_SITE_','http://www.xpressengine.org/');
/**
* Download server
*/
define('_XE_DOWNLOAD_SERVER_','http://en.download.xpressengine.org/');
}
/*
* user configuration files which override the default settings
* save the following information into config/config.user.inc.php
* <?php
* define('__DEBUG__', 0);
* define('__DEBUG_OUTPUT__', 0);
* define('__DEBUG_PROTECT__', 1);
* define('__DEBUG_PROTECT_IP__', '127.0.0.1');
* define('__DEBUG_DB_OUTPUT__', 0);
* define('__LOG_SLOW_QUERY__', 0);
* define('__OB_GZHANDLER_ENABLE__', 1);
* define('__ENABLE_PHPUNIT_TEST__', 0);
* define('__PROXY_SERVER__', 'http://domain:port/path');
* define('__XE_CDN_PREFIX__', 'http://yourCdnDomain.com/path/');
* define('__XE_CDN_VERSION__', 'yourCdnVersion');
*/ */
if(file_exists(_XE_PATH_.'config/config.user.inc.php')) { define('__DEBUG_DB_OUTPUT__', 0);
require _XE_PATH_.'config/config.user.inc.php'; }
}
if(!defined('__DEBUG__')) if(!defined('__LOG_SLOW_QUERY__'))
{ {
/** /**
* output debug message(bit value) * Query log for only timeout query among DB queries
* *
* <pre> * <pre>
* 0: generate debug messages/not display * 0: Do not leave a log
* 1: display messages through debugPrint() function * = 0: leave a log when the slow query takes over specified seconds
* 2: output execute time, Request/Response info * Log file is saved as ./files/_db_slow_query.php file
* 4: output DB query history * </pre>
* </pre> */
*/ define('__LOG_SLOW_QUERY__', 0);
define('__DEBUG__', 0); }
}
if(!defined('__DEBUG_OUTPUT__')) if(!defined('__DEBUG_QUERY__'))
{ {
/** /**
* output location of debug message * Leave DB query information
* *
* <pre> * <pre>
* 0: connect to the files/_debug_message.php and output * 0: Do not add information to the query
* 1: HTML output as a comment on the bottom (when response method is the HTML) * 1: Comment the XML Query ID
* 2: Firebug console output (PHP 4 & 5. Firebug/FirePHP plug-in required) * </pre>
* </pre> */
*/ define('__DEBUG_QUERY__', 0);
define('__DEBUG_OUTPUT__', 0); }
}
if(!defined('__DEBUG_PROTECT__')) if(!defined('__OB_GZHANDLER_ENABLE__'))
{ {
/** /**
* output comments of the firePHP console and browser * option to enable/disable a compression feature using ob_gzhandler
* *
* <pre> * <pre>
* 0: No limit (not recommended) * 0: Not used
* 1: Allow only specified IP addresses * 1: Enabled
* </pre> * Only particular servers may have a problem in IE browser when sending a compression
*/ * </pre>
define('__DEBUG_PROTECT__', 1); */
} define('__OB_GZHANDLER_ENABLE__', 1);
}
if(!defined('__DEBUG_PROTECT_IP__')) if(!defined('__ENABLE_PHPUNIT_TEST__'))
{ {
/** /**
* Set a ip address to allow debug * decide to use/not use the php unit test (Path/tests/index.php)
*/ *
define('__DEBUG_PROTECT_IP__', '127.0.0.1'); * <pre>
} * 0: Not used
* 1: Enabled
* </pre>
*/
define('__ENABLE_PHPUNIT_TEST__', 0);
}
if(!defined('__DEBUG_DB_OUTPUT__')) if(!defined('__PROXY_SERVER__'))
{ {
/** /**
* DB error message definition * __PROXY_SERVER__ has server information to request to the external through the target server
* * FileHandler:: getRemoteResource uses the constant
* <pre> */
* 0: No output define('__PROXY_SERVER__', null);
* 1: files/_debug_db_query.php connected to the output }
* </pre>
*/
define('__DEBUG_DB_OUTPUT__', 0);
}
if(!defined('__LOG_SLOW_QUERY__')) if(!defined('__XE_CDN_PREFIX__'))
{ {
/** /**
* Query log for only timeout query among DB queries * CDN prefix
* */
* <pre> define('__XE_CDN_PREFIX__', 'http://static.xpressengine.com/core/');
* 0: Do not leave a log }
* = 0: leave a log when the slow query takes over specified seconds
* Log file is saved as ./files/_db_slow_query.php file
* </pre>
*/
define('__LOG_SLOW_QUERY__', 0);
}
if(!defined('__DEBUG_QUERY__')) if(!defined('__XE_CDN_VERSION__'))
{ {
/** /**
* Leave DB query information * CDN version
* */
* <pre> define('__XE_CDN_VERSION__', '%__XE_CDN_VERSION__%');
* 0: Do not add information to the query }
* 1: Comment the XML Query ID
* </pre>
*/
define('__DEBUG_QUERY__', 0);
}
if(!defined('__OB_GZHANDLER_ENABLE__')) // Require specific files when using Firebug console output
{ if((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '6.0.0') === -1)
/** {
* option to enable/disable a compression feature using ob_gzhandler require _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php';
* }
* <pre>
* 0: Not used
* 1: Enabled
* Only particular servers may have a problem in IE browser when sending a compression
* </pre>
*/
define('__OB_GZHANDLER_ENABLE__', 1);
}
if(!defined('__ENABLE_PHPUNIT_TEST__')) // Set Timezone as server time
{ if(version_compare(PHP_VERSION, '5.3.0') >= 0)
/** {
* decide to use/not use the php unit test (Path/tests/index.php) date_default_timezone_set(@date_default_timezone_get());
* }
* <pre>
* 0: Not used
* 1: Enabled
* </pre>
*/
define('__ENABLE_PHPUNIT_TEST__', 0);
}
if(!defined('__PROXY_SERVER__')) if(!defined('__XE_LOADED_CLASS__'))
{ {
/** // Require a function-defined-file for simple use
* __PROXY_SERVER__ has server information to request to the external through the target server require(_XE_PATH_.'config/func.inc.php');
* FileHandler:: getRemoteResource uses the constant
*/
define('__PROXY_SERVER__', null);
}
if(!defined('__XE_CDN_PREFIX__')) if(__DEBUG__) define('__StartTime__', getMicroTime());
{
/**
* CDN prefix
*/
define('__XE_CDN_PREFIX__', 'http://static.xpressengine.com/core/');
}
if(!defined('__XE_CDN_VERSION__')) // include the class files
{ //TODO When _autoload() can be used for PHP5 based applications, it will be removed.
/** if(__DEBUG__) define('__ClassLoadStartTime__', getMicroTime());
* CDN version require(_XE_PATH_.'classes/object/Object.class.php');
*/ require(_XE_PATH_.'classes/extravar/Extravar.class.php');
define('__XE_CDN_VERSION__', '%__XE_CDN_VERSION__%'); require(_XE_PATH_.'classes/handler/Handler.class.php');
} require(_XE_PATH_.'classes/xml/XmlParser.class.php');
require(_XE_PATH_.'classes/xml/XmlGenerator.class.php');
// Require specific files when using Firebug console output require(_XE_PATH_.'classes/xml/XmlJsFilter.class.php');
if((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '6.0.0') === -1) { require(_XE_PATH_.'classes/xml/XmlLangParser.class.php');
require _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php'; require(_XE_PATH_.'classes/cache/CacheHandler.class.php');
} require(_XE_PATH_.'classes/context/Context.class.php');
require(_XE_PATH_.'classes/db/DB.class.php');
// Set Timezone as server time require(_XE_PATH_.'classes/file/FileHandler.class.php');
if(version_compare(PHP_VERSION, '5.3.0') >= 0) require(_XE_PATH_.'classes/widget/WidgetHandler.class.php');
{ require(_XE_PATH_.'classes/editor/EditorHandler.class.php');
date_default_timezone_set(@date_default_timezone_get()); require(_XE_PATH_.'classes/module/ModuleObject.class.php');
} require(_XE_PATH_.'classes/module/ModuleHandler.class.php');
require(_XE_PATH_.'classes/display/DisplayHandler.class.php');
if(!defined('__XE_LOADED_CLASS__')){ require(_XE_PATH_.'classes/template/TemplateHandler.class.php');
// Require a function-defined-file for simple use require(_XE_PATH_.'classes/mail/Mail.class.php');
require(_XE_PATH_.'config/func.inc.php'); require(_XE_PATH_.'classes/page/PageHandler.class.php');
require(_XE_PATH_.'classes/mobile/Mobile.class.php');
if(__DEBUG__) define('__StartTime__', getMicroTime()); require(_XE_PATH_.'classes/validator/Validator.class.php');
require(_XE_PATH_.'classes/frontendfile/FrontEndFileHandler.class.php');
// include the class files require(_XE_PATH_.'classes/security/Security.class.php');
//TODO When _autoload() can be used for PHP5 based applications, it will be removed. if(__DEBUG__) $GLOBALS['__elapsed_class_load__'] = getMicroTime() - __ClassLoadStartTime__;
if(__DEBUG__) define('__ClassLoadStartTime__', getMicroTime()); }
require(_XE_PATH_.'classes/object/Object.class.php'); /* End of file config.inc.php */
require(_XE_PATH_.'classes/extravar/Extravar.class.php'); /* Location: ./config/config.inc.php */
require(_XE_PATH_.'classes/handler/Handler.class.php');
require(_XE_PATH_.'classes/xml/XmlParser.class.php');
require(_XE_PATH_.'classes/xml/XmlGenerator.class.php');
require(_XE_PATH_.'classes/xml/XmlJsFilter.class.php');
require(_XE_PATH_.'classes/xml/XmlLangParser.class.php');
require(_XE_PATH_.'classes/cache/CacheHandler.class.php');
require(_XE_PATH_.'classes/context/Context.class.php');
require(_XE_PATH_.'classes/db/DB.class.php');
require(_XE_PATH_.'classes/file/FileHandler.class.php');
require(_XE_PATH_.'classes/widget/WidgetHandler.class.php');
require(_XE_PATH_.'classes/editor/EditorHandler.class.php');
require(_XE_PATH_.'classes/module/ModuleObject.class.php');
require(_XE_PATH_.'classes/module/ModuleHandler.class.php');
require(_XE_PATH_.'classes/display/DisplayHandler.class.php');
require(_XE_PATH_.'classes/template/TemplateHandler.class.php');
require(_XE_PATH_.'classes/mail/Mail.class.php');
require(_XE_PATH_.'classes/page/PageHandler.class.php');
require(_XE_PATH_.'classes/mobile/Mobile.class.php');
require(_XE_PATH_.'classes/validator/Validator.class.php');
require(_XE_PATH_.'classes/frontendfile/FrontEndFileHandler.class.php');
require(_XE_PATH_.'classes/security/Security.class.php');
if(__DEBUG__) $GLOBALS['__elapsed_class_load__'] = getMicroTime() - __ClassLoadStartTime__;
}
?>

File diff suppressed because it is too large Load diff