@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | * @file config/config.inc.php |
| 8 | 8 | * @author NAVER ([email protected]) |
| 9 | 9 | */ |
| 10 | -if(version_compare(PHP_VERSION, '5.4.0', '<')) |
|
| 10 | +if (version_compare(PHP_VERSION, '5.4.0', '<')) |
|
| 11 | 11 | { |
| 12 | 12 | @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING); |
| 13 | 13 | } |
@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | @error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_WARNING ^ E_STRICT); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | -if(!defined('__XE__')) |
|
| 19 | +if (!defined('__XE__')) |
|
| 20 | 20 | { |
| 21 | 21 | exit(); |
| 22 | 22 | } |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | ini_set('session.use_only_cookies', 0); |
| 54 | 54 | |
| 55 | 55 | |
| 56 | -if(file_exists(_XE_PATH_ . 'config/package.inc.php')) |
|
| 56 | +if (file_exists(_XE_PATH_.'config/package.inc.php')) |
|
| 57 | 57 | { |
| 58 | - require _XE_PATH_ . 'config/package.inc.php'; |
|
| 58 | + require _XE_PATH_.'config/package.inc.php'; |
|
| 59 | 59 | } |
| 60 | 60 | else |
| 61 | 61 | { |
@@ -97,12 +97,12 @@ discard block |
||
| 97 | 97 | * define('__ENABLE_PHPUNIT_TEST__', 0); |
| 98 | 98 | * define('__PROXY_SERVER__', 'http://domain:port/path'); |
| 99 | 99 | */ |
| 100 | -if(file_exists(_XE_PATH_ . 'config/config.user.inc.php')) |
|
| 100 | +if (file_exists(_XE_PATH_.'config/config.user.inc.php')) |
|
| 101 | 101 | { |
| 102 | - require _XE_PATH_ . 'config/config.user.inc.php'; |
|
| 102 | + require _XE_PATH_.'config/config.user.inc.php'; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -if(!defined('__DEBUG__')) |
|
| 105 | +if (!defined('__DEBUG__')) |
|
| 106 | 106 | { |
| 107 | 107 | /** |
| 108 | 108 | * output debug message(bit value) |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | define('__DEBUG__', 0); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | -if(!defined('__DEBUG_OUTPUT__')) |
|
| 120 | +if (!defined('__DEBUG_OUTPUT__')) |
|
| 121 | 121 | { |
| 122 | 122 | /** |
| 123 | 123 | * output location of debug message |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | define('__DEBUG_OUTPUT__', 0); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | -if(!defined('__DEBUG_PROTECT__')) |
|
| 134 | +if (!defined('__DEBUG_PROTECT__')) |
|
| 135 | 135 | { |
| 136 | 136 | /** |
| 137 | 137 | * output comments of the firePHP console and browser |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | define('__DEBUG_PROTECT__', 1); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | -if(!defined('__DEBUG_PROTECT_IP__')) |
|
| 147 | +if (!defined('__DEBUG_PROTECT_IP__')) |
|
| 148 | 148 | { |
| 149 | 149 | /** |
| 150 | 150 | * Set a ip address to allow debug |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | define('__DEBUG_PROTECT_IP__', '127.0.0.1'); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | -if(!defined('__DEBUG_DB_OUTPUT__')) |
|
| 155 | +if (!defined('__DEBUG_DB_OUTPUT__')) |
|
| 156 | 156 | { |
| 157 | 157 | /** |
| 158 | 158 | * DB error message definition |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | define('__DEBUG_DB_OUTPUT__', 0); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -if(!defined('__LOG_SLOW_QUERY__')) |
|
| 168 | +if (!defined('__LOG_SLOW_QUERY__')) |
|
| 169 | 169 | { |
| 170 | 170 | /** |
| 171 | 171 | * Query log for only timeout query among DB queries |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | define('__LOG_SLOW_QUERY__', 0); |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | -if(!defined('__LOG_SLOW_TRIGGER__')) |
|
| 182 | +if (!defined('__LOG_SLOW_TRIGGER__')) |
|
| 183 | 183 | { |
| 184 | 184 | /** |
| 185 | 185 | * Trigger excute time log |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | define('__LOG_SLOW_TRIGGER__', 0); |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | -if(!defined('__LOG_SLOW_ADDON__')) |
|
| 196 | +if (!defined('__LOG_SLOW_ADDON__')) |
|
| 197 | 197 | { |
| 198 | 198 | /** |
| 199 | 199 | * Addon excute time log |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | define('__LOG_SLOW_ADDON__', 0); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | -if(!defined('__LOG_SLOW_WIDGET__')) |
|
| 210 | +if (!defined('__LOG_SLOW_WIDGET__')) |
|
| 211 | 211 | { |
| 212 | 212 | /** |
| 213 | 213 | * Widget excute time log |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | define('__LOG_SLOW_WIDGET__', 0); |
| 222 | 222 | } |
| 223 | 223 | |
| 224 | -if(!defined('__DEBUG_QUERY__')) |
|
| 224 | +if (!defined('__DEBUG_QUERY__')) |
|
| 225 | 225 | { |
| 226 | 226 | /** |
| 227 | 227 | * Leave DB query information |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | define('__DEBUG_QUERY__', 0); |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | -if(!defined('__OB_GZHANDLER_ENABLE__')) |
|
| 237 | +if (!defined('__OB_GZHANDLER_ENABLE__')) |
|
| 238 | 238 | { |
| 239 | 239 | /** |
| 240 | 240 | * option to enable/disable a compression feature using ob_gzhandler |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | define('__OB_GZHANDLER_ENABLE__', 1); |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | -if(!defined('__ENABLE_PHPUNIT_TEST__')) |
|
| 251 | +if (!defined('__ENABLE_PHPUNIT_TEST__')) |
|
| 252 | 252 | { |
| 253 | 253 | /** |
| 254 | 254 | * decide to use/not use the php unit test (Path/tests/index.php) |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | define('__ENABLE_PHPUNIT_TEST__', 0); |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | -if(!defined('__PROXY_SERVER__')) |
|
| 264 | +if (!defined('__PROXY_SERVER__')) |
|
| 265 | 265 | { |
| 266 | 266 | /** |
| 267 | 267 | * __PROXY_SERVER__ has server information to request to the external through the target server |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | define('__PROXY_SERVER__', NULL); |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | -if(!defined('__ERROR_LOG__')) |
|
| 273 | +if (!defined('__ERROR_LOG__')) |
|
| 274 | 274 | { |
| 275 | 275 | /** |
| 276 | 276 | * __ERROR_LOG__ 는 PHP의 에러로그를 출력하는 기능입니다. 개발시 워닝에러이상의 에러부터 잡기 시작합니다. |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | define('__ERROR_LOG__', 0); |
| 282 | 282 | } |
| 283 | 283 | |
| 284 | -if(!defined('__DISABLE_DEFAULT_CSS__')) |
|
| 284 | +if (!defined('__DISABLE_DEFAULT_CSS__')) |
|
| 285 | 285 | { |
| 286 | 286 | /** |
| 287 | 287 | * XE의 기본 CSS 스타일을 로드하지 않도록 합니다. |
@@ -297,27 +297,27 @@ discard block |
||
| 297 | 297 | } |
| 298 | 298 | |
| 299 | 299 | // Require specific files when using Firebug console output |
| 300 | -if((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '6.0.0') === -1) |
|
| 300 | +if ((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '6.0.0') === -1) |
|
| 301 | 301 | { |
| 302 | - require _XE_PATH_ . 'libs/FirePHPCore/FirePHP.class.php'; |
|
| 302 | + require _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php'; |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | // Set Timezone as server time |
| 306 | -if(version_compare(PHP_VERSION, '5.3.0') >= 0) |
|
| 306 | +if (version_compare(PHP_VERSION, '5.3.0') >= 0) |
|
| 307 | 307 | { |
| 308 | 308 | date_default_timezone_set(@date_default_timezone_get()); |
| 309 | 309 | } |
| 310 | 310 | |
| 311 | -include _XE_PATH_ . 'classes/object/BaseObject.class.php'; |
|
| 311 | +include _XE_PATH_.'classes/object/BaseObject.class.php'; |
|
| 312 | 312 | |
| 313 | 313 | // Require a function-defined-file for simple use |
| 314 | -require(_XE_PATH_ . 'config/func.inc.php'); |
|
| 314 | +require(_XE_PATH_.'config/func.inc.php'); |
|
| 315 | 315 | |
| 316 | -if(__DEBUG__) { |
|
| 316 | +if (__DEBUG__) { |
|
| 317 | 317 | define('__StartTime__', getMicroTime()); |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | -if(__DEBUG__) { |
|
| 320 | +if (__DEBUG__) { |
|
| 321 | 321 | $GLOBALS['__elapsed_class_load__'] = 0; |
| 322 | 322 | } |
| 323 | 323 | |
@@ -420,38 +420,38 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | function __xe_autoload($class_name) |
| 422 | 422 | { |
| 423 | - if(__DEBUG__) { |
|
| 423 | + if (__DEBUG__) { |
|
| 424 | 424 | $time_at = getMicroTime(); |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | - if(isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) |
|
| 427 | + if (isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) |
|
| 428 | 428 | { |
| 429 | - require _XE_PATH_ . $GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; |
|
| 429 | + require _XE_PATH_.$GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; |
|
| 430 | 430 | } |
| 431 | - elseif(preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) |
|
| 431 | + elseif (preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) |
|
| 432 | 432 | { |
| 433 | 433 | $candidate_filename = array(); |
| 434 | - $candidate_filename[] = 'modules/' . $matches[1] . '/' . $matches[1]; |
|
| 435 | - if(isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; |
|
| 434 | + $candidate_filename[] = 'modules/'.$matches[1].'/'.$matches[1]; |
|
| 435 | + if (isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; |
|
| 436 | 436 | $candidate_filename[] = (isset($matches[3]) && $matches[3]) ? strtolower($matches[3]) : 'class'; |
| 437 | 437 | $candidate_filename[] = 'php'; |
| 438 | 438 | |
| 439 | 439 | $candidate_filename = implode('.', $candidate_filename); |
| 440 | 440 | |
| 441 | - if(file_exists(_XE_PATH_ . $candidate_filename)) |
|
| 441 | + if (file_exists(_XE_PATH_.$candidate_filename)) |
|
| 442 | 442 | { |
| 443 | - require _XE_PATH_ . $candidate_filename; |
|
| 443 | + require _XE_PATH_.$candidate_filename; |
|
| 444 | 444 | } |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | - if(__DEBUG__) { |
|
| 447 | + if (__DEBUG__) { |
|
| 448 | 448 | $GLOBALS['__elapsed_class_load__'] += getMicroTime() - $time_at; |
| 449 | 449 | } |
| 450 | 450 | } |
| 451 | 451 | spl_autoload_register('__xe_autoload'); |
| 452 | 452 | |
| 453 | -if(file_exists(_XE_PATH_ . 'vendor/autoload.php')) { |
|
| 454 | - require _XE_PATH_ . 'vendor/autoload.php'; |
|
| 453 | +if (file_exists(_XE_PATH_.'vendor/autoload.php')) { |
|
| 454 | + require _XE_PATH_.'vendor/autoload.php'; |
|
| 455 | 455 | } |
| 456 | 456 | /* End of file config.inc.php */ |
| 457 | 457 | /* Location: ./config/config.inc.php */ |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | function setMessage($message = 'success', $type = NULL) |
| 97 | 97 | { |
| 98 | - if($str = Context::getLang($message)) |
|
| 98 | + if ($str = Context::getLang($message)) |
|
| 99 | 99 | { |
| 100 | 100 | $this->message = $str; |
| 101 | 101 | } |
@@ -138,14 +138,14 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | function adds($object) |
| 140 | 140 | { |
| 141 | - if(is_object($object)) |
|
| 141 | + if (is_object($object)) |
|
| 142 | 142 | { |
| 143 | 143 | $object = get_object_vars($object); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - if(is_array($object)) |
|
| 146 | + if (is_array($object)) |
|
| 147 | 147 | { |
| 148 | - foreach($object as $key => $val) |
|
| 148 | + foreach ($object as $key => $val) |
|
| 149 | 149 | { |
| 150 | 150 | $this->variables[$key] = $val; |
| 151 | 151 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | { |
| 173 | 173 | $args = func_get_args(); |
| 174 | 174 | $output = new stdClass(); |
| 175 | - foreach($args as $arg) |
|
| 175 | + foreach ($args as $arg) |
|
| 176 | 176 | { |
| 177 | 177 | $output->{$arg} = $this->get($arg); |
| 178 | 178 | } |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | function getObjectVars() |
| 198 | 198 | { |
| 199 | 199 | $output = new stdClass(); |
| 200 | - foreach($this->variables as $key => $val) |
|
| 200 | + foreach ($this->variables as $key => $val) |
|
| 201 | 201 | { |
| 202 | 202 | $output->{$key} = $val; |
| 203 | 203 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | -if(version_compare(PHP_VERSION, '7.2', '<') && !class_exists('Object', false)) |
|
| 229 | +if (version_compare(PHP_VERSION, '7.2', '<') && !class_exists('Object', false)) |
|
| 230 | 230 | { |
| 231 | 231 | class_alias('BaseObject', 'Object'); |
| 232 | 232 | } |