@@ -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 |
@@ -271,25 +271,25 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | // Require specific files when using Firebug console output |
| 274 | -if((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '6.0.0') === -1) |
|
| 274 | +if ((__DEBUG_OUTPUT__ == 2) && version_compare(PHP_VERSION, '6.0.0') === -1) |
|
| 275 | 275 | { |
| 276 | - require _XE_PATH_ . 'libs/FirePHPCore/FirePHP.class.php'; |
|
| 276 | + require _XE_PATH_.'libs/FirePHPCore/FirePHP.class.php'; |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | // Set Timezone as server time |
| 280 | -if(version_compare(PHP_VERSION, '5.3.0') >= 0) |
|
| 280 | +if (version_compare(PHP_VERSION, '5.3.0') >= 0) |
|
| 281 | 281 | { |
| 282 | 282 | date_default_timezone_set(@date_default_timezone_get()); |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | // Require a function-defined-file for simple use |
| 286 | -require(_XE_PATH_ . 'config/func.inc.php'); |
|
| 286 | +require(_XE_PATH_.'config/func.inc.php'); |
|
| 287 | 287 | |
| 288 | -if(__DEBUG__) { |
|
| 288 | +if (__DEBUG__) { |
|
| 289 | 289 | define('__StartTime__', getMicroTime()); |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | -if(__DEBUG__) { |
|
| 292 | +if (__DEBUG__) { |
|
| 293 | 293 | $GLOBALS['__elapsed_class_load__'] = 0; |
| 294 | 294 | } |
| 295 | 295 | |
@@ -391,38 +391,38 @@ discard block |
||
| 391 | 391 | |
| 392 | 392 | function __xe_autoload($class_name) |
| 393 | 393 | { |
| 394 | - if(__DEBUG__) { |
|
| 394 | + if (__DEBUG__) { |
|
| 395 | 395 | $time_at = getMicroTime(); |
| 396 | 396 | } |
| 397 | 397 | |
| 398 | - if(isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) |
|
| 398 | + if (isset($GLOBALS['__xe_autoload_file_map'][strtolower($class_name)])) |
|
| 399 | 399 | { |
| 400 | - require _XE_PATH_ . $GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; |
|
| 400 | + require _XE_PATH_.$GLOBALS['__xe_autoload_file_map'][strtolower($class_name)]; |
|
| 401 | 401 | } |
| 402 | - elseif(preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) |
|
| 402 | + elseif (preg_match('/^([a-zA-Z0-9_]+?)(Admin)?(View|Controller|Model|Api|Wap|Mobile)?$/', $class_name, $matches)) |
|
| 403 | 403 | { |
| 404 | 404 | $candidate_filename = array(); |
| 405 | - $candidate_filename[] = 'modules/' . $matches[1] . '/' . $matches[1]; |
|
| 406 | - if(isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; |
|
| 405 | + $candidate_filename[] = 'modules/'.$matches[1].'/'.$matches[1]; |
|
| 406 | + if (isset($matches[2]) && $matches[2]) $candidate_filename[] = 'admin'; |
|
| 407 | 407 | $candidate_filename[] = (isset($matches[3]) && $matches[3]) ? strtolower($matches[3]) : 'class'; |
| 408 | 408 | $candidate_filename[] = 'php'; |
| 409 | 409 | |
| 410 | 410 | $candidate_filename = implode('.', $candidate_filename); |
| 411 | 411 | |
| 412 | - if(file_exists(_XE_PATH_ . $candidate_filename)) |
|
| 412 | + if (file_exists(_XE_PATH_.$candidate_filename)) |
|
| 413 | 413 | { |
| 414 | - require _XE_PATH_ . $candidate_filename; |
|
| 414 | + require _XE_PATH_.$candidate_filename; |
|
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | - if(__DEBUG__) { |
|
| 418 | + if (__DEBUG__) { |
|
| 419 | 419 | $GLOBALS['__elapsed_class_load__'] += getMicroTime() - $time_at; |
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | spl_autoload_register('__xe_autoload'); |
| 423 | 423 | |
| 424 | -if(file_exists(_XE_PATH_ . '/vendor/autoload.php')) { |
|
| 425 | - require _XE_PATH_ . '/vendor/autoload.php'; |
|
| 424 | +if (file_exists(_XE_PATH_.'/vendor/autoload.php')) { |
|
| 425 | + require _XE_PATH_.'/vendor/autoload.php'; |
|
| 426 | 426 | } |
| 427 | 427 | /* End of file config.inc.php */ |
| 428 | 428 | /* Location: ./config/config.inc.php */ |
@@ -27,32 +27,32 @@ discard block |
||
| 27 | 27 | $oModuleModel = getModel('module'); |
| 28 | 28 | $communication_config = $oModuleModel->getModuleConfig('communication'); |
| 29 | 29 | |
| 30 | - if(!is_object($communication_config)) |
|
| 30 | + if (!is_object($communication_config)) |
|
| 31 | 31 | { |
| 32 | 32 | $communication_config = new stdClass(); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - if(!$communication_config->skin) |
|
| 35 | + if (!$communication_config->skin) |
|
| 36 | 36 | { |
| 37 | 37 | $communication_config->skin = 'default'; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - if(!$communication_config->colorset) |
|
| 40 | + if (!$communication_config->colorset) |
|
| 41 | 41 | { |
| 42 | 42 | $communication_config->colorset = 'white'; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - if(!$communication_config->editor_skin) |
|
| 45 | + if (!$communication_config->editor_skin) |
|
| 46 | 46 | { |
| 47 | 47 | $communication_config->editor_skin = 'ckeditor'; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - if(!$communication_config->mskin) |
|
| 50 | + if (!$communication_config->mskin) |
|
| 51 | 51 | { |
| 52 | 52 | $communication_config->mskin = 'default'; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - if(!$communication_config->grant_write) |
|
| 55 | + if (!$communication_config->grant_write) |
|
| 56 | 56 | { |
| 57 | 57 | $communication_config->grant_write = array('default_grant'=>'member'); |
| 58 | 58 | } |
@@ -69,9 +69,9 @@ discard block |
||
| 69 | 69 | function getGrantArray($default, $group) |
| 70 | 70 | { |
| 71 | 71 | $grant = array(); |
| 72 | - if($default!="") |
|
| 72 | + if ($default != "") |
|
| 73 | 73 | { |
| 74 | - switch($default) |
|
| 74 | + switch ($default) |
|
| 75 | 75 | { |
| 76 | 76 | case "-2": |
| 77 | 77 | $grant = array("default_grant"=>"site"); |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | break; |
| 85 | 85 | } |
| 86 | 86 | } |
| 87 | - else if(is_array($group)) |
|
| 87 | + else if (is_array($group)) |
|
| 88 | 88 | { |
| 89 | 89 | $oMemberModel = getModel('member'); |
| 90 | 90 | $group_list = $oMemberModel->getGroups($this->site_srl); |
| 91 | 91 | |
| 92 | 92 | $group_grant = array(); |
| 93 | - foreach($group as $group_srl) |
|
| 93 | + foreach ($group as $group_srl) |
|
| 94 | 94 | { |
| 95 | 95 | $group_grant[$group_srl] = $group_list[$group_srl]->title; |
| 96 | 96 | } |
@@ -107,37 +107,37 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | function checkGrant($arrGrant) |
| 109 | 109 | { |
| 110 | - if(!$arrGrant) |
|
| 110 | + if (!$arrGrant) |
|
| 111 | 111 | return false; |
| 112 | 112 | |
| 113 | 113 | $logged_info = Context::get('logged_info'); |
| 114 | - if(!$logged_info) |
|
| 114 | + if (!$logged_info) |
|
| 115 | 115 | return false; |
| 116 | 116 | |
| 117 | - if($logged_info->is_admin == "Y") |
|
| 117 | + if ($logged_info->is_admin == "Y") |
|
| 118 | 118 | return true; |
| 119 | 119 | |
| 120 | - if($arrGrant['default_grant']) |
|
| 120 | + if ($arrGrant['default_grant']) |
|
| 121 | 121 | { |
| 122 | - if($arrGrant['default_grant'] == "member" && $logged_info) |
|
| 122 | + if ($arrGrant['default_grant'] == "member" && $logged_info) |
|
| 123 | 123 | return true; |
| 124 | 124 | |
| 125 | - if($arrGrant['default_grant'] == "site" && $this->site_srl == $logged_info->site_srl) |
|
| 125 | + if ($arrGrant['default_grant'] == "site" && $this->site_srl == $logged_info->site_srl) |
|
| 126 | 126 | return true; |
| 127 | 127 | |
| 128 | - if($arrGrant['default_grant'] == "manager" && $logged_info->is_admin == "Y") |
|
| 128 | + if ($arrGrant['default_grant'] == "manager" && $logged_info->is_admin == "Y") |
|
| 129 | 129 | return true; |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | - if($arrGrant['group_grant']) |
|
| 132 | + if ($arrGrant['group_grant']) |
|
| 133 | 133 | { |
| 134 | 134 | $group_grant = $arrGrant['group_grant']; |
| 135 | - if(!is_array($group_grant)) |
|
| 135 | + if (!is_array($group_grant)) |
|
| 136 | 136 | return false; |
| 137 | 137 | |
| 138 | - foreach($logged_info->group_list as $group_srl=>$title) |
|
| 138 | + foreach ($logged_info->group_list as $group_srl=>$title) |
|
| 139 | 139 | { |
| 140 | - if(isset($group_grant[$group_srl])&&$group_grant[$group_srl]==$title) |
|
| 140 | + if (isset($group_grant[$group_srl]) && $group_grant[$group_srl] == $title) |
|
| 141 | 141 | return true; |
| 142 | 142 | } |
| 143 | 143 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $output = executeQuery('communication.getMessage', $args, $columnList); |
| 163 | 163 | |
| 164 | 164 | $message = $output->data; |
| 165 | - if(!$message) |
|
| 165 | + if (!$message) |
|
| 166 | 166 | { |
| 167 | 167 | return; |
| 168 | 168 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | // get recipient's information if it is a sent message |
| 171 | 171 | $oMemberModel = getModel('member'); |
| 172 | 172 | |
| 173 | - if($message->sender_srl == $logged_info->member_srl && $message->message_type == 'S') |
|
| 173 | + if ($message->sender_srl == $logged_info->member_srl && $message->message_type == 'S') |
|
| 174 | 174 | { |
| 175 | 175 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($message->receiver_srl); |
| 176 | 176 | } |
@@ -180,22 +180,22 @@ discard block |
||
| 180 | 180 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($message->sender_srl); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - if($member_info) |
|
| 183 | + if ($member_info) |
|
| 184 | 184 | { |
| 185 | - foreach($member_info as $key => $val) |
|
| 185 | + foreach ($member_info as $key => $val) |
|
| 186 | 186 | { |
| 187 | - if($key === 'title') continue; |
|
| 188 | - if($key === 'content') continue; |
|
| 189 | - if($key === 'sender_srl') continue; |
|
| 190 | - if($key === 'password') continue; |
|
| 191 | - if($key === 'regdate') continue; |
|
| 187 | + if ($key === 'title') continue; |
|
| 188 | + if ($key === 'content') continue; |
|
| 189 | + if ($key === 'sender_srl') continue; |
|
| 190 | + if ($key === 'password') continue; |
|
| 191 | + if ($key === 'regdate') continue; |
|
| 192 | 192 | |
| 193 | 193 | $message->{$key} = $val; |
| 194 | 194 | } |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | // change the status if is a received and not yet read message |
| 198 | - if($message->message_type == 'R' && $message->readed != 'Y') |
|
| 198 | + if ($message->message_type == 'R' && $message->readed != 'Y') |
|
| 199 | 199 | { |
| 200 | 200 | $oCommunicationController = getController('communication'); |
| 201 | 201 | $oCommunicationController->setMessageReaded($message_srl); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $args->readed = 'N'; |
| 219 | 219 | |
| 220 | 220 | $output = executeQuery('communication.getNewMessage', $args, $columnList); |
| 221 | - if(!count($output->data)) |
|
| 221 | + if (!count($output->data)) |
|
| 222 | 222 | { |
| 223 | 223 | return; |
| 224 | 224 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | $logged_info = Context::get('logged_info'); |
| 243 | 243 | $args = new stdClass(); |
| 244 | 244 | |
| 245 | - switch($message_type) |
|
| 245 | + switch ($message_type) |
|
| 246 | 246 | { |
| 247 | 247 | case 'R' : |
| 248 | 248 | $args->member_srl = $logged_info->member_srl; |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | $output = executeQueryArray('communication.getFriendGroups', $args); |
| 348 | 348 | |
| 349 | 349 | $group_list = $output->data; |
| 350 | - if(!$group_list) |
|
| 350 | + if (!$group_list) |
|
| 351 | 351 | { |
| 352 | 352 | return; |
| 353 | 353 | } |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | |
| 371 | 371 | $output = executeQuery('communication.isAddedFriend', $args); |
| 372 | 372 | |
| 373 | - if($output->data->count) |
|
| 373 | + if ($output->data->count) |
|
| 374 | 374 | { |
| 375 | 375 | return TRUE; |
| 376 | 376 | } |
@@ -83,8 +83,7 @@ discard block |
||
| 83 | 83 | $grant = array("default_grant"=>"member"); |
| 84 | 84 | break; |
| 85 | 85 | } |
| 86 | - } |
|
| 87 | - else if(is_array($group)) |
|
| 86 | + } else if(is_array($group)) |
|
| 88 | 87 | { |
| 89 | 88 | $oMemberModel = getModel('member'); |
| 90 | 89 | $group_list = $oMemberModel->getGroups($this->site_srl); |
@@ -107,38 +106,46 @@ discard block |
||
| 107 | 106 | */ |
| 108 | 107 | function checkGrant($arrGrant) |
| 109 | 108 | { |
| 110 | - if(!$arrGrant) |
|
| 111 | - return false; |
|
| 109 | + if(!$arrGrant) { |
|
| 110 | + return false; |
|
| 111 | + } |
|
| 112 | 112 | |
| 113 | 113 | $logged_info = Context::get('logged_info'); |
| 114 | - if(!$logged_info) |
|
| 115 | - return false; |
|
| 114 | + if(!$logged_info) { |
|
| 115 | + return false; |
|
| 116 | + } |
|
| 116 | 117 | |
| 117 | - if($logged_info->is_admin == "Y") |
|
| 118 | - return true; |
|
| 118 | + if($logged_info->is_admin == "Y") { |
|
| 119 | + return true; |
|
| 120 | + } |
|
| 119 | 121 | |
| 120 | 122 | if($arrGrant['default_grant']) |
| 121 | 123 | { |
| 122 | - if($arrGrant['default_grant'] == "member" && $logged_info) |
|
| 123 | - return true; |
|
| 124 | + if($arrGrant['default_grant'] == "member" && $logged_info) { |
|
| 125 | + return true; |
|
| 126 | + } |
|
| 124 | 127 | |
| 125 | - if($arrGrant['default_grant'] == "site" && $this->site_srl == $logged_info->site_srl) |
|
| 126 | - return true; |
|
| 128 | + if($arrGrant['default_grant'] == "site" && $this->site_srl == $logged_info->site_srl) { |
|
| 129 | + return true; |
|
| 130 | + } |
|
| 127 | 131 | |
| 128 | - if($arrGrant['default_grant'] == "manager" && $logged_info->is_admin == "Y") |
|
| 129 | - return true; |
|
| 132 | + if($arrGrant['default_grant'] == "manager" && $logged_info->is_admin == "Y") { |
|
| 133 | + return true; |
|
| 134 | + } |
|
| 130 | 135 | } |
| 131 | 136 | |
| 132 | 137 | if($arrGrant['group_grant']) |
| 133 | 138 | { |
| 134 | 139 | $group_grant = $arrGrant['group_grant']; |
| 135 | - if(!is_array($group_grant)) |
|
| 136 | - return false; |
|
| 140 | + if(!is_array($group_grant)) { |
|
| 141 | + return false; |
|
| 142 | + } |
|
| 137 | 143 | |
| 138 | 144 | foreach($logged_info->group_list as $group_srl=>$title) |
| 139 | 145 | { |
| 140 | - if(isset($group_grant[$group_srl])&&$group_grant[$group_srl]==$title) |
|
| 141 | - return true; |
|
| 146 | + if(isset($group_grant[$group_srl])&&$group_grant[$group_srl]==$title) { |
|
| 147 | + return true; |
|
| 148 | + } |
|
| 142 | 149 | } |
| 143 | 150 | |
| 144 | 151 | } |
@@ -184,11 +191,21 @@ discard block |
||
| 184 | 191 | { |
| 185 | 192 | foreach($member_info as $key => $val) |
| 186 | 193 | { |
| 187 | - if($key === 'title') continue; |
|
| 188 | - if($key === 'content') continue; |
|
| 189 | - if($key === 'sender_srl') continue; |
|
| 190 | - if($key === 'password') continue; |
|
| 191 | - if($key === 'regdate') continue; |
|
| 194 | + if($key === 'title') { |
|
| 195 | + continue; |
|
| 196 | + } |
|
| 197 | + if($key === 'content') { |
|
| 198 | + continue; |
|
| 199 | + } |
|
| 200 | + if($key === 'sender_srl') { |
|
| 201 | + continue; |
|
| 202 | + } |
|
| 203 | + if($key === 'password') { |
|
| 204 | + continue; |
|
| 205 | + } |
|
| 206 | + if($key === 'regdate') { |
|
| 207 | + continue; |
|
| 208 | + } |
|
| 192 | 209 | |
| 193 | 210 | $message->{$key} = $val; |
| 194 | 211 | } |