@@ -18,9 +18,9 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | $template_path = $oModule->getTemplatePath(); |
| 20 | 20 | |
| 21 | - if(!is_dir($template_path)) |
|
| 21 | + if (!is_dir($template_path)) |
|
| 22 | 22 | { |
| 23 | - if($oModule->module_info->module == $oModule->module) |
|
| 23 | + if ($oModule->module_info->module == $oModule->module) |
|
| 24 | 24 | { |
| 25 | 25 | $skin = $oModule->origin_module_info->skin; |
| 26 | 26 | } |
@@ -29,17 +29,17 @@ discard block |
||
| 29 | 29 | $skin = $oModule->module_config->skin; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false) |
|
| 32 | + if (Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false) |
|
| 33 | 33 | { |
| 34 | - if($skin && is_string($skin)) |
|
| 34 | + if ($skin && is_string($skin)) |
|
| 35 | 35 | { |
| 36 | 36 | $theme_skin = explode('|@|', $skin); |
| 37 | 37 | $template_path = $oModule->getTemplatePath(); |
| 38 | - if(count($theme_skin) == 2) |
|
| 38 | + if (count($theme_skin) == 2) |
|
| 39 | 39 | { |
| 40 | 40 | $theme_path = sprintf('./themes/%s', $theme_skin[0]); |
| 41 | 41 | // FIXME $theme_path $theme_path $theme_path ?? |
| 42 | - if(substr($theme_path, 0, strlen($theme_path)) != $theme_path) |
|
| 42 | + if (substr($theme_path, 0, strlen($theme_path)) != $theme_path) |
|
| 43 | 43 | { |
| 44 | 44 | $template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]); |
| 45 | 45 | } |
@@ -65,16 +65,16 @@ discard block |
||
| 65 | 65 | $oSecurity->encodeHTML('is_keyword', 'search_keyword', 'search_target', 'order_target', 'order_type'); |
| 66 | 66 | |
| 67 | 67 | // add .x div for adminitration pages |
| 68 | - if(Context::getResponseMethod() == 'HTML') |
|
| 68 | + if (Context::getResponseMethod() == 'HTML') |
|
| 69 | 69 | { |
| 70 | - if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify') |
|
| 70 | + if (Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify') |
|
| 71 | 71 | { |
| 72 | - $output = '<div class="x">' . $output . '</div>'; |
|
| 72 | + $output = '<div class="x">'.$output.'</div>'; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - if(Context::get('layout') != 'none') |
|
| 75 | + if (Context::get('layout') != 'none') |
|
| 76 | 76 | { |
| 77 | - if(__DEBUG__ == 3) |
|
| 77 | + if (__DEBUG__ == 3) |
|
| 78 | 78 | { |
| 79 | 79 | $start = getMicroTime(); |
| 80 | 80 | } |
@@ -92,11 +92,11 @@ discard block |
||
| 92 | 92 | $layout_srl = $layout_info->layout_srl; |
| 93 | 93 | |
| 94 | 94 | // compile if connected to the layout |
| 95 | - if($layout_srl > 0) |
|
| 95 | + if ($layout_srl > 0) |
|
| 96 | 96 | { |
| 97 | 97 | |
| 98 | 98 | // handle separately if the layout is faceoff |
| 99 | - if($layout_info && $layout_info->type == 'faceoff') |
|
| 99 | + if ($layout_info && $layout_info->type == 'faceoff') |
|
| 100 | 100 | { |
| 101 | 101 | $oLayoutModel->doActivateFaceOff($layout_info); |
| 102 | 102 | Context::set('layout_info', $layout_info); |
@@ -105,16 +105,16 @@ discard block |
||
| 105 | 105 | // search if the changes CSS exists in the admin layout edit window |
| 106 | 106 | $edited_layout_css = $oLayoutModel->getUserLayoutCss($layout_srl); |
| 107 | 107 | |
| 108 | - if(FileHandler::exists($edited_layout_css)) |
|
| 108 | + if (FileHandler::exists($edited_layout_css)) |
|
| 109 | 109 | { |
| 110 | 110 | Context::loadFile(array($edited_layout_css, 'all', '', 100)); |
| 111 | 111 | } |
| 112 | 112 | } |
| 113 | - if(!$layout_path) |
|
| 113 | + if (!$layout_path) |
|
| 114 | 114 | { |
| 115 | 115 | $layout_path = './common/tpl'; |
| 116 | 116 | } |
| 117 | - if(!$layout_file) |
|
| 117 | + if (!$layout_file) |
|
| 118 | 118 | { |
| 119 | 119 | $layout_file = 'default_layout'; |
| 120 | 120 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | // if popup_layout, remove admin bar. |
| 124 | 124 | $realLayoutPath = FileHandler::getRealPath($layout_path); |
| 125 | - if(substr_compare($realLayoutPath, '/', -1) !== 0) |
|
| 125 | + if (substr_compare($realLayoutPath, '/', -1) !== 0) |
|
| 126 | 126 | { |
| 127 | 127 | $realLayoutPath .= '/'; |
| 128 | 128 | } |
@@ -130,12 +130,12 @@ discard block |
||
| 130 | 130 | $pathInfo = pathinfo($layout_file); |
| 131 | 131 | $onlyLayoutFile = $pathInfo['filename']; |
| 132 | 132 | |
| 133 | - if(__DEBUG__ == 3) |
|
| 133 | + if (__DEBUG__ == 3) |
|
| 134 | 134 | { |
| 135 | 135 | $GLOBALS['__layout_compile_elapsed__'] = getMicroTime() - $start; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - if(stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always')) |
|
| 138 | + if (stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always')) |
|
| 139 | 139 | { |
| 140 | 140 | Context::addHtmlFooter('<iframe id="xeTmpIframe" name="xeTmpIframe" style="width:1px;height:1px;position:absolute;top:-2px;left:-2px;"></iframe>'); |
| 141 | 141 | } |
@@ -151,12 +151,12 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | function prepareToPrint(&$output) |
| 153 | 153 | { |
| 154 | - if(Context::getResponseMethod() != 'HTML') |
|
| 154 | + if (Context::getResponseMethod() != 'HTML') |
|
| 155 | 155 | { |
| 156 | 156 | return; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - if(__DEBUG__ == 3) |
|
| 159 | + if (__DEBUG__ == 3) |
|
| 160 | 160 | { |
| 161 | 161 | $start = getMicroTime(); |
| 162 | 162 | } |
@@ -174,20 +174,20 @@ discard block |
||
| 174 | 174 | $output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@\:]+)-->/is', array($this, '_transMeta'), $output); |
| 175 | 175 | |
| 176 | 176 | // handles a relative path generated by using the rewrite module |
| 177 | - if(Context::isAllowRewrite()) |
|
| 177 | + if (Context::isAllowRewrite()) |
|
| 178 | 178 | { |
| 179 | 179 | $url = parse_url(Context::getRequestUri()); |
| 180 | 180 | $real_path = $url['path']; |
| 181 | 181 | |
| 182 | 182 | $pattern = '/src=("|\'){1}(\.\/)?(files\/attach|files\/cache|files\/faceOff|files\/member_extra_info|modules|common|widgets|widgetstyle|layouts|addons)\/([^"\']+)\.(jpg|jpeg|png|gif)("|\'){1}/s'; |
| 183 | - $output = preg_replace($pattern, 'src=$1' . $real_path . '$3/$4.$5$6', $output); |
|
| 183 | + $output = preg_replace($pattern, 'src=$1'.$real_path.'$3/$4.$5$6', $output); |
|
| 184 | 184 | |
| 185 | 185 | $pattern = '/href=("|\'){1}(\?[^"\']+)/s'; |
| 186 | - $output = preg_replace($pattern, 'href=$1' . $real_path . '$2', $output); |
|
| 186 | + $output = preg_replace($pattern, 'href=$1'.$real_path.'$2', $output); |
|
| 187 | 187 | |
| 188 | - if(Context::get('vid')) |
|
| 188 | + if (Context::get('vid')) |
|
| 189 | 189 | { |
| 190 | - $pattern = '/\/' . Context::get('vid') . '\?([^=]+)=/is'; |
|
| 190 | + $pattern = '/\/'.Context::get('vid').'\?([^=]+)=/is'; |
|
| 191 | 191 | $output = preg_replace($pattern, '/?$1=', $output); |
| 192 | 192 | } |
| 193 | 193 | } |
@@ -195,18 +195,18 @@ discard block |
||
| 195 | 195 | // prevent the 2nd request due to url(none) of the background-image |
| 196 | 196 | $output = preg_replace('/url\((["\']?)none(["\']?)\)/is', 'none', $output); |
| 197 | 197 | |
| 198 | - if(is_array(Context::get('INPUT_ERROR'))) |
|
| 198 | + if (is_array(Context::get('INPUT_ERROR'))) |
|
| 199 | 199 | { |
| 200 | 200 | $INPUT_ERROR = Context::get('INPUT_ERROR'); |
| 201 | 201 | $keys = array_keys($INPUT_ERROR); |
| 202 | - $keys = '(' . implode('|', $keys) . ')'; |
|
| 202 | + $keys = '('.implode('|', $keys).')'; |
|
| 203 | 203 | |
| 204 | - $output = preg_replace_callback('@(<input)([^>]*?)\sname="' . $keys . '"([^>]*?)/?>@is', array(&$this, '_preserveValue'), $output); |
|
| 205 | - $output = preg_replace_callback('@<select[^>]*\sname="' . $keys . '".+</select>@isU', array(&$this, '_preserveSelectValue'), $output); |
|
| 206 | - $output = preg_replace_callback('@<textarea[^>]*\sname="' . $keys . '".+</textarea>@isU', array(&$this, '_preserveTextAreaValue'), $output); |
|
| 204 | + $output = preg_replace_callback('@(<input)([^>]*?)\sname="'.$keys.'"([^>]*?)/?>@is', array(&$this, '_preserveValue'), $output); |
|
| 205 | + $output = preg_replace_callback('@<select[^>]*\sname="'.$keys.'".+</select>@isU', array(&$this, '_preserveSelectValue'), $output); |
|
| 206 | + $output = preg_replace_callback('@<textarea[^>]*\sname="'.$keys.'".+</textarea>@isU', array(&$this, '_preserveTextAreaValue'), $output); |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | - if(__DEBUG__ == 3) |
|
| 209 | + if (__DEBUG__ == 3) |
|
| 210 | 210 | { |
| 211 | 211 | $GLOBALS['__trans_content_elapsed__'] = getMicroTime() - $start; |
| 212 | 212 | } |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | // convert the final layout |
| 225 | 225 | Context::set('content', $output); |
| 226 | 226 | $oTemplate = TemplateHandler::getInstance(); |
| 227 | - if(Mobile::isFromMobilePhone()) |
|
| 227 | + if (Mobile::isFromMobilePhone()) |
|
| 228 | 228 | { |
| 229 | 229 | $this->_loadMobileJSCSS(); |
| 230 | 230 | $output = $oTemplate->compile('./common/tpl', 'mobile_layout'); |
@@ -249,16 +249,16 @@ discard block |
||
| 249 | 249 | { |
| 250 | 250 | $INPUT_ERROR = Context::get('INPUT_ERROR'); |
| 251 | 251 | |
| 252 | - $str = $match[1] . $match[2] . ' name="' . $match[3] . '"' . $match[4]; |
|
| 252 | + $str = $match[1].$match[2].' name="'.$match[3].'"'.$match[4]; |
|
| 253 | 253 | |
| 254 | 254 | // get type |
| 255 | 255 | $type = 'text'; |
| 256 | - if(preg_match('/\stype="([a-z]+)"/i', $str, $m)) |
|
| 256 | + if (preg_match('/\stype="([a-z]+)"/i', $str, $m)) |
|
| 257 | 257 | { |
| 258 | 258 | $type = strtolower($m[1]); |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | - switch($type) |
|
| 261 | + switch ($type) |
|
| 262 | 262 | { |
| 263 | 263 | case 'text': |
| 264 | 264 | case 'hidden': |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | case 'number': |
| 277 | 277 | case 'range': |
| 278 | 278 | case 'color': |
| 279 | - $str = preg_replace('@\svalue="[^"]*?"@', ' ', $str) . ' value="' . htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '"'; |
|
| 279 | + $str = preg_replace('@\svalue="[^"]*?"@', ' ', $str).' value="'.htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401, 'UTF-8', false).'"'; |
|
| 280 | 280 | break; |
| 281 | 281 | case 'password': |
| 282 | 282 | $str = preg_replace('@\svalue="[^"]*?"@', ' ', $str); |
@@ -284,14 +284,14 @@ discard block |
||
| 284 | 284 | case 'radio': |
| 285 | 285 | case 'checkbox': |
| 286 | 286 | $str = preg_replace('@\schecked(="[^"]*?")?@', ' ', $str); |
| 287 | - if(@preg_match('@\s(?i:value)="' . $INPUT_ERROR[$match[3]] . '"@', $str)) |
|
| 287 | + if (@preg_match('@\s(?i:value)="'.$INPUT_ERROR[$match[3]].'"@', $str)) |
|
| 288 | 288 | { |
| 289 | 289 | $str .= ' checked="checked"'; |
| 290 | 290 | } |
| 291 | 291 | break; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - return $str . ' />'; |
|
| 294 | + return $str.' />'; |
|
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | /** |
@@ -308,14 +308,14 @@ discard block |
||
| 308 | 308 | preg_match_all('@<option[^>]*\svalue="([^"]*)".+</option>@isU', $matches[0], $m); |
| 309 | 309 | |
| 310 | 310 | $key = array_search($INPUT_ERROR[$matches[1]], $m[1]); |
| 311 | - if($key === FALSE) |
|
| 311 | + if ($key === FALSE) |
|
| 312 | 312 | { |
| 313 | 313 | return $matches[0]; |
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | $m[0][$key] = preg_replace('@(\svalue=".*?")@is', '$1 selected="selected"', $m[0][$key]); |
| 317 | 317 | |
| 318 | - return $mm[0] . implode('', $m[0]) . '</select>'; |
|
| 318 | + return $mm[0].implode('', $m[0]).'</select>'; |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | /** |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | { |
| 328 | 328 | $INPUT_ERROR = Context::get('INPUT_ERROR'); |
| 329 | 329 | preg_match('@<textarea.*?>@is', $matches[0], $mm); |
| 330 | - return $mm[0] . $INPUT_ERROR[$matches[1]] . '</textarea>'; |
|
| 330 | + return $mm[0].$INPUT_ERROR[$matches[1]].'</textarea>'; |
|
| 331 | 331 | } |
| 332 | 332 | |
| 333 | 333 | /** |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | */ |
| 339 | 339 | function _moveStyleToHeader($matches) |
| 340 | 340 | { |
| 341 | - if(isset($matches[1]) && stristr($matches[1], 'scoped')) |
|
| 341 | + if (isset($matches[1]) && stristr($matches[1], 'scoped')) |
|
| 342 | 342 | { |
| 343 | 343 | return $matches[0]; |
| 344 | 344 | } |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | */ |
| 375 | 375 | function _transMeta($matches) |
| 376 | 376 | { |
| 377 | - if($matches[1]) |
|
| 377 | + if ($matches[1]) |
|
| 378 | 378 | { |
| 379 | 379 | return ''; |
| 380 | 380 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | $lang_type = Context::getLangType(); |
| 392 | 392 | |
| 393 | 393 | // add common JS/CSS files |
| 394 | - if(__DEBUG__ || !__XE_VERSION_STABLE__) |
|
| 394 | + if (__DEBUG__ || !__XE_VERSION_STABLE__) |
|
| 395 | 395 | { |
| 396 | 396 | $oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true); |
| 397 | 397 | $oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true); |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | $oContext->loadFile(array('./common/js/xml2json.js', 'head', '', -100000), true); |
| 403 | 403 | $oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true); |
| 404 | 404 | $oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true); |
| 405 | - if(!__DISABLE_DEFAULT_CSS__) |
|
| 405 | + if (!__DISABLE_DEFAULT_CSS__) |
|
| 406 | 406 | { |
| 407 | 407 | $oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true); |
| 408 | 408 | } |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | $oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true); |
| 418 | 418 | $oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true); |
| 419 | 419 | $oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true); |
| 420 | - if(!__DISABLE_DEFAULT_CSS__) |
|
| 420 | + if (!__DISABLE_DEFAULT_CSS__) |
|
| 421 | 421 | { |
| 422 | 422 | $oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true); |
| 423 | 423 | } |
@@ -428,9 +428,9 @@ discard block |
||
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | // for admin page, add admin css |
| 431 | - if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0) |
|
| 431 | + if (Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0) |
|
| 432 | 432 | { |
| 433 | - if(__DEBUG__ || !__XE_VERSION_STABLE__) |
|
| 433 | + if (__DEBUG__ || !__XE_VERSION_STABLE__) |
|
| 434 | 434 | { |
| 435 | 435 | $oContext->loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true); |
| 436 | 436 | $oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true); |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | $lang_type = Context::getLangType(); |
| 463 | 463 | |
| 464 | 464 | // add common JS/CSS files |
| 465 | - if(__DEBUG__ || !__XE_VERSION_STABLE__) |
|
| 465 | + if (__DEBUG__ || !__XE_VERSION_STABLE__) |
|
| 466 | 466 | { |
| 467 | 467 | $oContext->loadFile(array('./common/js/jquery.js', 'head', '', -110000), true); |
| 468 | 468 | $oContext->loadFile(array('./common/js/modernizr.js', 'head', '', -100000), true); |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $oContext->loadFile(array('./common/js/xml2json.js', 'head', '', -100000), true); |
| 473 | 473 | $oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true); |
| 474 | 474 | $oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true); |
| 475 | - if(!__DISABLE_DEFAULT_CSS__) |
|
| 475 | + if (!__DISABLE_DEFAULT_CSS__) |
|
| 476 | 476 | { |
| 477 | 477 | $oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true); |
| 478 | 478 | $oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true); |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | $oContext->loadFile(array('./common/js/jquery.min.js', 'head', '', -110000), true); |
| 489 | 489 | $oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true); |
| 490 | 490 | $oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true); |
| 491 | - if(!__DISABLE_DEFAULT_CSS__) |
|
| 491 | + if (!__DISABLE_DEFAULT_CSS__) |
|
| 492 | 492 | { |
| 493 | 493 | $oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true); |
| 494 | 494 | $oContext->loadFile(array('./common/css/mobile.min.css', '', '', -1000000), true); |
@@ -23,8 +23,7 @@ discard block |
||
| 23 | 23 | if($oModule->module_info->module == $oModule->module) |
| 24 | 24 | { |
| 25 | 25 | $skin = $oModule->origin_module_info->skin; |
| 26 | - } |
|
| 27 | - else |
|
| 26 | + } else |
|
| 28 | 27 | { |
| 29 | 28 | $skin = $oModule->module_config->skin; |
| 30 | 29 | } |
@@ -44,13 +43,11 @@ discard block |
||
| 44 | 43 | $template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]); |
| 45 | 44 | } |
| 46 | 45 | } |
| 47 | - } |
|
| 48 | - else |
|
| 46 | + } else |
|
| 49 | 47 | { |
| 50 | 48 | $template_path = $oModule->getTemplatePath(); |
| 51 | 49 | } |
| 52 | - } |
|
| 53 | - else |
|
| 50 | + } else |
|
| 54 | 51 | { |
| 55 | 52 | $template_path = $oModule->getTemplatePath(); |
| 56 | 53 | } |
@@ -228,8 +225,7 @@ discard block |
||
| 228 | 225 | { |
| 229 | 226 | $this->_loadMobileJSCSS(); |
| 230 | 227 | $output = $oTemplate->compile('./common/tpl', 'mobile_layout'); |
| 231 | - } |
|
| 232 | - else |
|
| 228 | + } else |
|
| 233 | 229 | { |
| 234 | 230 | $this->_loadJSCSS(); |
| 235 | 231 | $output = $oTemplate->compile('./common/tpl', 'common_layout'); |
@@ -405,13 +401,11 @@ discard block |
||
| 405 | 401 | if(!__DISABLE_DEFAULT_CSS__) |
| 406 | 402 | { |
| 407 | 403 | $oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true); |
| 408 | - } |
|
| 409 | - else |
|
| 404 | + } else |
|
| 410 | 405 | { |
| 411 | 406 | $oContext->unloadFile(array('./common/css/xe.css', '', '', -1000000), true); |
| 412 | 407 | } |
| 413 | - } |
|
| 414 | - else |
|
| 408 | + } else |
|
| 415 | 409 | { |
| 416 | 410 | $oContext->loadFile(array('./common/js/jquery-1.x.min.js', 'head', 'lt IE 9', -111000), true); |
| 417 | 411 | $oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true); |
@@ -420,8 +414,7 @@ discard block |
||
| 420 | 414 | if(!__DISABLE_DEFAULT_CSS__) |
| 421 | 415 | { |
| 422 | 416 | $oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true); |
| 423 | - } |
|
| 424 | - else |
|
| 417 | + } else |
|
| 425 | 418 | { |
| 426 | 419 | $oContext->unloadFile(array('./common/css/xe.min.css', '', '', -1000000), true); |
| 427 | 420 | } |
@@ -439,8 +432,7 @@ discard block |
||
| 439 | 432 | $oContext->loadFile(array('./modules/admin/tpl/css/admin.bootstrap.css', '', '', 1), true); |
| 440 | 433 | $oContext->loadFile(array('./modules/admin/tpl/js/jquery.tmpl.js', '', '', 1), true); |
| 441 | 434 | $oContext->loadFile(array('./modules/admin/tpl/js/jquery.jstree.js', '', '', 1), true); |
| 442 | - } |
|
| 443 | - else |
|
| 435 | + } else |
|
| 444 | 436 | { |
| 445 | 437 | $oContext->loadFile(array('./modules/admin/tpl/css/admin.min.css', '', '', 10), true); |
| 446 | 438 | $oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true); |
@@ -476,14 +468,12 @@ discard block |
||
| 476 | 468 | { |
| 477 | 469 | $oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true); |
| 478 | 470 | $oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true); |
| 479 | - } |
|
| 480 | - else |
|
| 471 | + } else |
|
| 481 | 472 | { |
| 482 | 473 | $oContext->unloadFile(array('./common/css/xe.css', '', '', -1000000), true); |
| 483 | 474 | $oContext->unloadFile(array('./common/css/mobile.css', '', '', -1000000), true); |
| 484 | 475 | } |
| 485 | - } |
|
| 486 | - else |
|
| 476 | + } else |
|
| 487 | 477 | { |
| 488 | 478 | $oContext->loadFile(array('./common/js/jquery.min.js', 'head', '', -110000), true); |
| 489 | 479 | $oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true); |
@@ -492,8 +482,7 @@ discard block |
||
| 492 | 482 | { |
| 493 | 483 | $oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true); |
| 494 | 484 | $oContext->loadFile(array('./common/css/mobile.min.css', '', '', -1000000), true); |
| 495 | - } |
|
| 496 | - else |
|
| 485 | + } else |
|
| 497 | 486 | { |
| 498 | 487 | $oContext->unloadFile(array('./common/css/xe.min.css', '', '', -1000000), true); |
| 499 | 488 | $oContext->unloadFile(array('./common/css/mobile.min.css', '', '', -1000000), true); |
@@ -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,25 +297,25 @@ 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 | 311 | // Require a function-defined-file for simple use |
| 312 | -require(_XE_PATH_ . 'config/func.inc.php'); |
|
| 312 | +require(_XE_PATH_.'config/func.inc.php'); |
|
| 313 | 313 | |
| 314 | -if(__DEBUG__) { |
|
| 314 | +if (__DEBUG__) { |
|
| 315 | 315 | define('__StartTime__', getMicroTime()); |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | -if(__DEBUG__) { |
|
| 318 | +if (__DEBUG__) { |
|
| 319 | 319 | $GLOBALS['__elapsed_class_load__'] = 0; |
| 320 | 320 | } |
| 321 | 321 | |
@@ -418,38 +418,38 @@ discard block |
||
| 418 | 418 | |
| 419 | 419 | function __xe_autoload($class_name) |
| 420 | 420 | { |
| 421 | - if(__DEBUG__) { |
|
| 421 | + if (__DEBUG__) { |
|
| 422 | 422 | $time_at = getMicroTime(); |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - if(isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) |
|
| 425 | + if (isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) |
|
| 426 | 426 | { |
| 427 | - require _XE_PATH_ . $GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; |
|
| 427 | + require _XE_PATH_.$GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; |
|
| 428 | 428 | } |
| 429 | - elseif(preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) |
|
| 429 | + elseif (preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) |
|
| 430 | 430 | { |
| 431 | 431 | $candidate_filename = array(); |
| 432 | - $candidate_filename[] = 'modules/' . $matches[1] . '/' . $matches[1]; |
|
| 433 | - if(isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; |
|
| 432 | + $candidate_filename[] = 'modules/'.$matches[1].'/'.$matches[1]; |
|
| 433 | + if (isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; |
|
| 434 | 434 | $candidate_filename[] = (isset($matches[3]) && $matches[3]) ? strtolower($matches[3]) : 'class'; |
| 435 | 435 | $candidate_filename[] = 'php'; |
| 436 | 436 | |
| 437 | 437 | $candidate_filename = implode('.', $candidate_filename); |
| 438 | 438 | |
| 439 | - if(file_exists(_XE_PATH_ . $candidate_filename)) |
|
| 439 | + if (file_exists(_XE_PATH_.$candidate_filename)) |
|
| 440 | 440 | { |
| 441 | - require _XE_PATH_ . $candidate_filename; |
|
| 441 | + require _XE_PATH_.$candidate_filename; |
|
| 442 | 442 | } |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | - if(__DEBUG__) { |
|
| 445 | + if (__DEBUG__) { |
|
| 446 | 446 | $GLOBALS['__elapsed_class_load__'] += getMicroTime() - $time_at; |
| 447 | 447 | } |
| 448 | 448 | } |
| 449 | 449 | spl_autoload_register('__xe_autoload'); |
| 450 | 450 | |
| 451 | -if(file_exists(_XE_PATH_ . '/vendor/autoload.php')) { |
|
| 452 | - require _XE_PATH_ . '/vendor/autoload.php'; |
|
| 451 | +if (file_exists(_XE_PATH_.'/vendor/autoload.php')) { |
|
| 452 | + require _XE_PATH_.'/vendor/autoload.php'; |
|
| 453 | 453 | } |
| 454 | 454 | /* End of file config.inc.php */ |
| 455 | 455 | /* Location: ./config/config.inc.php */ |