@@ -956,10 +956,10 @@ |
||
| 956 | 956 | |
| 957 | 957 | $file_exsit = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname); |
| 958 | 958 | if(!$file_exsit && $default === true) |
| 959 | - { |
|
| 960 | - $icon_url = './modules/admin/tpl/img/' . $default_icon_name; |
|
| 961 | - } |
|
| 962 | - elseif($file_exsit) |
|
| 959 | + { |
|
| 960 | + $icon_url = './modules/admin/tpl/img/' . $default_icon_name; |
|
| 961 | + } |
|
| 962 | + elseif($file_exsit) |
|
| 963 | 963 | { |
| 964 | 964 | $default_url = Context::getDefaultUrl(); |
| 965 | 965 | if($default_url && substr_compare($default_url, '/', -1) === 0) $default_url = substr($default_url, 0, -1); |
@@ -30,18 +30,18 @@ discard block |
||
| 30 | 30 | { |
| 31 | 31 | $ftp_info = Context::getRequestVars(); |
| 32 | 32 | |
| 33 | - if(!$ftp_info->ftp_host) |
|
| 33 | + if (!$ftp_info->ftp_host) |
|
| 34 | 34 | { |
| 35 | 35 | $ftp_info->ftp_host = "127.0.0.1"; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 38 | + if (!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 39 | 39 | { |
| 40 | 40 | $ftp_info->ftp_port = '22'; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $connection = ssh2_connect($ftp_info->ftp_host, $ftp_info->ftp_port); |
| 44 | - if(!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 44 | + if (!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 45 | 45 | { |
| 46 | 46 | return new Object(-1, 'msg_ftp_invalid_auth_info'); |
| 47 | 47 | } |
@@ -58,29 +58,29 @@ discard block |
||
| 58 | 58 | $path_candidate = array(); |
| 59 | 59 | |
| 60 | 60 | $temp = ''; |
| 61 | - foreach($path_info as $path) |
|
| 61 | + foreach ($path_info as $path) |
|
| 62 | 62 | { |
| 63 | - $temp = '/' . $path . $temp; |
|
| 63 | + $temp = '/'.$path.$temp; |
|
| 64 | 64 | $path_candidate[] = $temp; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | // try |
| 68 | - foreach($path_candidate as $path) |
|
| 68 | + foreach ($path_candidate as $path) |
|
| 69 | 69 | { |
| 70 | 70 | // upload check file |
| 71 | - if(!@ssh2_scp_send($connection, FileHandler::getRealPath('./files/cache/ftp_check'), $path . 'ftp_check.html')) |
|
| 71 | + if (!@ssh2_scp_send($connection, FileHandler::getRealPath('./files/cache/ftp_check'), $path.'ftp_check.html')) |
|
| 72 | 72 | { |
| 73 | 73 | continue; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | // get check file |
| 77 | - $result = FileHandler::getRemoteResource(getNotencodedFullUrl() . 'ftp_check.html'); |
|
| 77 | + $result = FileHandler::getRemoteResource(getNotencodedFullUrl().'ftp_check.html'); |
|
| 78 | 78 | |
| 79 | 79 | // delete temp check file |
| 80 | - @ssh2_sftp_unlink($sftp, $path . 'ftp_check.html'); |
|
| 80 | + @ssh2_sftp_unlink($sftp, $path.'ftp_check.html'); |
|
| 81 | 81 | |
| 82 | 82 | // found |
| 83 | - if($result == $pin) |
|
| 83 | + if ($result == $pin) |
|
| 84 | 84 | { |
| 85 | 85 | $found_path = $path; |
| 86 | 86 | break; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | FileHandler::removeFile('./files/cache/ftp_check', $pin); |
| 91 | 91 | |
| 92 | - if($found_path) |
|
| 92 | + if ($found_path) |
|
| 93 | 93 | { |
| 94 | 94 | $this->add('found_path', $found_path); |
| 95 | 95 | } |
@@ -99,24 +99,24 @@ discard block |
||
| 99 | 99 | { |
| 100 | 100 | $ftp_info = Context::getRequestVars(); |
| 101 | 101 | |
| 102 | - if(!$ftp_info->ftp_host) |
|
| 102 | + if (!$ftp_info->ftp_host) |
|
| 103 | 103 | { |
| 104 | 104 | $ftp_info->ftp_host = "127.0.0.1"; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 107 | + if (!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 108 | 108 | { |
| 109 | 109 | $ftp_info->ftp_port = '22'; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $connection = ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port); |
| 113 | - if(!$connection) |
|
| 113 | + if (!$connection) |
|
| 114 | 114 | { |
| 115 | 115 | return new Object(-1, sprintf(Context::getLang('msg_ftp_not_connected'), 'host')); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | $login_result = @ftp_login($connection, $ftp_info->ftp_user, $ftp_info->ftp_password); |
| 119 | - if(!$login_result) |
|
| 119 | + if (!$login_result) |
|
| 120 | 120 | { |
| 121 | 121 | ftp_close($connection); |
| 122 | 122 | return new Object(-1, 'msg_ftp_invalid_auth_info'); |
@@ -133,29 +133,29 @@ discard block |
||
| 133 | 133 | $path_candidate = array(); |
| 134 | 134 | |
| 135 | 135 | $temp = ''; |
| 136 | - foreach($path_info as $path) |
|
| 136 | + foreach ($path_info as $path) |
|
| 137 | 137 | { |
| 138 | - $temp = '/' . $path . $temp; |
|
| 138 | + $temp = '/'.$path.$temp; |
|
| 139 | 139 | $path_candidate[] = $temp; |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | // try |
| 143 | - foreach($path_candidate as $path) |
|
| 143 | + foreach ($path_candidate as $path) |
|
| 144 | 144 | { |
| 145 | 145 | // upload check file |
| 146 | - if(!ftp_put($connection, $path . 'ftp_check.html', FileHandler::getRealPath('./files/cache/ftp_check'), FTP_BINARY)) |
|
| 146 | + if (!ftp_put($connection, $path.'ftp_check.html', FileHandler::getRealPath('./files/cache/ftp_check'), FTP_BINARY)) |
|
| 147 | 147 | { |
| 148 | 148 | continue; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | // get check file |
| 152 | - $result = FileHandler::getRemoteResource(getNotencodedFullUrl() . 'ftp_check.html'); |
|
| 152 | + $result = FileHandler::getRemoteResource(getNotencodedFullUrl().'ftp_check.html'); |
|
| 153 | 153 | |
| 154 | 154 | // delete temp check file |
| 155 | - ftp_delete($connection, $path . 'ftp_check.html'); |
|
| 155 | + ftp_delete($connection, $path.'ftp_check.html'); |
|
| 156 | 156 | |
| 157 | 157 | // found |
| 158 | - if($result == $pin) |
|
| 158 | + if ($result == $pin) |
|
| 159 | 159 | { |
| 160 | 160 | $found_path = $path; |
| 161 | 161 | break; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | FileHandler::removeFile('./files/cache/ftp_check', $pin); |
| 166 | 166 | |
| 167 | - if($found_path) |
|
| 167 | + if ($found_path) |
|
| 168 | 168 | { |
| 169 | 169 | $this->add('found_path', $found_path); |
| 170 | 170 | } |
@@ -175,39 +175,39 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | function getAdminFTPPath() |
| 177 | 177 | { |
| 178 | - Context::loadLang(_XE_PATH_ . 'modules/autoinstall/lang'); |
|
| 178 | + Context::loadLang(_XE_PATH_.'modules/autoinstall/lang'); |
|
| 179 | 179 | @set_time_limit(5); |
| 180 | - require_once(_XE_PATH_ . 'libs/ftp.class.php'); |
|
| 180 | + require_once(_XE_PATH_.'libs/ftp.class.php'); |
|
| 181 | 181 | |
| 182 | 182 | $ftp_info = Context::getRequestVars(); |
| 183 | 183 | |
| 184 | - if(!$ftp_info->ftp_user || !$ftp_info->ftp_password) |
|
| 184 | + if (!$ftp_info->ftp_user || !$ftp_info->ftp_password) |
|
| 185 | 185 | { |
| 186 | 186 | return new Object(1, 'msg_ftp_invalid_auth_info'); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - if(!$ftp_info->ftp_host) |
|
| 189 | + if (!$ftp_info->ftp_host) |
|
| 190 | 190 | { |
| 191 | 191 | $ftp_info->ftp_host = '127.0.0.1'; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 194 | + if (!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 195 | 195 | { |
| 196 | 196 | $ftp_info->ftp_port = '21'; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - if($ftp_info->sftp == 'Y') |
|
| 199 | + if ($ftp_info->sftp == 'Y') |
|
| 200 | 200 | { |
| 201 | - if(!function_exists('ssh2_sftp')) |
|
| 201 | + if (!function_exists('ssh2_sftp')) |
|
| 202 | 202 | { |
| 203 | 203 | return new Object(-1, 'disable_sftp_support'); |
| 204 | 204 | } |
| 205 | 205 | return $this->getSFTPPath(); |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | - if($ftp_info->ftp_pasv == 'N') |
|
| 208 | + if ($ftp_info->ftp_pasv == 'N') |
|
| 209 | 209 | { |
| 210 | - if(function_exists('ftp_connect')) |
|
| 210 | + if (function_exists('ftp_connect')) |
|
| 211 | 211 | { |
| 212 | 212 | return $this->getFTPPath(); |
| 213 | 213 | } |
@@ -215,12 +215,12 @@ discard block |
||
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | $oFTP = new ftp(); |
| 218 | - if(!$oFTP->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port)) |
|
| 218 | + if (!$oFTP->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port)) |
|
| 219 | 219 | { |
| 220 | 220 | return new Object(1, sprintf(Context::getLang('msg_ftp_not_connected'), 'host')); |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | - if(!$oFTP->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 223 | + if (!$oFTP->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 224 | 224 | { |
| 225 | 225 | return new Object(1, 'msg_ftp_invalid_auth_info'); |
| 226 | 226 | } |
@@ -236,29 +236,29 @@ discard block |
||
| 236 | 236 | $path_candidate = array(); |
| 237 | 237 | |
| 238 | 238 | $temp = ''; |
| 239 | - foreach($path_info as $path) |
|
| 239 | + foreach ($path_info as $path) |
|
| 240 | 240 | { |
| 241 | - $temp = '/' . $path . $temp; |
|
| 241 | + $temp = '/'.$path.$temp; |
|
| 242 | 242 | $path_candidate[] = $temp; |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | // try |
| 246 | - foreach($path_candidate as $path) |
|
| 246 | + foreach ($path_candidate as $path) |
|
| 247 | 247 | { |
| 248 | 248 | // upload check file |
| 249 | - if(!$oFTP->ftp_put($path . 'ftp_check.html', FileHandler::getRealPath('./files/cache/ftp_check'))) |
|
| 249 | + if (!$oFTP->ftp_put($path.'ftp_check.html', FileHandler::getRealPath('./files/cache/ftp_check'))) |
|
| 250 | 250 | { |
| 251 | 251 | continue; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | // get check file |
| 255 | - $result = FileHandler::getRemoteResource(getNotencodedFullUrl() . 'ftp_check.html'); |
|
| 255 | + $result = FileHandler::getRemoteResource(getNotencodedFullUrl().'ftp_check.html'); |
|
| 256 | 256 | |
| 257 | 257 | // delete temp check file |
| 258 | - $oFTP->ftp_delete($path . 'ftp_check.html'); |
|
| 258 | + $oFTP->ftp_delete($path.'ftp_check.html'); |
|
| 259 | 259 | |
| 260 | 260 | // found |
| 261 | - if($result == $pin) |
|
| 261 | + if ($result == $pin) |
|
| 262 | 262 | { |
| 263 | 263 | $found_path = $path; |
| 264 | 264 | break; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | |
| 268 | 268 | FileHandler::removeFile('./files/cache/ftp_check', $pin); |
| 269 | 269 | |
| 270 | - if($found_path) |
|
| 270 | + if ($found_path) |
|
| 271 | 271 | { |
| 272 | 272 | $this->add('found_path', $found_path); |
| 273 | 273 | } |
@@ -280,27 +280,27 @@ discard block |
||
| 280 | 280 | function getSFTPList() |
| 281 | 281 | { |
| 282 | 282 | $ftp_info = Context::getRequestVars(); |
| 283 | - if(!$ftp_info->ftp_host) |
|
| 283 | + if (!$ftp_info->ftp_host) |
|
| 284 | 284 | { |
| 285 | 285 | $ftp_info->ftp_host = "127.0.0.1"; |
| 286 | 286 | } |
| 287 | 287 | $connection = ssh2_connect($ftp_info->ftp_host, $ftp_info->ftp_port); |
| 288 | - if(!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 288 | + if (!ssh2_auth_password($connection, $ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 289 | 289 | { |
| 290 | 290 | return new Object(-1, 'msg_ftp_invalid_auth_info'); |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | 293 | $sftp = ssh2_sftp($connection); |
| 294 | - $curpwd = "ssh2.sftp://$sftp" . $this->pwd; |
|
| 294 | + $curpwd = "ssh2.sftp://$sftp".$this->pwd; |
|
| 295 | 295 | $dh = @opendir($curpwd); |
| 296 | - if(!$dh) |
|
| 296 | + if (!$dh) |
|
| 297 | 297 | { |
| 298 | 298 | return new Object(-1, 'msg_ftp_invalid_path'); |
| 299 | 299 | } |
| 300 | 300 | $list = array(); |
| 301 | - while(($file = readdir($dh)) !== FALSE) |
|
| 301 | + while (($file = readdir($dh)) !== FALSE) |
|
| 302 | 302 | { |
| 303 | - if(is_dir($curpwd . $file)) |
|
| 303 | + if (is_dir($curpwd.$file)) |
|
| 304 | 304 | { |
| 305 | 305 | $file .= "/"; |
| 306 | 306 | } |
@@ -320,32 +320,32 @@ discard block |
||
| 320 | 320 | */ |
| 321 | 321 | function getAdminFTPList() |
| 322 | 322 | { |
| 323 | - Context::loadLang(_XE_PATH_ . 'modules/autoinstall/lang'); |
|
| 323 | + Context::loadLang(_XE_PATH_.'modules/autoinstall/lang'); |
|
| 324 | 324 | @set_time_limit(5); |
| 325 | 325 | |
| 326 | - require_once(_XE_PATH_ . 'libs/ftp.class.php'); |
|
| 326 | + require_once(_XE_PATH_.'libs/ftp.class.php'); |
|
| 327 | 327 | |
| 328 | 328 | $ftp_info = Context::getRequestVars(); |
| 329 | - if(!$ftp_info->ftp_user || !$ftp_info->ftp_password) |
|
| 329 | + if (!$ftp_info->ftp_user || !$ftp_info->ftp_password) |
|
| 330 | 330 | { |
| 331 | 331 | return new Object(-1, 'msg_ftp_invalid_auth_info'); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | $this->pwd = $ftp_info->ftp_root_path; |
| 335 | 335 | |
| 336 | - if(!$ftp_info->ftp_host) |
|
| 336 | + if (!$ftp_info->ftp_host) |
|
| 337 | 337 | { |
| 338 | 338 | $ftp_info->ftp_host = "127.0.0.1"; |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | - if(!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 341 | + if (!$ftp_info->ftp_port || !is_numeric($ftp_info->ftp_port)) |
|
| 342 | 342 | { |
| 343 | 343 | $ftp_info->ftp_port = "21"; |
| 344 | 344 | } |
| 345 | 345 | |
| 346 | - if($ftp_info->sftp == 'Y') |
|
| 346 | + if ($ftp_info->sftp == 'Y') |
|
| 347 | 347 | { |
| 348 | - if(!function_exists('ssh2_sftp')) |
|
| 348 | + if (!function_exists('ssh2_sftp')) |
|
| 349 | 349 | { |
| 350 | 350 | return new Object(-1, 'disable_sftp_support'); |
| 351 | 351 | } |
@@ -353,9 +353,9 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | $oFtp = new ftp(); |
| 356 | - if($oFtp->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port)) |
|
| 356 | + if ($oFtp->ftp_connect($ftp_info->ftp_host, $ftp_info->ftp_port)) |
|
| 357 | 357 | { |
| 358 | - if($oFtp->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 358 | + if ($oFtp->ftp_login($ftp_info->ftp_user, $ftp_info->ftp_password)) |
|
| 359 | 359 | { |
| 360 | 360 | $_list = $oFtp->ftp_rawlist($this->pwd); |
| 361 | 361 | $oFtp->ftp_quit(); |
@@ -367,17 +367,17 @@ discard block |
||
| 367 | 367 | } |
| 368 | 368 | $list = array(); |
| 369 | 369 | |
| 370 | - if($_list) |
|
| 370 | + if ($_list) |
|
| 371 | 371 | { |
| 372 | - foreach($_list as $k => $v) |
|
| 372 | + foreach ($_list as $k => $v) |
|
| 373 | 373 | { |
| 374 | 374 | $src = new stdClass(); |
| 375 | 375 | $src->data = $v; |
| 376 | 376 | $res = Context::convertEncoding($src); |
| 377 | 377 | $v = $res->data; |
| 378 | - if(strpos($v, 'd') === 0 || strpos($v, '<DIR>')) |
|
| 378 | + if (strpos($v, 'd') === 0 || strpos($v, '<DIR>')) |
|
| 379 | 379 | { |
| 380 | - $list[] = substr(strrchr($v, ' '), 1) . '/'; |
|
| 380 | + $list[] = substr(strrchr($v, ' '), 1).'/'; |
|
| 381 | 381 | } |
| 382 | 382 | } |
| 383 | 383 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | , 'module' => array('addon', 'admin', 'autoinstall', 'comment', 'communication', 'counter', 'document', 'editor', 'file', 'importer', 'install', 'integration_search', 'layout', 'member', 'menu', 'message', 'module', 'opage', 'page', 'point', 'poll', 'rss', 'session', 'spamfilter', 'tag', 'trackback', 'trash', 'widget') |
| 401 | 401 | , 'addon' => array('autolink', 'blogapi', 'captcha', 'counter', 'member_communication', 'member_extra_info', 'mobile', 'openid_delegation_id', 'point_level_icon', 'resize_image') |
| 402 | 402 | , 'layout' => array('default') |
| 403 | - , 'widget' => array('content', 'language_select', 'login_info','mcontent') |
|
| 403 | + , 'widget' => array('content', 'language_select', 'login_info', 'mcontent') |
|
| 404 | 404 | , 'widgetstyle' => array(), |
| 405 | 405 | ); |
| 406 | 406 | $info = array(); |
@@ -420,86 +420,86 @@ discard block |
||
| 420 | 420 | $info['use_ssl'] = $db_info->use_ssl; |
| 421 | 421 | |
| 422 | 422 | $info['phpext'] = ''; |
| 423 | - foreach(get_loaded_extensions() as $ext) |
|
| 423 | + foreach (get_loaded_extensions() as $ext) |
|
| 424 | 424 | { |
| 425 | 425 | $ext = strtolower($ext); |
| 426 | - if(in_array($ext, $skip['ext'])) |
|
| 426 | + if (in_array($ext, $skip['ext'])) |
|
| 427 | 427 | { |
| 428 | 428 | continue; |
| 429 | 429 | } |
| 430 | - $info['phpext'] .= '|' . $ext; |
|
| 430 | + $info['phpext'] .= '|'.$ext; |
|
| 431 | 431 | } |
| 432 | 432 | $info['phpext'] = substr($info['phpext'], 1); |
| 433 | 433 | |
| 434 | 434 | $info['module'] = ''; |
| 435 | 435 | $oModuleModel = getModel('module'); |
| 436 | 436 | $module_list = $oModuleModel->getModuleList(); |
| 437 | - if($module_list) foreach($module_list as $module) |
|
| 437 | + if ($module_list) foreach ($module_list as $module) |
|
| 438 | 438 | { |
| 439 | - if(in_array($module->module, $skip['module'])) |
|
| 439 | + if (in_array($module->module, $skip['module'])) |
|
| 440 | 440 | { |
| 441 | 441 | continue; |
| 442 | 442 | } |
| 443 | - $info['module'] .= '|' . $module->module; |
|
| 443 | + $info['module'] .= '|'.$module->module; |
|
| 444 | 444 | } |
| 445 | 445 | $info['module'] = substr($info['module'], 1); |
| 446 | 446 | |
| 447 | 447 | $info['addon'] = ''; |
| 448 | 448 | $oAddonAdminModel = getAdminModel('addon'); |
| 449 | 449 | $addon_list = $oAddonAdminModel->getAddonList(); |
| 450 | - if($addon_list) foreach($addon_list as $addon) |
|
| 450 | + if ($addon_list) foreach ($addon_list as $addon) |
|
| 451 | 451 | { |
| 452 | - if(in_array($addon->addon, $skip['addon'])) |
|
| 452 | + if (in_array($addon->addon, $skip['addon'])) |
|
| 453 | 453 | { |
| 454 | 454 | continue; |
| 455 | 455 | } |
| 456 | - $info['addon'] .= '|' . $addon->addon; |
|
| 456 | + $info['addon'] .= '|'.$addon->addon; |
|
| 457 | 457 | } |
| 458 | 458 | $info['addon'] = substr($info['addon'], 1); |
| 459 | 459 | |
| 460 | 460 | $info['layout'] = ""; |
| 461 | 461 | $oLayoutModel = getModel('layout'); |
| 462 | 462 | $layout_list = $oLayoutModel->getDownloadedLayoutList(); |
| 463 | - if($layout_list) foreach($layout_list as $layout) |
|
| 463 | + if ($layout_list) foreach ($layout_list as $layout) |
|
| 464 | 464 | { |
| 465 | - if(in_array($layout->layout, $skip['layout'])) |
|
| 465 | + if (in_array($layout->layout, $skip['layout'])) |
|
| 466 | 466 | { |
| 467 | 467 | continue; |
| 468 | 468 | } |
| 469 | - $info['layout'] .= '|' . $layout->layout; |
|
| 469 | + $info['layout'] .= '|'.$layout->layout; |
|
| 470 | 470 | } |
| 471 | 471 | $info['layout'] = substr($info['layout'], 1); |
| 472 | 472 | |
| 473 | 473 | $info['widget'] = ""; |
| 474 | 474 | $oWidgetModel = getModel('widget'); |
| 475 | 475 | $widget_list = $oWidgetModel->getDownloadedWidgetList(); |
| 476 | - if($widget_list) foreach($widget_list as $widget) |
|
| 476 | + if ($widget_list) foreach ($widget_list as $widget) |
|
| 477 | 477 | { |
| 478 | - if(in_array($widget->widget, $skip['widget'])) |
|
| 478 | + if (in_array($widget->widget, $skip['widget'])) |
|
| 479 | 479 | { |
| 480 | 480 | continue; |
| 481 | 481 | } |
| 482 | - $info['widget'] .= '|' . $widget->widget; |
|
| 482 | + $info['widget'] .= '|'.$widget->widget; |
|
| 483 | 483 | } |
| 484 | 484 | $info['widget'] = substr($info['widget'], 1); |
| 485 | 485 | |
| 486 | 486 | $info['widgetstyle'] = ""; |
| 487 | 487 | $oWidgetModel = getModel('widget'); |
| 488 | 488 | $widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList(); |
| 489 | - if($widgetstyle_list) foreach($widgetstyle_list as $widgetstyle) |
|
| 489 | + if ($widgetstyle_list) foreach ($widgetstyle_list as $widgetstyle) |
|
| 490 | 490 | { |
| 491 | - if(in_array($widgetstyle->widgetStyle, $skip['widgetstyle'])) |
|
| 491 | + if (in_array($widgetstyle->widgetStyle, $skip['widgetstyle'])) |
|
| 492 | 492 | { |
| 493 | 493 | continue; |
| 494 | 494 | } |
| 495 | - $info['widgetstyle'] .= '|' . $widgetstyle->widgetStyle; |
|
| 495 | + $info['widgetstyle'] .= '|'.$widgetstyle->widgetStyle; |
|
| 496 | 496 | } |
| 497 | 497 | $info['widgetstyle'] = substr($info['widgetstyle'], 1); |
| 498 | 498 | |
| 499 | 499 | $param = ''; |
| 500 | - foreach($info as $k => $v) |
|
| 500 | + foreach ($info as $k => $v) |
|
| 501 | 501 | { |
| 502 | - if($v) |
|
| 502 | + if ($v) |
|
| 503 | 503 | { |
| 504 | 504 | $param .= sprintf('&%s=%s', $k, urlencode($v)); |
| 505 | 505 | } |
@@ -515,13 +515,13 @@ discard block |
||
| 515 | 515 | */ |
| 516 | 516 | function getThemeList() |
| 517 | 517 | { |
| 518 | - $path = _XE_PATH_ . 'themes'; |
|
| 518 | + $path = _XE_PATH_.'themes'; |
|
| 519 | 519 | $list = FileHandler::readDir($path); |
| 520 | 520 | |
| 521 | 521 | $theme_info = array(); |
| 522 | - if(count($list) > 0) |
|
| 522 | + if (count($list) > 0) |
|
| 523 | 523 | { |
| 524 | - foreach($list as $val) |
|
| 524 | + foreach ($list as $val) |
|
| 525 | 525 | { |
| 526 | 526 | $theme_info[$val] = $this->getThemeInfo($val); |
| 527 | 527 | } |
@@ -538,20 +538,20 @@ discard block |
||
| 538 | 538 | */ |
| 539 | 539 | function getThemeInfo($theme_name, $layout_list = NULL) |
| 540 | 540 | { |
| 541 | - if($GLOBALS['__ThemeInfo__'][$theme_name]) |
|
| 541 | + if ($GLOBALS['__ThemeInfo__'][$theme_name]) |
|
| 542 | 542 | { |
| 543 | 543 | return $GLOBALS['__ThemeInfo__'][$theme_name]; |
| 544 | 544 | } |
| 545 | 545 | |
| 546 | - $info_file = _XE_PATH_ . 'themes/' . $theme_name . '/conf/info.xml'; |
|
| 547 | - if(!file_exists($info_file)) |
|
| 546 | + $info_file = _XE_PATH_.'themes/'.$theme_name.'/conf/info.xml'; |
|
| 547 | + if (!file_exists($info_file)) |
|
| 548 | 548 | { |
| 549 | 549 | return; |
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | $oXmlParser = new XmlParser(); |
| 553 | 553 | $_xml_obj = $oXmlParser->loadXmlFile($info_file); |
| 554 | - if(!$_xml_obj->theme) |
|
| 554 | + if (!$_xml_obj->theme) |
|
| 555 | 555 | { |
| 556 | 556 | return; |
| 557 | 557 | } |
@@ -562,16 +562,16 @@ discard block |
||
| 562 | 562 | $theme_info = new stdClass(); |
| 563 | 563 | $theme_info->name = $theme_name; |
| 564 | 564 | $theme_info->title = $xml_obj->title->body; |
| 565 | - $thumbnail = './themes/' . $theme_name . '/thumbnail.png'; |
|
| 565 | + $thumbnail = './themes/'.$theme_name.'/thumbnail.png'; |
|
| 566 | 566 | $theme_info->thumbnail = (FileHandler::exists($thumbnail)) ? $thumbnail : NULL; |
| 567 | 567 | $theme_info->version = $xml_obj->version->body; |
| 568 | 568 | $date_obj = new stdClass(); |
| 569 | 569 | sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d); |
| 570 | 570 | $theme_info->date = sprintf('%04d%02d%02d', $date_obj->y, $date_obj->m, $date_obj->d); |
| 571 | 571 | $theme_info->description = $xml_obj->description->body; |
| 572 | - $theme_info->path = './themes/' . $theme_name . '/'; |
|
| 572 | + $theme_info->path = './themes/'.$theme_name.'/'; |
|
| 573 | 573 | |
| 574 | - if(!is_array($xml_obj->publisher)) |
|
| 574 | + if (!is_array($xml_obj->publisher)) |
|
| 575 | 575 | { |
| 576 | 576 | $publisher_list = array(); |
| 577 | 577 | $publisher_list[] = $xml_obj->publisher; |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | } |
| 583 | 583 | |
| 584 | 584 | $theme_info->publisher = array(); |
| 585 | - foreach($publisher_list as $publisher) |
|
| 585 | + foreach ($publisher_list as $publisher) |
|
| 586 | 586 | { |
| 587 | 587 | $publisher_obj = new stdClass(); |
| 588 | 588 | $publisher_obj->name = $publisher->name->body; |
@@ -595,10 +595,10 @@ discard block |
||
| 595 | 595 | $layout_path = $layout->directory->attrs->path; |
| 596 | 596 | $layout_parse = explode('/', $layout_path); |
| 597 | 597 | $layout_info = new stdClass(); |
| 598 | - switch($layout_parse[1]) |
|
| 598 | + switch ($layout_parse[1]) |
|
| 599 | 599 | { |
| 600 | 600 | case 'themes' : |
| 601 | - $layout_info->name = $theme_name . '|@|' . $layout_parse[count($layout_parse) - 1]; |
|
| 601 | + $layout_info->name = $theme_name.'|@|'.$layout_parse[count($layout_parse) - 1]; |
|
| 602 | 602 | break; |
| 603 | 603 | |
| 604 | 604 | case 'layouts' : |
@@ -615,11 +615,11 @@ discard block |
||
| 615 | 615 | $oLayoutModel = getModel('layout'); |
| 616 | 616 | $layout_info_list = array(); |
| 617 | 617 | $layout_list = $oLayoutModel->getLayoutList($site_info->site_srl); |
| 618 | - if($layout_list) |
|
| 618 | + if ($layout_list) |
|
| 619 | 619 | { |
| 620 | - foreach($layout_list as $val) |
|
| 620 | + foreach ($layout_list as $val) |
|
| 621 | 621 | { |
| 622 | - if($val->layout == $layout_info->name) |
|
| 622 | + if ($val->layout == $layout_info->name) |
|
| 623 | 623 | { |
| 624 | 624 | $is_new_layout = FALSE; |
| 625 | 625 | $layout_info->layout_srl = $val->layout_srl; |
@@ -628,7 +628,7 @@ discard block |
||
| 628 | 628 | } |
| 629 | 629 | } |
| 630 | 630 | |
| 631 | - if($is_new_layout) |
|
| 631 | + if ($is_new_layout) |
|
| 632 | 632 | { |
| 633 | 633 | $site_module_info = Context::get('site_module_info'); |
| 634 | 634 | $args = new stdClass(); |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $theme_info->layout_info = $layout_info; |
| 647 | 647 | |
| 648 | 648 | $skin_infos = $xml_obj->skininfos; |
| 649 | - if(is_array($skin_infos->skininfo)) |
|
| 649 | + if (is_array($skin_infos->skininfo)) |
|
| 650 | 650 | { |
| 651 | 651 | $skin_list = $skin_infos->skininfo; |
| 652 | 652 | } |
@@ -657,17 +657,17 @@ discard block |
||
| 657 | 657 | |
| 658 | 658 | $oModuleModel = getModel('module'); |
| 659 | 659 | $skins = array(); |
| 660 | - foreach($skin_list as $val) |
|
| 660 | + foreach ($skin_list as $val) |
|
| 661 | 661 | { |
| 662 | 662 | $skin_info = new stdClass(); |
| 663 | 663 | unset($skin_parse); |
| 664 | 664 | $skin_parse = explode('/', $val->directory->attrs->path); |
| 665 | - switch($skin_parse[1]) |
|
| 665 | + switch ($skin_parse[1]) |
|
| 666 | 666 | { |
| 667 | 667 | case 'themes' : |
| 668 | 668 | $is_theme = TRUE; |
| 669 | 669 | $module_name = $skin_parse[count($skin_parse) - 1]; |
| 670 | - $skin_info->name = $theme_name . '|@|' . $module_name; |
|
| 670 | + $skin_info->name = $theme_name.'|@|'.$module_name; |
|
| 671 | 671 | break; |
| 672 | 672 | |
| 673 | 673 | case 'modules' : |
@@ -681,9 +681,9 @@ discard block |
||
| 681 | 681 | $skin_info->is_theme = $is_theme; |
| 682 | 682 | $skins[$module_name] = $skin_info; |
| 683 | 683 | |
| 684 | - if($is_theme) |
|
| 684 | + if ($is_theme) |
|
| 685 | 685 | { |
| 686 | - if(!$GLOBALS['__ThemeModuleSkin__'][$module_name]) |
|
| 686 | + if (!$GLOBALS['__ThemeModuleSkin__'][$module_name]) |
|
| 687 | 687 | { |
| 688 | 688 | $GLOBALS['__ThemeModuleSkin__'][$module_name] = array(); |
| 689 | 689 | $GLOBALS['__ThemeModuleSkin__'][$module_name]['skins'] = array(); |
@@ -705,7 +705,7 @@ discard block |
||
| 705 | 705 | */ |
| 706 | 706 | function getModulesSkinList() |
| 707 | 707 | { |
| 708 | - if($GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__']) |
|
| 708 | + if ($GLOBALS['__ThemeModuleSkin__']['__IS_PARSE__']) |
|
| 709 | 709 | { |
| 710 | 710 | return $GLOBALS['__ThemeModuleSkin__']; |
| 711 | 711 | } |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | sort($searched_list); |
| 714 | 714 | |
| 715 | 715 | $searched_count = count($searched_list); |
| 716 | - if(!$searched_count) |
|
| 716 | + if (!$searched_count) |
|
| 717 | 717 | { |
| 718 | 718 | return; |
| 719 | 719 | } |
@@ -721,13 +721,13 @@ discard block |
||
| 721 | 721 | $exceptionModule = array('editor', 'poll', 'homepage', 'textyle'); |
| 722 | 722 | |
| 723 | 723 | $oModuleModel = getModel('module'); |
| 724 | - foreach($searched_list as $val) |
|
| 724 | + foreach ($searched_list as $val) |
|
| 725 | 725 | { |
| 726 | - $skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'modules/' . $val); |
|
| 726 | + $skin_list = $oModuleModel->getSkins(_XE_PATH_.'modules/'.$val); |
|
| 727 | 727 | |
| 728 | - if(is_array($skin_list) && count($skin_list) > 0 && !in_array($val, $exceptionModule)) |
|
| 728 | + if (is_array($skin_list) && count($skin_list) > 0 && !in_array($val, $exceptionModule)) |
|
| 729 | 729 | { |
| 730 | - if(!$GLOBALS['__ThemeModuleSkin__'][$val]) |
|
| 730 | + if (!$GLOBALS['__ThemeModuleSkin__'][$val]) |
|
| 731 | 731 | { |
| 732 | 732 | $GLOBALS['__ThemeModuleSkin__'][$val] = array(); |
| 733 | 733 | $moduleInfo = $oModuleModel->getModuleInfoXml($val); |
@@ -752,22 +752,22 @@ discard block |
||
| 752 | 752 | $cacheFile = sprintf('./files/cache/menu/admin_lang/adminMenu.%s.lang.php', $currentLang); |
| 753 | 753 | |
| 754 | 754 | // Update if no cache file exists or it is older than xml file |
| 755 | - if(!is_readable($cacheFile)) |
|
| 755 | + if (!is_readable($cacheFile)) |
|
| 756 | 756 | { |
| 757 | 757 | $lang = new stdClass(); |
| 758 | 758 | $oModuleModel = getModel('module'); |
| 759 | 759 | $installed_module_list = $oModuleModel->getModulesXmlInfo(); |
| 760 | 760 | |
| 761 | 761 | $this->gnbLangBuffer = '<?php $lang = new stdClass();'; |
| 762 | - foreach($installed_module_list AS $key => $value) |
|
| 762 | + foreach ($installed_module_list AS $key => $value) |
|
| 763 | 763 | { |
| 764 | 764 | $moduleActionInfo = $oModuleModel->getModuleActionXml($value->module); |
| 765 | - if(is_object($moduleActionInfo->menu)) |
|
| 765 | + if (is_object($moduleActionInfo->menu)) |
|
| 766 | 766 | { |
| 767 | - foreach($moduleActionInfo->menu AS $key2 => $value2) |
|
| 767 | + foreach ($moduleActionInfo->menu AS $key2 => $value2) |
|
| 768 | 768 | { |
| 769 | 769 | $lang->menu_gnb_sub[$key2] = $value2->title; |
| 770 | - $this->gnbLangBuffer .=sprintf('$lang->menu_gnb_sub[\'%s\'] = \'%s\';', $key2, $value2->title); |
|
| 770 | + $this->gnbLangBuffer .= sprintf('$lang->menu_gnb_sub[\'%s\'] = \'%s\';', $key2, $value2->title); |
|
| 771 | 771 | } |
| 772 | 772 | } |
| 773 | 773 | } |
@@ -793,19 +793,19 @@ discard block |
||
| 793 | 793 | $args = new stdClass(); |
| 794 | 794 | $args->site_srl = $siteSrl; |
| 795 | 795 | $output = executeQueryArray('admin.getFavoriteList', $args); |
| 796 | - if(!$output->toBool()) |
|
| 796 | + if (!$output->toBool()) |
|
| 797 | 797 | { |
| 798 | 798 | return $output; |
| 799 | 799 | } |
| 800 | - if(!$output->data) |
|
| 800 | + if (!$output->data) |
|
| 801 | 801 | { |
| 802 | 802 | return new Object(); |
| 803 | 803 | } |
| 804 | 804 | |
| 805 | - if($isGetModuleInfo && is_array($output->data)) |
|
| 805 | + if ($isGetModuleInfo && is_array($output->data)) |
|
| 806 | 806 | { |
| 807 | 807 | $oModuleModel = getModel('module'); |
| 808 | - foreach($output->data AS $key => $value) |
|
| 808 | + foreach ($output->data AS $key => $value) |
|
| 809 | 809 | { |
| 810 | 810 | $moduleInfo = $oModuleModel->getModuleInfoXml($value->module); |
| 811 | 811 | $output->data[$key]->admin_index_act = $moduleInfo->admin_index_act; |
@@ -830,13 +830,13 @@ discard block |
||
| 830 | 830 | $args->site_srl = $siteSrl; |
| 831 | 831 | $args->module = $module; |
| 832 | 832 | $output = executeQuery('admin.getFavorite', $args); |
| 833 | - if(!$output->toBool()) |
|
| 833 | + if (!$output->toBool()) |
|
| 834 | 834 | { |
| 835 | 835 | return $output; |
| 836 | 836 | } |
| 837 | 837 | |
| 838 | 838 | $returnObject = new Object(); |
| 839 | - if($output->data) |
|
| 839 | + if ($output->data) |
|
| 840 | 840 | { |
| 841 | 841 | $returnObject->add('result', TRUE); |
| 842 | 842 | $returnObject->add('favoriteSrl', $output->data->admin_favorite_srl); |
@@ -855,7 +855,7 @@ discard block |
||
| 855 | 855 | */ |
| 856 | 856 | function getSiteAllList() |
| 857 | 857 | { |
| 858 | - if(Context::get('domain')) |
|
| 858 | + if (Context::get('domain')) |
|
| 859 | 859 | { |
| 860 | 860 | $domain = Context::get('domain'); |
| 861 | 861 | } |
@@ -872,7 +872,7 @@ discard block |
||
| 872 | 872 | function getAllSitesThatHaveModules($domain = NULL) |
| 873 | 873 | { |
| 874 | 874 | $args = new stdClass(); |
| 875 | - if($domain) |
|
| 875 | + if ($domain) |
|
| 876 | 876 | { |
| 877 | 877 | $args->domain = $domain; |
| 878 | 878 | } |
@@ -880,31 +880,31 @@ discard block |
||
| 880 | 880 | |
| 881 | 881 | $siteList = array(); |
| 882 | 882 | $output = executeQueryArray('admin.getSiteAllList', $args, $columnList); |
| 883 | - if($output->toBool()) |
|
| 883 | + if ($output->toBool()) |
|
| 884 | 884 | { |
| 885 | 885 | $siteList = $output->data; |
| 886 | 886 | } |
| 887 | 887 | |
| 888 | 888 | $oModuleModel = getModel('module'); |
| 889 | - foreach($siteList as $key => $value) |
|
| 889 | + foreach ($siteList as $key => $value) |
|
| 890 | 890 | { |
| 891 | 891 | $args->site_srl = $value->site_srl; |
| 892 | 892 | $list = $oModuleModel->getModuleSrlList($args); |
| 893 | 893 | |
| 894 | - if(!is_array($list)) |
|
| 894 | + if (!is_array($list)) |
|
| 895 | 895 | { |
| 896 | 896 | $list = array($list); |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | - foreach($list as $k => $v) |
|
| 899 | + foreach ($list as $k => $v) |
|
| 900 | 900 | { |
| 901 | - if(!is_dir(_XE_PATH_ . 'modules/' . $v->module)) |
|
| 901 | + if (!is_dir(_XE_PATH_.'modules/'.$v->module)) |
|
| 902 | 902 | { |
| 903 | 903 | unset($list[$k]); |
| 904 | 904 | } |
| 905 | 905 | } |
| 906 | 906 | |
| 907 | - if(!count($list)) |
|
| 907 | + if (!count($list)) |
|
| 908 | 908 | { |
| 909 | 909 | unset($siteList[$key]); |
| 910 | 910 | } |
@@ -921,13 +921,13 @@ discard block |
||
| 921 | 921 | { |
| 922 | 922 | $args = new stdClass(); |
| 923 | 923 | |
| 924 | - if($date) |
|
| 924 | + if ($date) |
|
| 925 | 925 | { |
| 926 | 926 | $args->regDate = date('Ymd', strtotime($date)); |
| 927 | 927 | } |
| 928 | 928 | |
| 929 | 929 | $output = executeQuery('admin.getSiteCountByDate', $args); |
| 930 | - if(!$output->toBool()) |
|
| 930 | + if (!$output->toBool()) |
|
| 931 | 931 | { |
| 932 | 932 | return 0; |
| 933 | 933 | } |
@@ -949,21 +949,21 @@ discard block |
||
| 949 | 949 | { |
| 950 | 950 | $site_info = Context::get('site_module_info'); |
| 951 | 951 | $virtual_site = ''; |
| 952 | - if($site_info->site_srl) |
|
| 952 | + if ($site_info->site_srl) |
|
| 953 | 953 | { |
| 954 | - $virtual_site = $site_info->site_srl . '/'; |
|
| 954 | + $virtual_site = $site_info->site_srl.'/'; |
|
| 955 | 955 | } |
| 956 | 956 | |
| 957 | - $file_exsit = FileHandler::readFile(_XE_PATH_ . 'files/attach/xeicon/' . $virtual_site . $iconname); |
|
| 958 | - if(!$file_exsit && $default === true) |
|
| 957 | + $file_exsit = FileHandler::readFile(_XE_PATH_.'files/attach/xeicon/'.$virtual_site.$iconname); |
|
| 958 | + if (!$file_exsit && $default === true) |
|
| 959 | 959 | { |
| 960 | - $icon_url = './modules/admin/tpl/img/' . $default_icon_name; |
|
| 960 | + $icon_url = './modules/admin/tpl/img/'.$default_icon_name; |
|
| 961 | 961 | } |
| 962 | - elseif($file_exsit) |
|
| 962 | + elseif ($file_exsit) |
|
| 963 | 963 | { |
| 964 | 964 | $default_url = Context::getDefaultUrl(); |
| 965 | - if($default_url && substr_compare($default_url, '/', -1) === 0) $default_url = substr($default_url, 0, -1); |
|
| 966 | - $icon_url = $default_url . '/files/attach/xeicon/' . $virtual_site . $iconname; |
|
| 965 | + if ($default_url && substr_compare($default_url, '/', -1) === 0) $default_url = substr($default_url, 0, -1); |
|
| 966 | + $icon_url = $default_url.'/files/attach/xeicon/'.$virtual_site.$iconname; |
|
| 967 | 967 | } |
| 968 | 968 | return $icon_url; |
| 969 | 969 | } |
@@ -303,8 +303,7 @@ discard block |
||
| 303 | 303 | if(is_dir($curpwd . $file)) |
| 304 | 304 | { |
| 305 | 305 | $file .= "/"; |
| 306 | - } |
|
| 307 | - else |
|
| 306 | + } else |
|
| 308 | 307 | { |
| 309 | 308 | continue; |
| 310 | 309 | } |
@@ -359,8 +358,7 @@ discard block |
||
| 359 | 358 | { |
| 360 | 359 | $_list = $oFtp->ftp_rawlist($this->pwd); |
| 361 | 360 | $oFtp->ftp_quit(); |
| 362 | - } |
|
| 363 | - else |
|
| 361 | + } else |
|
| 364 | 362 | { |
| 365 | 363 | return new Object(-1, 'msg_ftp_invalid_auth_info'); |
| 366 | 364 | } |
@@ -380,8 +378,7 @@ discard block |
||
| 380 | 378 | $list[] = substr(strrchr($v, ' '), 1) . '/'; |
| 381 | 379 | } |
| 382 | 380 | } |
| 383 | - } |
|
| 384 | - else |
|
| 381 | + } else |
|
| 385 | 382 | { |
| 386 | 383 | return new Object(-1, 'msg_ftp_no_directory'); |
| 387 | 384 | } |
@@ -434,11 +431,13 @@ discard block |
||
| 434 | 431 | $info['module'] = ''; |
| 435 | 432 | $oModuleModel = getModel('module'); |
| 436 | 433 | $module_list = $oModuleModel->getModuleList(); |
| 437 | - if($module_list) foreach($module_list as $module) |
|
| 434 | + if($module_list) { |
|
| 435 | + foreach($module_list as $module) |
|
| 438 | 436 | { |
| 439 | 437 | if(in_array($module->module, $skip['module'])) |
| 440 | 438 | { |
| 441 | 439 | continue; |
| 440 | + } |
|
| 442 | 441 | } |
| 443 | 442 | $info['module'] .= '|' . $module->module; |
| 444 | 443 | } |
@@ -447,11 +446,13 @@ discard block |
||
| 447 | 446 | $info['addon'] = ''; |
| 448 | 447 | $oAddonAdminModel = getAdminModel('addon'); |
| 449 | 448 | $addon_list = $oAddonAdminModel->getAddonList(); |
| 450 | - if($addon_list) foreach($addon_list as $addon) |
|
| 449 | + if($addon_list) { |
|
| 450 | + foreach($addon_list as $addon) |
|
| 451 | 451 | { |
| 452 | 452 | if(in_array($addon->addon, $skip['addon'])) |
| 453 | 453 | { |
| 454 | 454 | continue; |
| 455 | + } |
|
| 455 | 456 | } |
| 456 | 457 | $info['addon'] .= '|' . $addon->addon; |
| 457 | 458 | } |
@@ -460,11 +461,13 @@ discard block |
||
| 460 | 461 | $info['layout'] = ""; |
| 461 | 462 | $oLayoutModel = getModel('layout'); |
| 462 | 463 | $layout_list = $oLayoutModel->getDownloadedLayoutList(); |
| 463 | - if($layout_list) foreach($layout_list as $layout) |
|
| 464 | + if($layout_list) { |
|
| 465 | + foreach($layout_list as $layout) |
|
| 464 | 466 | { |
| 465 | 467 | if(in_array($layout->layout, $skip['layout'])) |
| 466 | 468 | { |
| 467 | 469 | continue; |
| 470 | + } |
|
| 468 | 471 | } |
| 469 | 472 | $info['layout'] .= '|' . $layout->layout; |
| 470 | 473 | } |
@@ -473,11 +476,13 @@ discard block |
||
| 473 | 476 | $info['widget'] = ""; |
| 474 | 477 | $oWidgetModel = getModel('widget'); |
| 475 | 478 | $widget_list = $oWidgetModel->getDownloadedWidgetList(); |
| 476 | - if($widget_list) foreach($widget_list as $widget) |
|
| 479 | + if($widget_list) { |
|
| 480 | + foreach($widget_list as $widget) |
|
| 477 | 481 | { |
| 478 | 482 | if(in_array($widget->widget, $skip['widget'])) |
| 479 | 483 | { |
| 480 | 484 | continue; |
| 485 | + } |
|
| 481 | 486 | } |
| 482 | 487 | $info['widget'] .= '|' . $widget->widget; |
| 483 | 488 | } |
@@ -486,11 +491,13 @@ discard block |
||
| 486 | 491 | $info['widgetstyle'] = ""; |
| 487 | 492 | $oWidgetModel = getModel('widget'); |
| 488 | 493 | $widgetstyle_list = $oWidgetModel->getDownloadedWidgetStyleList(); |
| 489 | - if($widgetstyle_list) foreach($widgetstyle_list as $widgetstyle) |
|
| 494 | + if($widgetstyle_list) { |
|
| 495 | + foreach($widgetstyle_list as $widgetstyle) |
|
| 490 | 496 | { |
| 491 | 497 | if(in_array($widgetstyle->widgetStyle, $skip['widgetstyle'])) |
| 492 | 498 | { |
| 493 | 499 | continue; |
| 500 | + } |
|
| 494 | 501 | } |
| 495 | 502 | $info['widgetstyle'] .= '|' . $widgetstyle->widgetStyle; |
| 496 | 503 | } |
@@ -575,8 +582,7 @@ discard block |
||
| 575 | 582 | { |
| 576 | 583 | $publisher_list = array(); |
| 577 | 584 | $publisher_list[] = $xml_obj->publisher; |
| 578 | - } |
|
| 579 | - else |
|
| 585 | + } else |
|
| 580 | 586 | { |
| 581 | 587 | $publisher_list = $xml_obj->publisher; |
| 582 | 588 | } |
@@ -649,8 +655,7 @@ discard block |
||
| 649 | 655 | if(is_array($skin_infos->skininfo)) |
| 650 | 656 | { |
| 651 | 657 | $skin_list = $skin_infos->skininfo; |
| 652 | - } |
|
| 653 | - else |
|
| 658 | + } else |
|
| 654 | 659 | { |
| 655 | 660 | $skin_list = array($skin_infos->skininfo); |
| 656 | 661 | } |
@@ -773,8 +778,7 @@ discard block |
||
| 773 | 778 | } |
| 774 | 779 | $this->gnbLangBuffer .= ' ?>'; |
| 775 | 780 | FileHandler::writeFile($cacheFile, $this->gnbLangBuffer); |
| 776 | - } |
|
| 777 | - else |
|
| 781 | + } else |
|
| 778 | 782 | { |
| 779 | 783 | include $cacheFile; |
| 780 | 784 | } |
@@ -840,8 +844,7 @@ discard block |
||
| 840 | 844 | { |
| 841 | 845 | $returnObject->add('result', TRUE); |
| 842 | 846 | $returnObject->add('favoriteSrl', $output->data->admin_favorite_srl); |
| 843 | - } |
|
| 844 | - else |
|
| 847 | + } else |
|
| 845 | 848 | { |
| 846 | 849 | $returnObject->add('result', FALSE); |
| 847 | 850 | } |
@@ -958,11 +961,12 @@ discard block |
||
| 958 | 961 | if(!$file_exsit && $default === true) |
| 959 | 962 | { |
| 960 | 963 | $icon_url = './modules/admin/tpl/img/' . $default_icon_name; |
| 961 | - } |
|
| 962 | - elseif($file_exsit) |
|
| 964 | + } elseif($file_exsit) |
|
| 963 | 965 | { |
| 964 | 966 | $default_url = Context::getDefaultUrl(); |
| 965 | - if($default_url && substr_compare($default_url, '/', -1) === 0) $default_url = substr($default_url, 0, -1); |
|
| 967 | + if($default_url && substr_compare($default_url, '/', -1) === 0) { |
|
| 968 | + $default_url = substr($default_url, 0, -1); |
|
| 969 | + } |
|
| 966 | 970 | $icon_url = $default_url . '/files/attach/xeicon/' . $virtual_site . $iconname; |
| 967 | 971 | } |
| 968 | 972 | return $icon_url; |