@@ -31,7 +31,9 @@ discard block |
||
31 | 31 | $args->skin = Context::get('skin'); |
32 | 32 | $args->target = Context::get('target'); |
33 | 33 | $args->target_module_srl = Context::get('target_module_srl'); |
34 | - if(!$args->target_module_srl) $args->target_module_srl = ''; |
|
34 | + if(!$args->target_module_srl) { |
|
35 | + $args->target_module_srl = ''; |
|
36 | + } |
|
35 | 37 | $args->skin_vars = $config->skin_vars; |
36 | 38 | |
37 | 39 | $oModuleController = getController('module'); |
@@ -67,7 +69,9 @@ discard block |
||
67 | 69 | { |
68 | 70 | foreach($skin_info->extra_vars as $vars) |
69 | 71 | { |
70 | - if($vars->type!='image') continue; |
|
72 | + if($vars->type!='image') { |
|
73 | + continue; |
|
74 | + } |
|
71 | 75 | |
72 | 76 | $image_obj = $obj->{$vars->name}; |
73 | 77 | // Get a variable on a request to delete |
@@ -99,7 +103,9 @@ discard block |
||
99 | 103 | // Upload the file to a path |
100 | 104 | $path = sprintf("./files/attach/images/%s/", $module_srl); |
101 | 105 | // Create a directory |
102 | - if(!FileHandler::makeDir($path)) return false; |
|
106 | + if(!FileHandler::makeDir($path)) { |
|
107 | + return false; |
|
108 | + } |
|
103 | 109 | |
104 | 110 | $filename = $path.$image_obj['name']; |
105 | 111 | // Move the file |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | $args->skin = Context::get('skin'); |
32 | 32 | $args->target = Context::get('target'); |
33 | 33 | $args->target_module_srl = Context::get('target_module_srl'); |
34 | - if(!$args->target_module_srl) $args->target_module_srl = ''; |
|
34 | + if (!$args->target_module_srl) $args->target_module_srl = ''; |
|
35 | 35 | $args->skin_vars = $config->skin_vars; |
36 | 36 | |
37 | 37 | $oModuleController = getController('module'); |
38 | - $output = $oModuleController->insertModuleConfig('integration_search',$args); |
|
38 | + $output = $oModuleController->insertModuleConfig('integration_search', $args); |
|
39 | 39 | |
40 | 40 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminContent'); |
41 | 41 | return $this->setRedirectUrl($returnUrl, $output); |
@@ -63,35 +63,35 @@ discard block |
||
63 | 63 | unset($obj->module_srl); |
64 | 64 | unset($obj->page); |
65 | 65 | // Separately handle if the extra_vars is an image type in the original skin_info |
66 | - if($skin_info->extra_vars) |
|
66 | + if ($skin_info->extra_vars) |
|
67 | 67 | { |
68 | - foreach($skin_info->extra_vars as $vars) |
|
68 | + foreach ($skin_info->extra_vars as $vars) |
|
69 | 69 | { |
70 | - if($vars->type!='image') continue; |
|
70 | + if ($vars->type != 'image') continue; |
|
71 | 71 | |
72 | 72 | $image_obj = $obj->{$vars->name}; |
73 | 73 | // Get a variable on a request to delete |
74 | 74 | $del_var = $obj->{"del_".$vars->name}; |
75 | 75 | unset($obj->{"del_".$vars->name}); |
76 | - if($del_var == 'Y') |
|
76 | + if ($del_var == 'Y') |
|
77 | 77 | { |
78 | 78 | FileHandler::removeFile($module_info->{$vars->name}); |
79 | 79 | continue; |
80 | 80 | } |
81 | 81 | // Use the previous data if not uploaded |
82 | - if(!$image_obj['tmp_name']) |
|
82 | + if (!$image_obj['tmp_name']) |
|
83 | 83 | { |
84 | 84 | $obj->{$vars->name} = $module_info->{$vars->name}; |
85 | 85 | continue; |
86 | 86 | } |
87 | 87 | // Ignore if the file is not successfully uploaded, and check uploaded file |
88 | - if(!is_uploaded_file($image_obj['tmp_name']) || !checkUploadedFile($image_obj['tmp_name'])) |
|
88 | + if (!is_uploaded_file($image_obj['tmp_name']) || !checkUploadedFile($image_obj['tmp_name'])) |
|
89 | 89 | { |
90 | 90 | unset($obj->{$vars->name}); |
91 | 91 | continue; |
92 | 92 | } |
93 | 93 | // Ignore if the file is not an image |
94 | - if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) |
|
94 | + if (!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) |
|
95 | 95 | { |
96 | 96 | unset($obj->{$vars->name}); |
97 | 97 | continue; |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | // Upload the file to a path |
100 | 100 | $path = sprintf("./files/attach/images/%s/", $module_srl); |
101 | 101 | // Create a directory |
102 | - if(!FileHandler::makeDir($path)) return false; |
|
102 | + if (!FileHandler::makeDir($path)) return false; |
|
103 | 103 | |
104 | 104 | $filename = $path.$image_obj['name']; |
105 | 105 | // Move the file |
106 | - if(!move_uploaded_file($image_obj['tmp_name'], $filename)) |
|
106 | + if (!move_uploaded_file($image_obj['tmp_name'], $filename)) |
|
107 | 107 | { |
108 | 108 | unset($obj->{$vars->name}); |
109 | 109 | continue; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $args->skin_vars = serialize($obj); |
118 | 118 | |
119 | 119 | $oModuleController = getController('module'); |
120 | - $output = $oModuleController->insertModuleConfig('integration_search',$args); |
|
120 | + $output = $oModuleController->insertModuleConfig('integration_search', $args); |
|
121 | 121 | |
122 | 122 | $this->setMessage('success_updated', 'info'); |
123 | 123 |
@@ -86,7 +86,9 @@ |
||
86 | 86 | $name = $val->name; |
87 | 87 | $type = $val->type; |
88 | 88 | $value = $skin_vars->{$name}; |
89 | - if($type=="checkbox"&&!$value) $value = array(); |
|
89 | + if($type=="checkbox"&&!$value) { |
|
90 | + $value = array(); |
|
91 | + } |
|
90 | 92 | $skin_info->extra_vars[$key]->value= $value; |
91 | 93 | } |
92 | 94 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // Get configurations (using module model object) |
25 | 25 | $oModuleModel = getModel('module'); |
26 | 26 | $this->config = $oModuleModel->getModuleConfig('integration_search'); |
27 | - Context::set('config',$this->config); |
|
27 | + Context::set('config', $this->config); |
|
28 | 28 | |
29 | 29 | $this->setTemplatePath($this->module_path."/tpl/"); |
30 | 30 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | // Get a list of skins(themes) |
40 | 40 | $oModuleModel = getModel('module'); |
41 | 41 | $skin_list = $oModuleModel->getSkins($this->module_path); |
42 | - Context::set('skin_list',$skin_list); |
|
42 | + Context::set('skin_list', $skin_list); |
|
43 | 43 | // Get a list of module categories |
44 | 44 | $module_categories = $oModuleModel->getModuleCategories(); |
45 | 45 | // Generated mid Wanted list |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $security->encodeHTML('skin_list..title'); |
64 | 64 | |
65 | 65 | // Sample Code |
66 | - Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false) ); |
|
66 | + Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false)); |
|
67 | 67 | |
68 | 68 | $this->setTemplateFile("index"); |
69 | 69 | } |
@@ -79,15 +79,15 @@ discard block |
||
79 | 79 | $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin); |
80 | 80 | $skin_vars = unserialize($this->config->skin_vars); |
81 | 81 | // value for skin_info extra_vars |
82 | - if(count($skin_info->extra_vars)) |
|
82 | + if (count($skin_info->extra_vars)) |
|
83 | 83 | { |
84 | - foreach($skin_info->extra_vars as $key => $val) |
|
84 | + foreach ($skin_info->extra_vars as $key => $val) |
|
85 | 85 | { |
86 | 86 | $name = $val->name; |
87 | 87 | $type = $val->type; |
88 | 88 | $value = $skin_vars->{$name}; |
89 | - if($type=="checkbox"&&!$value) $value = array(); |
|
90 | - $skin_info->extra_vars[$key]->value= $value; |
|
89 | + if ($type == "checkbox" && !$value) $value = array(); |
|
90 | + $skin_info->extra_vars[$key]->value = $value; |
|
91 | 91 | } |
92 | 92 | } |
93 | 93 | Context::set('skin_info', $skin_info); |
@@ -1284,7 +1284,7 @@ |
||
1284 | 1284 | /** |
1285 | 1285 | * Delete cached group data |
1286 | 1286 | * @return void |
1287 | - */ |
|
1287 | + */ |
|
1288 | 1288 | function _deleteMemberGroupCache($site_srl = 0) |
1289 | 1289 | { |
1290 | 1290 | //remove from cache |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | /** |
778 | 778 | * Move up/down the member join form and modify it |
779 | 779 | * @deprecated |
780 | - * @return void |
|
780 | + * @return BaseObject|null |
|
781 | 781 | */ |
782 | 782 | function procMemberAdminUpdateJoinForm() |
783 | 783 | { |
@@ -1114,7 +1114,7 @@ discard block |
||
1114 | 1114 | |
1115 | 1115 | /** |
1116 | 1116 | * Insert a group |
1117 | - * @param object $args |
|
1117 | + * @param null|stdClass $args |
|
1118 | 1118 | * @return BaseObject |
1119 | 1119 | */ |
1120 | 1120 | function insertGroup($args) |
@@ -1311,6 +1311,9 @@ discard block |
||
1311 | 1311 | return executeQuery('member.insertDeniedID', $args); |
1312 | 1312 | } |
1313 | 1313 | |
1314 | + /** |
|
1315 | + * @param string $nick_name |
|
1316 | + */ |
|
1314 | 1317 | function insertDeniedNickName($nick_name, $description = '') |
1315 | 1318 | { |
1316 | 1319 | $args = new stdClass(); |
@@ -48,9 +48,11 @@ discard block |
||
48 | 48 | $args->{$val} = Context::get($val); |
49 | 49 | } |
50 | 50 | $args->member_srl = Context::get('member_srl'); |
51 | - if(Context::get('reset_password')) |
|
52 | - $args->password = Context::get('reset_password'); |
|
53 | - else unset($args->password); |
|
51 | + if(Context::get('reset_password')) { |
|
52 | + $args->password = Context::get('reset_password'); |
|
53 | + } else { |
|
54 | + unset($args->password); |
|
55 | + } |
|
54 | 56 | |
55 | 57 | // Remove some unnecessary variables from all the vars |
56 | 58 | $all_args = Context::getRequestVars(); |
@@ -60,7 +62,9 @@ discard block |
||
60 | 62 | unset($all_args->error_return_url); |
61 | 63 | unset($all_args->success_return_url); |
62 | 64 | unset($all_args->ruleset); |
63 | - if(!isset($args->limit_date)) $args->limit_date = ""; |
|
65 | + if(!isset($args->limit_date)) { |
|
66 | + $args->limit_date = ""; |
|
67 | + } |
|
64 | 68 | unset($all_args->password); |
65 | 69 | unset($all_args->password2); |
66 | 70 | unset($all_args->reset_password); |
@@ -76,7 +80,9 @@ discard block |
||
76 | 80 | $columnList = array('member_srl'); |
77 | 81 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList); |
78 | 82 | // If no original member exists, make a new one |
79 | - if($member_info->member_srl != $args->member_srl) unset($args->member_srl); |
|
83 | + if($member_info->member_srl != $args->member_srl) { |
|
84 | + unset($args->member_srl); |
|
85 | + } |
|
80 | 86 | } |
81 | 87 | |
82 | 88 | // remove whitespace |
@@ -96,14 +102,15 @@ discard block |
||
96 | 102 | $args->password = Context::get('password'); |
97 | 103 | $output = $oMemberController->insertMember($args); |
98 | 104 | $msg_code = 'success_registed'; |
99 | - } |
|
100 | - else |
|
105 | + } else |
|
101 | 106 | { |
102 | 107 | $output = $oMemberController->updateMember($args); |
103 | 108 | $msg_code = 'success_updated'; |
104 | 109 | } |
105 | 110 | |
106 | - if(!$output->toBool()) return $output; |
|
111 | + if(!$output->toBool()) { |
|
112 | + return $output; |
|
113 | + } |
|
107 | 114 | // Save Signature |
108 | 115 | $signature = Context::get('signature'); |
109 | 116 | $oMemberController->putSignature($args->member_srl, $signature); |
@@ -115,21 +122,27 @@ discard block |
||
115 | 122 | if(is_uploaded_file($profile_image['tmp_name'])) |
116 | 123 | { |
117 | 124 | $output = $oMemberController->insertProfileImage($args->member_srl, $profile_image['tmp_name']); |
118 | - if(!$output->toBool()) return $output; |
|
125 | + if(!$output->toBool()) { |
|
126 | + return $output; |
|
127 | + } |
|
119 | 128 | } |
120 | 129 | |
121 | 130 | $image_mark = $_FILES['image_mark']; |
122 | 131 | if(is_uploaded_file($image_mark['tmp_name'])) |
123 | 132 | { |
124 | 133 | $output = $oMemberController->insertImageMark($args->member_srl, $image_mark['tmp_name']); |
125 | - if(!$output->toBool()) return $output; |
|
134 | + if(!$output->toBool()) { |
|
135 | + return $output; |
|
136 | + } |
|
126 | 137 | } |
127 | 138 | |
128 | 139 | $image_name = $_FILES['image_name']; |
129 | 140 | if (is_uploaded_file($image_name['tmp_name'])) |
130 | 141 | { |
131 | 142 | $output = $oMemberController->insertImageName($args->member_srl, $image_name['tmp_name']); |
132 | - if(!$output->toBool()) return $output; |
|
143 | + if(!$output->toBool()) { |
|
144 | + return $output; |
|
145 | + } |
|
133 | 146 | } |
134 | 147 | |
135 | 148 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminList'); |
@@ -147,7 +160,9 @@ discard block |
||
147 | 160 | |
148 | 161 | $oMemberController = getController('member'); |
149 | 162 | $output = $oMemberController->deleteMember($member_srl); |
150 | - if(!$output->toBool()) return $output; |
|
163 | + if(!$output->toBool()) { |
|
164 | + return $output; |
|
165 | + } |
|
151 | 166 | |
152 | 167 | $this->add('page',Context::get('page')); |
153 | 168 | $this->setMessage("success_deleted"); |
@@ -452,10 +467,11 @@ discard block |
||
452 | 467 | $signupItem->max_width = $config->{$key.'_max_width'}; |
453 | 468 | $signupItem->max_height = $config->{$key.'_max_height'}; |
454 | 469 | } |
455 | - if($signupItem->isIdentifier) |
|
456 | - array_unshift($list_order, $signupItem); |
|
457 | - else |
|
458 | - $list_order[] = $signupItem; |
|
470 | + if($signupItem->isIdentifier) { |
|
471 | + array_unshift($list_order, $signupItem); |
|
472 | + } else { |
|
473 | + $list_order[] = $signupItem; |
|
474 | + } |
|
459 | 475 | } |
460 | 476 | if(is_array($extendItems)) |
461 | 477 | { |
@@ -512,38 +528,30 @@ discard block |
||
512 | 528 | if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip') |
513 | 529 | { |
514 | 530 | $fields[] = sprintf('<field name="%s[]" required="true" />', $formInfo->name); |
515 | - } |
|
516 | - else if($formInfo->name == 'password') |
|
531 | + } else if($formInfo->name == 'password') |
|
517 | 532 | { |
518 | 533 | $fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:60" /></field>'; |
519 | 534 | $fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>'; |
520 | - } |
|
521 | - else if($formInfo->name == 'find_account_question') |
|
535 | + } else if($formInfo->name == 'find_account_question') |
|
522 | 536 | { |
523 | 537 | $fields[] = '<field name="find_account_question"><if test="$modify_find_account_answer" attr="required" value="true" /></field>'; |
524 | 538 | $fields[] = '<field name="find_account_answer" length=":250"><if test="$modify_find_account_answer" attr="required" value="true" /></field>'; |
525 | - } |
|
526 | - else if($formInfo->name == 'email_address') |
|
539 | + } else if($formInfo->name == 'email_address') |
|
527 | 540 | { |
528 | 541 | $fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name); |
529 | - } |
|
530 | - else if($formInfo->name == 'user_id') |
|
542 | + } else if($formInfo->name == 'user_id') |
|
531 | 543 | { |
532 | 544 | $fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name); |
533 | - } |
|
534 | - else if($formInfo->name == 'nick_name') |
|
545 | + } else if($formInfo->name == 'nick_name') |
|
535 | 546 | { |
536 | 547 | $fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name); |
537 | - } |
|
538 | - else if(strpos($formInfo->name, 'image') !== false) |
|
548 | + } else if(strpos($formInfo->name, 'image') !== false) |
|
539 | 549 | { |
540 | 550 | $fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' && $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name); |
541 | - } |
|
542 | - else if($formInfo->name == 'signature') |
|
551 | + } else if($formInfo->name == 'signature') |
|
543 | 552 | { |
544 | 553 | $fields[] = '<field name="signature"><if test="$member_srl" attr="required" value="true" /></field>'; |
545 | - } |
|
546 | - else |
|
554 | + } else |
|
547 | 555 | { |
548 | 556 | $fields[] = sprintf('<field name="%s" required="true" />', $formInfo->name); |
549 | 557 | } |
@@ -603,8 +611,9 @@ discard block |
||
603 | 611 | '</ruleset>'; |
604 | 612 | |
605 | 613 | $fields = array(); |
606 | - if($identifier == 'user_id') |
|
607 | - $fields[] = '<field name="user_id" required="true" rule="userid" />'; |
|
614 | + if($identifier == 'user_id') { |
|
615 | + $fields[] = '<field name="user_id" required="true" rule="userid" />'; |
|
616 | + } |
|
608 | 617 | |
609 | 618 | $fields[] = '<field name="email_address" required="true" rule="email" />'; |
610 | 619 | $fields[] = '<field name="find_account_question" required="true" />'; |
@@ -626,7 +635,9 @@ discard block |
||
626 | 635 | { |
627 | 636 | $args = Context::gets('title','description','is_default','image_mark'); |
628 | 637 | $output = $this->insertGroup($args); |
629 | - if(!$output->toBool()) return $output; |
|
638 | + if(!$output->toBool()) { |
|
639 | + return $output; |
|
640 | + } |
|
630 | 641 | |
631 | 642 | $this->add('group_srl',''); |
632 | 643 | $this->add('page',Context::get('page')); |
@@ -647,7 +658,9 @@ discard block |
||
647 | 658 | $args = Context::gets('group_srl','title','description','is_default','image_mark'); |
648 | 659 | $args->site_srl = 0; |
649 | 660 | $output = $this->updateGroup($args); |
650 | - if(!$output->toBool()) return $output; |
|
661 | + if(!$output->toBool()) { |
|
662 | + return $output; |
|
663 | + } |
|
651 | 664 | |
652 | 665 | $this->add('group_srl',''); |
653 | 666 | $this->add('page',Context::get('page')); |
@@ -666,7 +679,9 @@ discard block |
||
666 | 679 | $group_srl = Context::get('group_srl'); |
667 | 680 | |
668 | 681 | $output = $this->deleteGroup($group_srl); |
669 | - if(!$output->toBool()) return $output; |
|
682 | + if(!$output->toBool()) { |
|
683 | + return $output; |
|
684 | + } |
|
670 | 685 | |
671 | 686 | $this->add('group_srl',''); |
672 | 687 | $this->add('page',Context::get('page')); |
@@ -691,14 +706,15 @@ discard block |
||
691 | 706 | $args->default_value = explode("\n", str_replace("\r", '', Context::get('default_value'))); |
692 | 707 | $args->required = Context::get('required'); |
693 | 708 | $args->is_active = (isset($args->required)); |
694 | - if(!in_array(strtoupper($args->required), array('Y','N')))$args->required = 'N'; |
|
709 | + if(!in_array(strtoupper($args->required), array('Y','N'))) { |
|
710 | + $args->required = 'N'; |
|
711 | + } |
|
695 | 712 | $args->description = Context::get('description') ? Context::get('description') : ''; |
696 | 713 | // Default values |
697 | 714 | if(in_array($args->column_type, array('checkbox','select','radio')) && count($args->default_value)) |
698 | 715 | { |
699 | 716 | $args->default_value = serialize($args->default_value); |
700 | - } |
|
701 | - else |
|
717 | + } else |
|
702 | 718 | { |
703 | 719 | $args->default_value = ''; |
704 | 720 | } |
@@ -710,7 +726,9 @@ discard block |
||
710 | 726 | { |
711 | 727 | if($item->name == $args->column_name) |
712 | 728 | { |
713 | - if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue; |
|
729 | + if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) { |
|
730 | + continue; |
|
731 | + } |
|
714 | 732 | return new BaseObject(-1,'msg_exists_user_id'); |
715 | 733 | } |
716 | 734 | } |
@@ -721,13 +739,14 @@ discard block |
||
721 | 739 | $isInsert = true; |
722 | 740 | $args->list_order = $args->member_join_form_srl = getNextSequence(); |
723 | 741 | $output = executeQuery('member.insertJoinForm', $args); |
724 | - } |
|
725 | - else |
|
742 | + } else |
|
726 | 743 | { |
727 | 744 | $output = executeQuery('member.updateJoinForm', $args); |
728 | 745 | } |
729 | 746 | |
730 | - if(!$output->toBool()) return $output; |
|
747 | + if(!$output->toBool()) { |
|
748 | + return $output; |
|
749 | + } |
|
731 | 750 | |
732 | 751 | // memberConfig update |
733 | 752 | $signupItem = new stdClass(); |
@@ -747,8 +766,7 @@ discard block |
||
747 | 766 | if($isInsert) |
748 | 767 | { |
749 | 768 | $config->signupForm[] = $signupItem; |
750 | - } |
|
751 | - else |
|
769 | + } else |
|
752 | 770 | { |
753 | 771 | foreach($config->signupForm as $key=>$val) |
754 | 772 | { |
@@ -819,7 +837,9 @@ discard block |
||
819 | 837 | case 'update' : |
820 | 838 | break; |
821 | 839 | } |
822 | - if(!$output->toBool()) return $output; |
|
840 | + if(!$output->toBool()) { |
|
841 | + return $output; |
|
842 | + } |
|
823 | 843 | |
824 | 844 | $this->setMessage($msg_code); |
825 | 845 | } |
@@ -922,7 +942,9 @@ discard block |
||
922 | 942 | function procMemberAdminDeleteMembers() |
923 | 943 | { |
924 | 944 | $target_member_srls = Context::get('target_member_srls'); |
925 | - if(!$target_member_srls) return new BaseObject(-1, 'msg_invalid_request'); |
|
945 | + if(!$target_member_srls) { |
|
946 | + return new BaseObject(-1, 'msg_invalid_request'); |
|
947 | + } |
|
926 | 948 | $member_srls = explode(',', $target_member_srls); |
927 | 949 | $oMemberController = getController('member'); |
928 | 950 | |
@@ -946,12 +968,17 @@ discard block |
||
946 | 968 | function procMemberAdminUpdateMembersGroup() |
947 | 969 | { |
948 | 970 | $member_srl = Context::get('member_srl'); |
949 | - if(!$member_srl) return new BaseObject(-1,'msg_invalid_request'); |
|
971 | + if(!$member_srl) { |
|
972 | + return new BaseObject(-1,'msg_invalid_request'); |
|
973 | + } |
|
950 | 974 | $member_srls = explode(',',$member_srl); |
951 | 975 | |
952 | 976 | $group_srl = Context::get('group_srls'); |
953 | - if(!is_array($group_srl)) $group_srls = explode('|@|', $group_srl); |
|
954 | - else $group_srls = $group_srl; |
|
977 | + if(!is_array($group_srl)) { |
|
978 | + $group_srls = explode('|@|', $group_srl); |
|
979 | + } else { |
|
980 | + $group_srls = $group_srl; |
|
981 | + } |
|
955 | 982 | |
956 | 983 | $oDB = &DB::getInstance(); |
957 | 984 | $oDB->begin(); |
@@ -970,11 +997,15 @@ discard block |
||
970 | 997 | for($j=0;$j<$group_count;$j++) |
971 | 998 | { |
972 | 999 | $group_srl = (int)trim($group_srls[$j]); |
973 | - if(!$group_srl) continue; |
|
1000 | + if(!$group_srl) { |
|
1001 | + continue; |
|
1002 | + } |
|
974 | 1003 | for($i=0;$i<$member_count;$i++) |
975 | 1004 | { |
976 | 1005 | $member_srl = (int)trim($member_srls[$i]); |
977 | - if(!$member_srl) continue; |
|
1006 | + if(!$member_srl) { |
|
1007 | + continue; |
|
1008 | + } |
|
978 | 1009 | |
979 | 1010 | $args = new stdClass; |
980 | 1011 | $args->member_srl = $member_srl; |
@@ -1021,10 +1052,14 @@ discard block |
||
1021 | 1052 | foreach($user_ids as $val) |
1022 | 1053 | { |
1023 | 1054 | $val = trim($val); |
1024 | - if(!$val) continue; |
|
1055 | + if(!$val) { |
|
1056 | + continue; |
|
1057 | + } |
|
1025 | 1058 | |
1026 | 1059 | $output = $this->insertDeniedID($val, ''); |
1027 | - if($output->toBool()) $success_ids[] = $val; |
|
1060 | + if($output->toBool()) { |
|
1061 | + $success_ids[] = $val; |
|
1062 | + } |
|
1028 | 1063 | } |
1029 | 1064 | |
1030 | 1065 | $this->add('user_ids', implode(',',$success_ids)); |
@@ -1053,8 +1088,7 @@ discard block |
||
1053 | 1088 | } |
1054 | 1089 | $msg_code = 'success_deleted'; |
1055 | 1090 | $this->setMessage($msg_code); |
1056 | - } |
|
1057 | - else |
|
1091 | + } else |
|
1058 | 1092 | { |
1059 | 1093 | $nick_names = explode(',',$nick_name); |
1060 | 1094 | $success_nick_names = array(); |
@@ -1062,10 +1096,14 @@ discard block |
||
1062 | 1096 | foreach($nick_names as $val) |
1063 | 1097 | { |
1064 | 1098 | $val = trim($val); |
1065 | - if(!$val) continue; |
|
1099 | + if(!$val) { |
|
1100 | + continue; |
|
1101 | + } |
|
1066 | 1102 | |
1067 | 1103 | $output = $this->insertDeniedNickName($val, ''); |
1068 | - if($output->toBool()) $success_nick_names[] = $val; |
|
1104 | + if($output->toBool()) { |
|
1105 | + $success_nick_names[] = $val; |
|
1106 | + } |
|
1069 | 1107 | } |
1070 | 1108 | |
1071 | 1109 | $this->add('nick_names', implode(',',$success_nick_names)); |
@@ -1085,7 +1123,9 @@ discard block |
||
1085 | 1123 | { |
1086 | 1124 | case 'delete' : |
1087 | 1125 | $output = $this->deleteDeniedID($user_id); |
1088 | - if(!$output->toBool()) return $output; |
|
1126 | + if(!$output->toBool()) { |
|
1127 | + return $output; |
|
1128 | + } |
|
1089 | 1129 | $msg_code = 'success_deleted'; |
1090 | 1130 | break; |
1091 | 1131 | } |
@@ -1137,16 +1177,19 @@ discard block |
||
1137 | 1177 | */ |
1138 | 1178 | function insertGroup($args) |
1139 | 1179 | { |
1140 | - if(!$args->site_srl) $args->site_srl = 0; |
|
1180 | + if(!$args->site_srl) { |
|
1181 | + $args->site_srl = 0; |
|
1182 | + } |
|
1141 | 1183 | // Check the value of is_default. |
1142 | 1184 | if($args->is_default != 'Y') |
1143 | 1185 | { |
1144 | 1186 | $args->is_default = 'N'; |
1145 | - } |
|
1146 | - else |
|
1187 | + } else |
|
1147 | 1188 | { |
1148 | 1189 | $output = executeQuery('member.updateGroupDefaultClear', $args); |
1149 | - if(!$output->toBool()) return $output; |
|
1190 | + if(!$output->toBool()) { |
|
1191 | + return $output; |
|
1192 | + } |
|
1150 | 1193 | } |
1151 | 1194 | |
1152 | 1195 | if(!isset($args->list_order) || $args->list_order=='') |
@@ -1154,7 +1197,9 @@ discard block |
||
1154 | 1197 | $args->list_order = $args->group_srl; |
1155 | 1198 | } |
1156 | 1199 | |
1157 | - if(!$args->group_srl) $args->group_srl = getNextSequence(); |
|
1200 | + if(!$args->group_srl) { |
|
1201 | + $args->group_srl = getNextSequence(); |
|
1202 | + } |
|
1158 | 1203 | $args->list_order = $args->group_srl; |
1159 | 1204 | $output = executeQuery('member.insertGroup', $args); |
1160 | 1205 | $this->_deleteMemberGroupCache($args->site_srl); |
@@ -1169,17 +1214,22 @@ discard block |
||
1169 | 1214 | */ |
1170 | 1215 | function updateGroup($args) |
1171 | 1216 | { |
1172 | - if(!$args->site_srl) $args->site_srl = 0; |
|
1217 | + if(!$args->site_srl) { |
|
1218 | + $args->site_srl = 0; |
|
1219 | + } |
|
1173 | 1220 | // Check the value of is_default. |
1174 | - if(!$args->group_srl) return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1221 | + if(!$args->group_srl) { |
|
1222 | + return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1223 | + } |
|
1175 | 1224 | if($args->is_default!='Y') |
1176 | 1225 | { |
1177 | 1226 | $args->is_default = 'N'; |
1178 | - } |
|
1179 | - else |
|
1227 | + } else |
|
1180 | 1228 | { |
1181 | 1229 | $output = executeQuery('member.updateGroupDefaultClear', $args); |
1182 | - if(!$output->toBool()) return $output; |
|
1230 | + if(!$output->toBool()) { |
|
1231 | + return $output; |
|
1232 | + } |
|
1183 | 1233 | } |
1184 | 1234 | |
1185 | 1235 | $output = executeQuery('member.updateGroup', $args); |
@@ -1202,8 +1252,12 @@ discard block |
||
1202 | 1252 | $columnList = array('group_srl', 'is_default'); |
1203 | 1253 | $group_info = $oMemberModel->getGroup($group_srl, $columnList); |
1204 | 1254 | |
1205 | - if(!$group_info) return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1206 | - if($group_info->is_default == 'Y') return new BaseObject(-1, 'msg_not_delete_default'); |
|
1255 | + if(!$group_info) { |
|
1256 | + return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1257 | + } |
|
1258 | + if($group_info->is_default == 'Y') { |
|
1259 | + return new BaseObject(-1, 'msg_not_delete_default'); |
|
1260 | + } |
|
1207 | 1261 | |
1208 | 1262 | // Get groups where is_default == 'Y' |
1209 | 1263 | $columnList = array('site_srl', 'group_srl'); |
@@ -1249,13 +1303,14 @@ discard block |
||
1249 | 1303 | $update_args->image_mark = $vars->image_marks[$order]; |
1250 | 1304 | $update_args->list_order = $order + 1; |
1251 | 1305 | |
1252 | - if(!$update_args->title) continue; |
|
1306 | + if(!$update_args->title) { |
|
1307 | + continue; |
|
1308 | + } |
|
1253 | 1309 | |
1254 | 1310 | if(is_numeric($group_srl)) { |
1255 | 1311 | $update_args->group_srl = $group_srl; |
1256 | 1312 | $output = $this->updateGroup($update_args); |
1257 | - } |
|
1258 | - else { |
|
1313 | + } else { |
|
1259 | 1314 | $update_args->group_srl = getNextSequence(); |
1260 | 1315 | $output = $this->insertGroup($update_args); |
1261 | 1316 | } |
@@ -1345,7 +1400,9 @@ discard block |
||
1345 | 1400 | */ |
1346 | 1401 | function deleteDeniedID($user_id) |
1347 | 1402 | { |
1348 | - if(!$user_id) unset($user_id); |
|
1403 | + if(!$user_id) { |
|
1404 | + unset($user_id); |
|
1405 | + } |
|
1349 | 1406 | |
1350 | 1407 | $args = new stdClass; |
1351 | 1408 | $args->user_id = $user_id; |
@@ -1359,7 +1416,9 @@ discard block |
||
1359 | 1416 | */ |
1360 | 1417 | function deleteDeniedNickName($nick_name) |
1361 | 1418 | { |
1362 | - if(!$nick_name) unset($nick_name); |
|
1419 | + if(!$nick_name) { |
|
1420 | + unset($nick_name); |
|
1421 | + } |
|
1363 | 1422 | |
1364 | 1423 | $args = new stdClass; |
1365 | 1424 | $args->nick_name = $nick_name; |
@@ -1398,16 +1457,22 @@ discard block |
||
1398 | 1457 | // Get a list of all join forms |
1399 | 1458 | $join_form_list = $oMemberModel->getJoinFormList(); |
1400 | 1459 | $join_form_srl_list = array_keys($join_form_list); |
1401 | - if(count($join_form_srl_list)<2) return new BaseObject(); |
|
1460 | + if(count($join_form_srl_list)<2) { |
|
1461 | + return new BaseObject(); |
|
1462 | + } |
|
1402 | 1463 | |
1403 | 1464 | $prev_member_join_form = NULL; |
1404 | 1465 | foreach($join_form_list as $key => $val) |
1405 | 1466 | { |
1406 | - if($val->member_join_form_srl == $member_join_form_srl) break; |
|
1467 | + if($val->member_join_form_srl == $member_join_form_srl) { |
|
1468 | + break; |
|
1469 | + } |
|
1407 | 1470 | $prev_member_join_form = $val; |
1408 | 1471 | } |
1409 | 1472 | // Return if no previous join form exists |
1410 | - if(!$prev_member_join_form) return new BaseObject(); |
|
1473 | + if(!$prev_member_join_form) { |
|
1474 | + return new BaseObject(); |
|
1475 | + } |
|
1411 | 1476 | // Information of the join form |
1412 | 1477 | $cur_args = new stdClass; |
1413 | 1478 | $cur_args->member_join_form_srl = $member_join_form_srl; |
@@ -1418,10 +1483,14 @@ discard block |
||
1418 | 1483 | $prev_args->list_order = $list_order; |
1419 | 1484 | // Execute Query |
1420 | 1485 | $output = executeQuery('member.updateMemberJoinFormListorder', $cur_args); |
1421 | - if(!$output->toBool()) return $output; |
|
1486 | + if(!$output->toBool()) { |
|
1487 | + return $output; |
|
1488 | + } |
|
1422 | 1489 | |
1423 | 1490 | executeQuery('member.updateMemberJoinFormListorder', $prev_args); |
1424 | - if(!$output->toBool()) return $output; |
|
1491 | + if(!$output->toBool()) { |
|
1492 | + return $output; |
|
1493 | + } |
|
1425 | 1494 | |
1426 | 1495 | return new BaseObject(); |
1427 | 1496 | } |
@@ -1445,16 +1514,22 @@ discard block |
||
1445 | 1514 | // Get information of all join forms |
1446 | 1515 | $join_form_list = $oMemberModel->getJoinFormList(); |
1447 | 1516 | $join_form_srl_list = array_keys($join_form_list); |
1448 | - if(count($join_form_srl_list)<2) return new BaseObject(); |
|
1517 | + if(count($join_form_srl_list)<2) { |
|
1518 | + return new BaseObject(); |
|
1519 | + } |
|
1449 | 1520 | |
1450 | 1521 | for($i=0;$i<count($join_form_srl_list);$i++) |
1451 | 1522 | { |
1452 | - if($join_form_srl_list[$i]==$member_join_form_srl) break; |
|
1523 | + if($join_form_srl_list[$i]==$member_join_form_srl) { |
|
1524 | + break; |
|
1525 | + } |
|
1453 | 1526 | } |
1454 | 1527 | |
1455 | 1528 | $next_member_join_form_srl = $join_form_srl_list[$i+1]; |
1456 | 1529 | // Return if no previous join form exists |
1457 | - if(!$next_member_join_form_srl) return new BaseObject(); |
|
1530 | + if(!$next_member_join_form_srl) { |
|
1531 | + return new BaseObject(); |
|
1532 | + } |
|
1458 | 1533 | $next_member_join_form = $join_form_list[$next_member_join_form_srl]; |
1459 | 1534 | // Information of the join form |
1460 | 1535 | $cur_args = new stdClass; |
@@ -1466,10 +1541,14 @@ discard block |
||
1466 | 1541 | $next_args->list_order = $list_order; |
1467 | 1542 | // Execute Query |
1468 | 1543 | $output = executeQuery('member.updateMemberJoinFormListorder', $cur_args); |
1469 | - if(!$output->toBool()) return $output; |
|
1544 | + if(!$output->toBool()) { |
|
1545 | + return $output; |
|
1546 | + } |
|
1470 | 1547 | |
1471 | 1548 | $output = executeQuery('member.updateMemberJoinFormListorder', $next_args); |
1472 | - if(!$output->toBool()) return $output; |
|
1549 | + if(!$output->toBool()) { |
|
1550 | + return $output; |
|
1551 | + } |
|
1473 | 1552 | |
1474 | 1553 | return new BaseObject(); |
1475 | 1554 | } |
@@ -24,31 +24,31 @@ discard block |
||
24 | 24 | // if(Context::getRequestMethod() == "GET") return new BaseObject(-1, "msg_invalid_request"); |
25 | 25 | // Extract the necessary information in advance |
26 | 26 | $logged_info = Context::get('logged_info'); |
27 | - if($logged_info->is_admin != 'Y' || !checkCSRF()) |
|
27 | + if ($logged_info->is_admin != 'Y' || !checkCSRF()) |
|
28 | 28 | { |
29 | 29 | return new BaseObject(-1, 'msg_invalid_request'); |
30 | 30 | } |
31 | 31 | |
32 | - $args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date'); |
|
33 | - $oMemberModel = &getModel ('member'); |
|
34 | - $config = $oMemberModel->getMemberConfig (); |
|
32 | + $args = Context::gets('member_srl', 'email_address', 'find_account_answer', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date'); |
|
33 | + $oMemberModel = &getModel('member'); |
|
34 | + $config = $oMemberModel->getMemberConfig(); |
|
35 | 35 | $getVars = array(); |
36 | - if($config->signupForm) |
|
36 | + if ($config->signupForm) |
|
37 | 37 | { |
38 | - foreach($config->signupForm as $formInfo) |
|
38 | + foreach ($config->signupForm as $formInfo) |
|
39 | 39 | { |
40 | - if($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) |
|
40 | + if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) |
|
41 | 41 | { |
42 | 42 | $getVars[] = $formInfo->name; |
43 | 43 | } |
44 | 44 | } |
45 | 45 | } |
46 | - foreach($getVars as $val) |
|
46 | + foreach ($getVars as $val) |
|
47 | 47 | { |
48 | 48 | $args->{$val} = Context::get($val); |
49 | 49 | } |
50 | 50 | $args->member_srl = Context::get('member_srl'); |
51 | - if(Context::get('reset_password')) |
|
51 | + if (Context::get('reset_password')) |
|
52 | 52 | $args->password = Context::get('reset_password'); |
53 | 53 | else unset($args->password); |
54 | 54 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | unset($all_args->error_return_url); |
61 | 61 | unset($all_args->success_return_url); |
62 | 62 | unset($all_args->ruleset); |
63 | - if(!isset($args->limit_date)) $args->limit_date = ""; |
|
63 | + if (!isset($args->limit_date)) $args->limit_date = ""; |
|
64 | 64 | unset($all_args->password); |
65 | 65 | unset($all_args->password2); |
66 | 66 | unset($all_args->reset_password); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $extra_vars = delObjectVars($all_args, $args); |
69 | 69 | $args->extra_vars = serialize($extra_vars); |
70 | 70 | // Check if an original member exists having the member_srl |
71 | - if($args->member_srl) |
|
71 | + if ($args->member_srl) |
|
72 | 72 | { |
73 | 73 | // Create a member model object |
74 | 74 | $oMemberModel = getModel('member'); |
@@ -76,14 +76,14 @@ discard block |
||
76 | 76 | $columnList = array('member_srl'); |
77 | 77 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList); |
78 | 78 | // If no original member exists, make a new one |
79 | - if($member_info->member_srl != $args->member_srl) unset($args->member_srl); |
|
79 | + if ($member_info->member_srl != $args->member_srl) unset($args->member_srl); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | // remove whitespace |
83 | 83 | $checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address'); |
84 | - foreach($checkInfos as $val) |
|
84 | + foreach ($checkInfos as $val) |
|
85 | 85 | { |
86 | - if(isset($args->{$val})) |
|
86 | + if (isset($args->{$val})) |
|
87 | 87 | { |
88 | 88 | $args->{$val} = preg_replace('/[\pZ\pC]+/u', '', html_entity_decode($args->{$val})); |
89 | 89 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $oMemberController = getController('member'); |
93 | 93 | // Execute insert or update depending on the value of member_srl |
94 | - if(!$args->member_srl) |
|
94 | + if (!$args->member_srl) |
|
95 | 95 | { |
96 | 96 | $args->password = Context::get('password'); |
97 | 97 | $output = $oMemberController->insertMember($args); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $msg_code = 'success_updated'; |
104 | 104 | } |
105 | 105 | |
106 | - if(!$output->toBool()) return $output; |
|
106 | + if (!$output->toBool()) return $output; |
|
107 | 107 | // Save Signature |
108 | 108 | $signature = Context::get('signature'); |
109 | 109 | $oMemberController->putSignature($args->member_srl, $signature); |
@@ -112,24 +112,24 @@ discard block |
||
112 | 112 | $this->setMessage($msg_code); |
113 | 113 | |
114 | 114 | $profile_image = $_FILES['profile_image']; |
115 | - if(is_uploaded_file($profile_image['tmp_name'])) |
|
115 | + if (is_uploaded_file($profile_image['tmp_name'])) |
|
116 | 116 | { |
117 | 117 | $output = $oMemberController->insertProfileImage($args->member_srl, $profile_image['tmp_name']); |
118 | - if(!$output->toBool()) return $output; |
|
118 | + if (!$output->toBool()) return $output; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | $image_mark = $_FILES['image_mark']; |
122 | - if(is_uploaded_file($image_mark['tmp_name'])) |
|
122 | + if (is_uploaded_file($image_mark['tmp_name'])) |
|
123 | 123 | { |
124 | 124 | $output = $oMemberController->insertImageMark($args->member_srl, $image_mark['tmp_name']); |
125 | - if(!$output->toBool()) return $output; |
|
125 | + if (!$output->toBool()) return $output; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | $image_name = $_FILES['image_name']; |
129 | 129 | if (is_uploaded_file($image_name['tmp_name'])) |
130 | 130 | { |
131 | 131 | $output = $oMemberController->insertImageName($args->member_srl, $image_name['tmp_name']); |
132 | - if(!$output->toBool()) return $output; |
|
132 | + if (!$output->toBool()) return $output; |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminList'); |
@@ -147,9 +147,9 @@ discard block |
||
147 | 147 | |
148 | 148 | $oMemberController = getController('member'); |
149 | 149 | $output = $oMemberController->deleteMember($member_srl); |
150 | - if(!$output->toBool()) return $output; |
|
150 | + if (!$output->toBool()) return $output; |
|
151 | 151 | |
152 | - $this->add('page',Context::get('page')); |
|
152 | + $this->add('page', Context::get('page')); |
|
153 | 153 | $this->setMessage("success_deleted"); |
154 | 154 | } |
155 | 155 | |
@@ -168,26 +168,26 @@ discard block |
||
168 | 168 | ); |
169 | 169 | |
170 | 170 | $oPassword = new Password(); |
171 | - if(!array_key_exists($args->password_hashing_algorithm, $oPassword->getSupportedAlgorithms())) |
|
171 | + if (!array_key_exists($args->password_hashing_algorithm, $oPassword->getSupportedAlgorithms())) |
|
172 | 172 | { |
173 | 173 | $args->password_hashing_algorithm = 'md5'; |
174 | 174 | } |
175 | 175 | |
176 | 176 | $args->password_hashing_work_factor = intval($args->password_hashing_work_factor, 10); |
177 | - if($args->password_hashing_work_factor < 4) |
|
177 | + if ($args->password_hashing_work_factor < 4) |
|
178 | 178 | { |
179 | 179 | $args->password_hashing_work_factor = 4; |
180 | 180 | } |
181 | - if($args->password_hashing_work_factor > 16) |
|
181 | + if ($args->password_hashing_work_factor > 16) |
|
182 | 182 | { |
183 | 183 | $args->password_hashing_work_factor = 16; |
184 | 184 | } |
185 | - if($args->password_hashing_auto_upgrade != 'Y') |
|
185 | + if ($args->password_hashing_auto_upgrade != 'Y') |
|
186 | 186 | { |
187 | 187 | $args->password_hashing_auto_upgrade = 'N'; |
188 | 188 | } |
189 | 189 | |
190 | - if((!$args->webmaster_name || !$args->webmaster_email) && $args->enable_confirm == 'Y') |
|
190 | + if ((!$args->webmaster_name || !$args->webmaster_email) && $args->enable_confirm == 'Y') |
|
191 | 191 | { |
192 | 192 | return new BaseObject(-1, 'msg_mail_authorization'); |
193 | 193 | } |
@@ -222,20 +222,20 @@ discard block |
||
222 | 222 | $usable_list = Context::get('usable_list'); |
223 | 223 | $all_args = Context::getRequestVars(); |
224 | 224 | |
225 | - $args->limit_day = (int)$args->limit_day; |
|
226 | - if(!trim(strip_tags($args->agreement))) |
|
225 | + $args->limit_day = (int) $args->limit_day; |
|
226 | + if (!trim(strip_tags($args->agreement))) |
|
227 | 227 | { |
228 | - $agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt'; |
|
228 | + $agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt'; |
|
229 | 229 | FileHandler::removeFile($agreement_file); |
230 | 230 | $args->agreement = NULL; |
231 | 231 | } |
232 | 232 | |
233 | - if($args->redirect_url) |
|
233 | + if ($args->redirect_url) |
|
234 | 234 | { |
235 | 235 | $oModuleModel = getModel('module'); |
236 | 236 | $redirectModuleInfo = $oModuleModel->getModuleInfoByModuleSrl($args->redirect_url, array('mid')); |
237 | 237 | |
238 | - if(!$redirectModuleInfo) |
|
238 | + if (!$redirectModuleInfo) |
|
239 | 239 | { |
240 | 240 | return new BaseObject('-1', 'msg_exist_selected_module'); |
241 | 241 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question'); |
275 | 275 | $extendItems = $oMemberModel->getJoinFormList(); |
276 | 276 | |
277 | - foreach($list_order as $key) |
|
277 | + foreach ($list_order as $key) |
|
278 | 278 | { |
279 | 279 | $signupItem = new stdClass(); |
280 | 280 | $signupItem->isIdentifier = ($key == $all_args->identifier); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $signupItem->isUse = in_array($key, $usable_list) || $signupItem->required; |
288 | 288 | $signupItem->isPublic = ($all_args->{'is_'.$key.'_public'} == 'Y' && $signupItem->isUse) ? 'Y' : 'N'; |
289 | 289 | |
290 | - if($signupItem->imageType) |
|
290 | + if ($signupItem->imageType) |
|
291 | 291 | { |
292 | 292 | $signupItem->max_width = $all_args->{$key.'_max_width'}; |
293 | 293 | $signupItem->max_height = $all_args->{$key.'_max_height'}; |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | } |
297 | 297 | |
298 | 298 | // set extends form |
299 | - if(!$signupItem->isDefaultForm) |
|
299 | + if (!$signupItem->isDefaultForm) |
|
300 | 300 | { |
301 | 301 | $extendItem = $extendItems[$all_args->{$key.'_member_join_form_srl'}]; |
302 | 302 | $signupItem->type = $extendItem->column_type; |
@@ -305,13 +305,13 @@ discard block |
||
305 | 305 | $signupItem->description = $extendItem->description; |
306 | 306 | |
307 | 307 | // check usable value change, required/option |
308 | - if($signupItem->isUse != ($extendItem->is_active == 'Y') || $signupItem->required != ($extendItem->required == 'Y')) |
|
308 | + if ($signupItem->isUse != ($extendItem->is_active == 'Y') || $signupItem->required != ($extendItem->required == 'Y')) |
|
309 | 309 | { |
310 | 310 | unset($update_args); |
311 | 311 | $update_args = new stdClass; |
312 | 312 | $update_args->member_join_form_srl = $extendItem->member_join_form_srl; |
313 | - $update_args->is_active = $signupItem->isUse?'Y':'N'; |
|
314 | - $update_args->required = $signupItem->required?'Y':'N'; |
|
313 | + $update_args->is_active = $signupItem->isUse ? 'Y' : 'N'; |
|
314 | + $update_args->required = $signupItem->required ? 'Y' : 'N'; |
|
315 | 315 | |
316 | 316 | $update_output = executeQuery('member.updateJoinForm', $update_args); |
317 | 317 | } |
@@ -328,9 +328,9 @@ discard block |
||
328 | 328 | $this->_createFindAccountByQuestion($args->identifier); |
329 | 329 | |
330 | 330 | // check agreement value exist |
331 | - if($args->agreement) |
|
331 | + if ($args->agreement) |
|
332 | 332 | { |
333 | - $agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt'; |
|
333 | + $agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt'; |
|
334 | 334 | $output = FileHandler::writeFile($agreement_file, $args->agreement); |
335 | 335 | |
336 | 336 | unset($args->agreement); |
@@ -358,16 +358,16 @@ discard block |
||
358 | 358 | 'after_logout_url' |
359 | 359 | ); |
360 | 360 | |
361 | - if(!$args->change_password_date) |
|
361 | + if (!$args->change_password_date) |
|
362 | 362 | { |
363 | 363 | $args->change_password_date = 0; |
364 | 364 | } |
365 | 365 | |
366 | - if(!trim(strip_tags($args->after_login_url))) |
|
366 | + if (!trim(strip_tags($args->after_login_url))) |
|
367 | 367 | { |
368 | 368 | $args->after_login_url = NULL; |
369 | 369 | } |
370 | - if(!trim(strip_tags($args->after_logout_url))) |
|
370 | + if (!trim(strip_tags($args->after_logout_url))) |
|
371 | 371 | { |
372 | 372 | $args->after_logout_url = NULL; |
373 | 373 | } |
@@ -394,17 +394,17 @@ discard block |
||
394 | 394 | ); |
395 | 395 | |
396 | 396 | $args->layout_srl = $args->layout_srl ? $args->layout_srl : NULL; |
397 | - if(!$args->skin) |
|
397 | + if (!$args->skin) |
|
398 | 398 | { |
399 | 399 | $args->skin = 'default'; |
400 | 400 | } |
401 | - if(!$args->colorset) |
|
401 | + if (!$args->colorset) |
|
402 | 402 | { |
403 | 403 | $args->colorset = 'white'; |
404 | 404 | } |
405 | 405 | |
406 | 406 | $args->mlayout_srl = $args->mlayout_srl ? $args->mlayout_srl : NULL; |
407 | - if(!$args->mskin) |
|
407 | + if (!$args->mskin) |
|
408 | 408 | { |
409 | 409 | $args->mskin = 'default'; |
410 | 410 | } |
@@ -427,12 +427,12 @@ discard block |
||
427 | 427 | $extendItems = $oMemberModel->getJoinFormList(); |
428 | 428 | |
429 | 429 | $items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark'); |
430 | - $mustRequireds = array('email_address', 'nick_name','password', 'find_account_question'); |
|
430 | + $mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question'); |
|
431 | 431 | $orgRequireds = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name'); |
432 | 432 | $orgUse = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday'); |
433 | 433 | $list_order = array(); |
434 | 434 | |
435 | - foreach($items as $key) |
|
435 | + foreach ($items as $key) |
|
436 | 436 | { |
437 | 437 | unset($signupItem); |
438 | 438 | $signupItem = new stdClass; |
@@ -444,23 +444,23 @@ discard block |
||
444 | 444 | $signupItem->required = in_array($key, $orgRequireds); |
445 | 445 | $signupItem->isUse = ($config->{$key} == 'Y') || in_array($key, $orgUse); |
446 | 446 | $signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N'; |
447 | - if(in_array($key, array('find_account_question', 'password', 'email_address'))) |
|
447 | + if (in_array($key, array('find_account_question', 'password', 'email_address'))) |
|
448 | 448 | { |
449 | 449 | $signupItem->isPublic = 'N'; |
450 | 450 | } |
451 | 451 | $signupItem->isIdentifier = ($key == $identifier); |
452 | - if ($signupItem->imageType){ |
|
452 | + if ($signupItem->imageType) { |
|
453 | 453 | $signupItem->max_width = $config->{$key.'_max_width'}; |
454 | 454 | $signupItem->max_height = $config->{$key.'_max_height'}; |
455 | 455 | } |
456 | - if($signupItem->isIdentifier) |
|
456 | + if ($signupItem->isIdentifier) |
|
457 | 457 | array_unshift($list_order, $signupItem); |
458 | 458 | else |
459 | 459 | $list_order[] = $signupItem; |
460 | 460 | } |
461 | - if(is_array($extendItems)) |
|
461 | + if (is_array($extendItems)) |
|
462 | 462 | { |
463 | - foreach($extendItems as $form_srl=>$item_info) |
|
463 | + foreach ($extendItems as $form_srl=>$item_info) |
|
464 | 464 | { |
465 | 465 | unset($signupItem); |
466 | 466 | $signupItem = new stdClass; |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $signupItem->isUse = ($item_info->is_active == 'Y'); |
474 | 474 | $signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N'; |
475 | 475 | $signupItem->description = $item_info->description; |
476 | - if($signupItem->imageType) |
|
476 | + if ($signupItem->imageType) |
|
477 | 477 | { |
478 | 478 | $signupItem->max_width = $config->{$key.'_max_width'}; |
479 | 479 | $signupItem->max_height = $config->{$key.'_max_height'}; |
@@ -491,13 +491,13 @@ discard block |
||
491 | 491 | * @param string $agreement |
492 | 492 | * @return void |
493 | 493 | */ |
494 | - function _createSignupRuleset($signupForm, $agreement = null){ |
|
494 | + function _createSignupRuleset($signupForm, $agreement = null) { |
|
495 | 495 | $xml_file = './files/ruleset/insertMember.xml'; |
496 | - $buff = '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL. |
|
497 | - '<ruleset version="1.5.0">' . PHP_EOL. |
|
498 | - '<customrules>' . PHP_EOL. |
|
499 | - '</customrules>' . PHP_EOL. |
|
500 | - '<fields>' . PHP_EOL . '%s' . PHP_EOL . '</fields>' . PHP_EOL. |
|
496 | + $buff = '<?xml version="1.0" encoding="utf-8"?>'.PHP_EOL. |
|
497 | + '<ruleset version="1.5.0">'.PHP_EOL. |
|
498 | + '<customrules>'.PHP_EOL. |
|
499 | + '</customrules>'.PHP_EOL. |
|
500 | + '<fields>'.PHP_EOL.'%s'.PHP_EOL.'</fields>'.PHP_EOL. |
|
501 | 501 | '</ruleset>'; |
502 | 502 | |
503 | 503 | $fields = array(); |
@@ -506,41 +506,41 @@ discard block |
||
506 | 506 | { |
507 | 507 | $fields[] = '<field name="accept_agreement"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /></field>'; |
508 | 508 | } |
509 | - foreach($signupForm as $formInfo) |
|
509 | + foreach ($signupForm as $formInfo) |
|
510 | 510 | { |
511 | - if($formInfo->required || $formInfo->mustRequired) |
|
511 | + if ($formInfo->required || $formInfo->mustRequired) |
|
512 | 512 | { |
513 | - if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip') |
|
513 | + if ($formInfo->type == 'tel' || $formInfo->type == 'kr_zip') |
|
514 | 514 | { |
515 | 515 | $fields[] = sprintf('<field name="%s[]" required="true" />', $formInfo->name); |
516 | 516 | } |
517 | - else if($formInfo->name == 'password') |
|
517 | + else if ($formInfo->name == 'password') |
|
518 | 518 | { |
519 | 519 | $fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:60" /></field>'; |
520 | 520 | $fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>'; |
521 | 521 | } |
522 | - else if($formInfo->name == 'find_account_question') |
|
522 | + else if ($formInfo->name == 'find_account_question') |
|
523 | 523 | { |
524 | 524 | $fields[] = '<field name="find_account_question"><if test="$modify_find_account_answer" attr="required" value="true" /></field>'; |
525 | 525 | $fields[] = '<field name="find_account_answer" length=":250"><if test="$modify_find_account_answer" attr="required" value="true" /></field>'; |
526 | 526 | } |
527 | - else if($formInfo->name == 'email_address') |
|
527 | + else if ($formInfo->name == 'email_address') |
|
528 | 528 | { |
529 | 529 | $fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name); |
530 | 530 | } |
531 | - else if($formInfo->name == 'user_id') |
|
531 | + else if ($formInfo->name == 'user_id') |
|
532 | 532 | { |
533 | 533 | $fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name); |
534 | 534 | } |
535 | - else if($formInfo->name == 'nick_name') |
|
535 | + else if ($formInfo->name == 'nick_name') |
|
536 | 536 | { |
537 | 537 | $fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name); |
538 | 538 | } |
539 | - else if(strpos($formInfo->name, 'image') !== false) |
|
539 | + else if (strpos($formInfo->name, 'image') !== false) |
|
540 | 540 | { |
541 | 541 | $fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' && $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name); |
542 | 542 | } |
543 | - else if($formInfo->name == 'signature') |
|
543 | + else if ($formInfo->name == 'signature') |
|
544 | 544 | { |
545 | 545 | $fields[] = '<field name="signature"><if test="$member_srl" attr="required" value="true" /></field>'; |
546 | 546 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | FileHandler::writeFile($xml_file, $xml_buff); |
556 | 556 | unset($xml_buff); |
557 | 557 | |
558 | - $validator = new Validator($xml_file); |
|
558 | + $validator = new Validator($xml_file); |
|
559 | 559 | $validator->setCacheDir('files/cache'); |
560 | 560 | $validator->getJsPath(); |
561 | 561 | } |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | $xml_buff = sprintf($buff, implode('', $fields)); |
584 | 584 | Filehandler::writeFile($xml_file, $xml_buff); |
585 | 585 | |
586 | - $validator = new Validator($xml_file); |
|
586 | + $validator = new Validator($xml_file); |
|
587 | 587 | $validator->setCacheDir('files/cache'); |
588 | 588 | $validator->getJsPath(); |
589 | 589 | } |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | '</ruleset>'; |
605 | 605 | |
606 | 606 | $fields = array(); |
607 | - if($identifier == 'user_id') |
|
607 | + if ($identifier == 'user_id') |
|
608 | 608 | $fields[] = '<field name="user_id" required="true" rule="userid" />'; |
609 | 609 | |
610 | 610 | $fields[] = '<field name="email_address" required="true" rule="email" />'; |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | $xml_buff = sprintf($buff, implode('', $fields)); |
615 | 615 | Filehandler::writeFile($xml_file, $xml_buff); |
616 | 616 | |
617 | - $validator = new Validator($xml_file); |
|
617 | + $validator = new Validator($xml_file); |
|
618 | 618 | $validator->setCacheDir('files/cache'); |
619 | 619 | $validator->getJsPath(); |
620 | 620 | } |
@@ -625,12 +625,12 @@ discard block |
||
625 | 625 | */ |
626 | 626 | function procMemberAdminInsertGroup() |
627 | 627 | { |
628 | - $args = Context::gets('title','description','is_default','image_mark'); |
|
628 | + $args = Context::gets('title', 'description', 'is_default', 'image_mark'); |
|
629 | 629 | $output = $this->insertGroup($args); |
630 | - if(!$output->toBool()) return $output; |
|
630 | + if (!$output->toBool()) return $output; |
|
631 | 631 | |
632 | - $this->add('group_srl',''); |
|
633 | - $this->add('page',Context::get('page')); |
|
632 | + $this->add('group_srl', ''); |
|
633 | + $this->add('page', Context::get('page')); |
|
634 | 634 | $this->setMessage('success_registed'); |
635 | 635 | |
636 | 636 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList'); |
@@ -645,13 +645,13 @@ discard block |
||
645 | 645 | { |
646 | 646 | $group_srl = Context::get('group_srl'); |
647 | 647 | |
648 | - $args = Context::gets('group_srl','title','description','is_default','image_mark'); |
|
648 | + $args = Context::gets('group_srl', 'title', 'description', 'is_default', 'image_mark'); |
|
649 | 649 | $args->site_srl = 0; |
650 | 650 | $output = $this->updateGroup($args); |
651 | - if(!$output->toBool()) return $output; |
|
651 | + if (!$output->toBool()) return $output; |
|
652 | 652 | |
653 | - $this->add('group_srl',''); |
|
654 | - $this->add('page',Context::get('page')); |
|
653 | + $this->add('group_srl', ''); |
|
654 | + $this->add('page', Context::get('page')); |
|
655 | 655 | $this->setMessage('success_updated'); |
656 | 656 | |
657 | 657 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList'); |
@@ -667,10 +667,10 @@ discard block |
||
667 | 667 | $group_srl = Context::get('group_srl'); |
668 | 668 | |
669 | 669 | $output = $this->deleteGroup($group_srl); |
670 | - if(!$output->toBool()) return $output; |
|
670 | + if (!$output->toBool()) return $output; |
|
671 | 671 | |
672 | - $this->add('group_srl',''); |
|
673 | - $this->add('page',Context::get('page')); |
|
672 | + $this->add('group_srl', ''); |
|
673 | + $this->add('page', Context::get('page')); |
|
674 | 674 | $this->setMessage('success_deleted'); |
675 | 675 | |
676 | 676 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList'); |
@@ -692,10 +692,10 @@ discard block |
||
692 | 692 | $args->default_value = explode("\n", str_replace("\r", '', Context::get('default_value'))); |
693 | 693 | $args->required = Context::get('required'); |
694 | 694 | $args->is_active = (isset($args->required)); |
695 | - if(!in_array(strtoupper($args->required), array('Y','N')))$args->required = 'N'; |
|
695 | + if (!in_array(strtoupper($args->required), array('Y', 'N')))$args->required = 'N'; |
|
696 | 696 | $args->description = Context::get('description') ? Context::get('description') : ''; |
697 | 697 | // Default values |
698 | - if(in_array($args->column_type, array('checkbox','select','radio')) && count($args->default_value)) |
|
698 | + if (in_array($args->column_type, array('checkbox', 'select', 'radio')) && count($args->default_value)) |
|
699 | 699 | { |
700 | 700 | $args->default_value = serialize($args->default_value); |
701 | 701 | } |
@@ -707,17 +707,17 @@ discard block |
||
707 | 707 | // Check ID duplicated |
708 | 708 | $oMemberModel = getModel('member'); |
709 | 709 | $config = $oMemberModel->getMemberConfig(); |
710 | - foreach($config->signupForm as $item) |
|
710 | + foreach ($config->signupForm as $item) |
|
711 | 711 | { |
712 | - if($item->name == $args->column_name) |
|
712 | + if ($item->name == $args->column_name) |
|
713 | 713 | { |
714 | - if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue; |
|
715 | - return new BaseObject(-1,'msg_exists_user_id'); |
|
714 | + if ($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue; |
|
715 | + return new BaseObject(-1, 'msg_exists_user_id'); |
|
716 | 716 | } |
717 | 717 | } |
718 | 718 | // Fix if member_join_form_srl exists. Add if not exists. |
719 | 719 | $isInsert; |
720 | - if(!$args->member_join_form_srl) |
|
720 | + if (!$args->member_join_form_srl) |
|
721 | 721 | { |
722 | 722 | $isInsert = true; |
723 | 723 | $args->list_order = $args->member_join_form_srl = getNextSequence(); |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | $output = executeQuery('member.updateJoinForm', $args); |
729 | 729 | } |
730 | 730 | |
731 | - if(!$output->toBool()) return $output; |
|
731 | + if (!$output->toBool()) return $output; |
|
732 | 732 | |
733 | 733 | // memberConfig update |
734 | 734 | $signupItem = new stdClass(); |
@@ -745,15 +745,15 @@ discard block |
||
745 | 745 | $config = $oMemberModel->getMemberConfig(); |
746 | 746 | unset($config->agreement); |
747 | 747 | |
748 | - if($isInsert) |
|
748 | + if ($isInsert) |
|
749 | 749 | { |
750 | 750 | $config->signupForm[] = $signupItem; |
751 | 751 | } |
752 | 752 | else |
753 | 753 | { |
754 | - foreach($config->signupForm as $key=>$val) |
|
754 | + foreach ($config->signupForm as $key=>$val) |
|
755 | 755 | { |
756 | - if($val->member_join_form_srl == $signupItem->member_join_form_srl) |
|
756 | + if ($val->member_join_form_srl == $signupItem->member_join_form_srl) |
|
757 | 757 | { |
758 | 758 | $config->signupForm[$key] = $signupItem; |
759 | 759 | } |
@@ -781,9 +781,9 @@ discard block |
||
781 | 781 | $config = $oMemberModel->getMemberConfig(); |
782 | 782 | unset($config->agreement); |
783 | 783 | |
784 | - foreach($config->signupForm as $key=>$val) |
|
784 | + foreach ($config->signupForm as $key=>$val) |
|
785 | 785 | { |
786 | - if($val->member_join_form_srl == $member_join_form_srl) |
|
786 | + if ($val->member_join_form_srl == $member_join_form_srl) |
|
787 | 787 | { |
788 | 788 | unset($config->signupForm[$key]); |
789 | 789 | break; |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | $member_join_form_srl = Context::get('member_join_form_srl'); |
804 | 804 | $mode = Context::get('mode'); |
805 | 805 | |
806 | - switch($mode) |
|
806 | + switch ($mode) |
|
807 | 807 | { |
808 | 808 | case 'up' : |
809 | 809 | $output = $this->moveJoinFormUp($member_join_form_srl); |
@@ -820,7 +820,7 @@ discard block |
||
820 | 820 | case 'update' : |
821 | 821 | break; |
822 | 822 | } |
823 | - if(!$output->toBool()) return $output; |
|
823 | + if (!$output->toBool()) return $output; |
|
824 | 824 | |
825 | 825 | $this->setMessage($msg_code); |
826 | 826 | } |
@@ -839,40 +839,40 @@ discard block |
||
839 | 839 | $oDB->begin(); |
840 | 840 | |
841 | 841 | $oMemberController = getController('member'); |
842 | - foreach($members as $key=>$member_srl) |
|
842 | + foreach ($members as $key=>$member_srl) |
|
843 | 843 | { |
844 | 844 | $args = new stdClass(); |
845 | 845 | $args->member_srl = $member_srl; |
846 | - switch($var->type) |
|
846 | + switch ($var->type) |
|
847 | 847 | { |
848 | 848 | case 'modify': |
849 | 849 | { |
850 | - if(count($groups) > 0) |
|
850 | + if (count($groups) > 0) |
|
851 | 851 | { |
852 | 852 | $args->site_srl = 0; |
853 | 853 | // One of its members to delete all the group |
854 | 854 | $output = executeQuery('member.deleteMemberGroupMember', $args); |
855 | - if(!$output->toBool()) |
|
855 | + if (!$output->toBool()) |
|
856 | 856 | { |
857 | 857 | $oDB->rollback(); |
858 | 858 | return $output; |
859 | 859 | } |
860 | 860 | // Enter one of the loop a |
861 | - foreach($groups as $group_srl) |
|
861 | + foreach ($groups as $group_srl) |
|
862 | 862 | { |
863 | - $output = $oMemberController->addMemberToGroup($args->member_srl,$group_srl); |
|
864 | - if(!$output->toBool()) |
|
863 | + $output = $oMemberController->addMemberToGroup($args->member_srl, $group_srl); |
|
864 | + if (!$output->toBool()) |
|
865 | 865 | { |
866 | 866 | $oDB->rollback(); |
867 | 867 | return $output; |
868 | 868 | } |
869 | 869 | } |
870 | 870 | } |
871 | - if($var->denied) |
|
871 | + if ($var->denied) |
|
872 | 872 | { |
873 | 873 | $args->denied = $var->denied; |
874 | 874 | $output = executeQuery('member.updateMemberDeniedInfo', $args); |
875 | - if(!$output->toBool()) |
|
875 | + if (!$output->toBool()) |
|
876 | 876 | { |
877 | 877 | $oDB->rollback(); |
878 | 878 | return $output; |
@@ -885,7 +885,7 @@ discard block |
||
885 | 885 | { |
886 | 886 | $oMemberController->memberInfo = null; |
887 | 887 | $output = $oMemberController->deleteMember($member_srl); |
888 | - if(!$output->toBool()) |
|
888 | + if (!$output->toBool()) |
|
889 | 889 | { |
890 | 890 | $oDB->rollback(); |
891 | 891 | return $output; |
@@ -898,15 +898,15 @@ discard block |
||
898 | 898 | |
899 | 899 | $message = $var->message; |
900 | 900 | // Send a message |
901 | - if($message) |
|
901 | + if ($message) |
|
902 | 902 | { |
903 | 903 | $oCommunicationController = getController('communication'); |
904 | 904 | |
905 | 905 | $logged_info = Context::get('logged_info'); |
906 | - $title = cut_str($message,10,'...'); |
|
906 | + $title = cut_str($message, 10, '...'); |
|
907 | 907 | $sender_member_srl = $logged_info->member_srl; |
908 | 908 | |
909 | - foreach($members as $member_srl) |
|
909 | + foreach ($members as $member_srl) |
|
910 | 910 | { |
911 | 911 | $oCommunicationController->sendMessage($sender_member_srl, $member_srl, $title, $message, false); |
912 | 912 | } |
@@ -923,14 +923,14 @@ discard block |
||
923 | 923 | function procMemberAdminDeleteMembers() |
924 | 924 | { |
925 | 925 | $target_member_srls = Context::get('target_member_srls'); |
926 | - if(!$target_member_srls) return new BaseObject(-1, 'msg_invalid_request'); |
|
926 | + if (!$target_member_srls) return new BaseObject(-1, 'msg_invalid_request'); |
|
927 | 927 | $member_srls = explode(',', $target_member_srls); |
928 | 928 | $oMemberController = getController('member'); |
929 | 929 | |
930 | - foreach($member_srls as $member) |
|
930 | + foreach ($member_srls as $member) |
|
931 | 931 | { |
932 | 932 | $output = $oMemberController->deleteMember($member); |
933 | - if(!$output->toBool()) |
|
933 | + if (!$output->toBool()) |
|
934 | 934 | { |
935 | 935 | $this->setMessage('failed_deleted'); |
936 | 936 | return $output; |
@@ -947,11 +947,11 @@ discard block |
||
947 | 947 | function procMemberAdminUpdateMembersGroup() |
948 | 948 | { |
949 | 949 | $member_srl = Context::get('member_srl'); |
950 | - if(!$member_srl) return new BaseObject(-1,'msg_invalid_request'); |
|
951 | - $member_srls = explode(',',$member_srl); |
|
950 | + if (!$member_srl) return new BaseObject(-1, 'msg_invalid_request'); |
|
951 | + $member_srls = explode(',', $member_srl); |
|
952 | 952 | |
953 | 953 | $group_srl = Context::get('group_srls'); |
954 | - if(!is_array($group_srl)) $group_srls = explode('|@|', $group_srl); |
|
954 | + if (!is_array($group_srl)) $group_srls = explode('|@|', $group_srl); |
|
955 | 955 | else $group_srls = $group_srl; |
956 | 956 | |
957 | 957 | $oDB = &DB::getInstance(); |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | $args = new stdClass; |
961 | 961 | $args->member_srl = $member_srl; |
962 | 962 | $output = executeQuery('member.deleteMembersGroup', $args); |
963 | - if(!$output->toBool()) |
|
963 | + if (!$output->toBool()) |
|
964 | 964 | { |
965 | 965 | $oDB->rollback(); |
966 | 966 | return $output; |
@@ -968,21 +968,21 @@ discard block |
||
968 | 968 | // Add to a selected group |
969 | 969 | $group_count = count($group_srls); |
970 | 970 | $member_count = count($member_srls); |
971 | - for($j=0;$j<$group_count;$j++) |
|
971 | + for ($j = 0; $j < $group_count; $j++) |
|
972 | 972 | { |
973 | - $group_srl = (int)trim($group_srls[$j]); |
|
974 | - if(!$group_srl) continue; |
|
975 | - for($i=0;$i<$member_count;$i++) |
|
973 | + $group_srl = (int) trim($group_srls[$j]); |
|
974 | + if (!$group_srl) continue; |
|
975 | + for ($i = 0; $i < $member_count; $i++) |
|
976 | 976 | { |
977 | - $member_srl = (int)trim($member_srls[$i]); |
|
978 | - if(!$member_srl) continue; |
|
977 | + $member_srl = (int) trim($member_srls[$i]); |
|
978 | + if (!$member_srl) continue; |
|
979 | 979 | |
980 | 980 | $args = new stdClass; |
981 | 981 | $args->member_srl = $member_srl; |
982 | 982 | $args->group_srl = $group_srl; |
983 | 983 | |
984 | 984 | $output = executeQuery('member.addMemberToGroup', $args); |
985 | - if(!$output->toBool()) |
|
985 | + if (!$output->toBool()) |
|
986 | 986 | { |
987 | 987 | $oDB->rollback(); |
988 | 988 | return $output; |
@@ -995,7 +995,7 @@ discard block |
||
995 | 995 | |
996 | 996 | $this->setMessage('success_updated'); |
997 | 997 | |
998 | - if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) |
|
998 | + if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) |
|
999 | 999 | { |
1000 | 1000 | global $lang; |
1001 | 1001 | htmlHeader(); |
@@ -1016,19 +1016,19 @@ discard block |
||
1016 | 1016 | { |
1017 | 1017 | $user_ids = Context::get('user_id'); |
1018 | 1018 | |
1019 | - $user_ids = explode(',',$user_ids); |
|
1019 | + $user_ids = explode(',', $user_ids); |
|
1020 | 1020 | $success_ids = array(); |
1021 | 1021 | |
1022 | - foreach($user_ids as $val) |
|
1022 | + foreach ($user_ids as $val) |
|
1023 | 1023 | { |
1024 | 1024 | $val = trim($val); |
1025 | - if(!$val) continue; |
|
1025 | + if (!$val) continue; |
|
1026 | 1026 | |
1027 | 1027 | $output = $this->insertDeniedID($val, ''); |
1028 | - if($output->toBool()) $success_ids[] = $val; |
|
1028 | + if ($output->toBool()) $success_ids[] = $val; |
|
1029 | 1029 | } |
1030 | 1030 | |
1031 | - $this->add('user_ids', implode(',',$success_ids)); |
|
1031 | + $this->add('user_ids', implode(',', $success_ids)); |
|
1032 | 1032 | |
1033 | 1033 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminDeniedIDList'); |
1034 | 1034 | $this->setRedirectUrl($returnUrl); |
@@ -1045,10 +1045,10 @@ discard block |
||
1045 | 1045 | $mode = Context::get('mode'); |
1046 | 1046 | $mode = $mode ? $mode : 'insert'; |
1047 | 1047 | |
1048 | - if($mode == 'delete') |
|
1048 | + if ($mode == 'delete') |
|
1049 | 1049 | { |
1050 | 1050 | $output = $this->deleteDeniedNickName($nick_name); |
1051 | - if(!$output->toBool()) |
|
1051 | + if (!$output->toBool()) |
|
1052 | 1052 | { |
1053 | 1053 | return $output; |
1054 | 1054 | } |
@@ -1057,19 +1057,19 @@ discard block |
||
1057 | 1057 | } |
1058 | 1058 | else |
1059 | 1059 | { |
1060 | - $nick_names = explode(',',$nick_name); |
|
1060 | + $nick_names = explode(',', $nick_name); |
|
1061 | 1061 | $success_nick_names = array(); |
1062 | 1062 | |
1063 | - foreach($nick_names as $val) |
|
1063 | + foreach ($nick_names as $val) |
|
1064 | 1064 | { |
1065 | 1065 | $val = trim($val); |
1066 | - if(!$val) continue; |
|
1066 | + if (!$val) continue; |
|
1067 | 1067 | |
1068 | 1068 | $output = $this->insertDeniedNickName($val, ''); |
1069 | - if($output->toBool()) $success_nick_names[] = $val; |
|
1069 | + if ($output->toBool()) $success_nick_names[] = $val; |
|
1070 | 1070 | } |
1071 | 1071 | |
1072 | - $this->add('nick_names', implode(',',$success_nick_names)); |
|
1072 | + $this->add('nick_names', implode(',', $success_nick_names)); |
|
1073 | 1073 | } |
1074 | 1074 | } |
1075 | 1075 | |
@@ -1082,16 +1082,16 @@ discard block |
||
1082 | 1082 | $user_id = Context::get('user_id'); |
1083 | 1083 | $mode = Context::get('mode'); |
1084 | 1084 | |
1085 | - switch($mode) |
|
1085 | + switch ($mode) |
|
1086 | 1086 | { |
1087 | 1087 | case 'delete' : |
1088 | 1088 | $output = $this->deleteDeniedID($user_id); |
1089 | - if(!$output->toBool()) return $output; |
|
1089 | + if (!$output->toBool()) return $output; |
|
1090 | 1090 | $msg_code = 'success_deleted'; |
1091 | 1091 | break; |
1092 | 1092 | } |
1093 | 1093 | |
1094 | - $this->add('page',Context::get('page')); |
|
1094 | + $this->add('page', Context::get('page')); |
|
1095 | 1095 | $this->setMessage($msg_code); |
1096 | 1096 | } |
1097 | 1097 | |
@@ -1138,24 +1138,24 @@ discard block |
||
1138 | 1138 | */ |
1139 | 1139 | function insertGroup($args) |
1140 | 1140 | { |
1141 | - if(!$args->site_srl) $args->site_srl = 0; |
|
1141 | + if (!$args->site_srl) $args->site_srl = 0; |
|
1142 | 1142 | // Check the value of is_default. |
1143 | - if($args->is_default != 'Y') |
|
1143 | + if ($args->is_default != 'Y') |
|
1144 | 1144 | { |
1145 | 1145 | $args->is_default = 'N'; |
1146 | 1146 | } |
1147 | 1147 | else |
1148 | 1148 | { |
1149 | 1149 | $output = executeQuery('member.updateGroupDefaultClear', $args); |
1150 | - if(!$output->toBool()) return $output; |
|
1150 | + if (!$output->toBool()) return $output; |
|
1151 | 1151 | } |
1152 | 1152 | |
1153 | - if(!isset($args->list_order) || $args->list_order=='') |
|
1153 | + if (!isset($args->list_order) || $args->list_order == '') |
|
1154 | 1154 | { |
1155 | 1155 | $args->list_order = $args->group_srl; |
1156 | 1156 | } |
1157 | 1157 | |
1158 | - if(!$args->group_srl) $args->group_srl = getNextSequence(); |
|
1158 | + if (!$args->group_srl) $args->group_srl = getNextSequence(); |
|
1159 | 1159 | $args->list_order = $args->group_srl; |
1160 | 1160 | $output = executeQuery('member.insertGroup', $args); |
1161 | 1161 | $this->_deleteMemberGroupCache($args->site_srl); |
@@ -1170,17 +1170,17 @@ discard block |
||
1170 | 1170 | */ |
1171 | 1171 | function updateGroup($args) |
1172 | 1172 | { |
1173 | - if(!$args->site_srl) $args->site_srl = 0; |
|
1173 | + if (!$args->site_srl) $args->site_srl = 0; |
|
1174 | 1174 | // Check the value of is_default. |
1175 | - if(!$args->group_srl) return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1176 | - if($args->is_default!='Y') |
|
1175 | + if (!$args->group_srl) return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1176 | + if ($args->is_default != 'Y') |
|
1177 | 1177 | { |
1178 | 1178 | $args->is_default = 'N'; |
1179 | 1179 | } |
1180 | 1180 | else |
1181 | 1181 | { |
1182 | 1182 | $output = executeQuery('member.updateGroupDefaultClear', $args); |
1183 | - if(!$output->toBool()) return $output; |
|
1183 | + if (!$output->toBool()) return $output; |
|
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | $output = executeQuery('member.updateGroup', $args); |
@@ -1203,8 +1203,8 @@ discard block |
||
1203 | 1203 | $columnList = array('group_srl', 'is_default'); |
1204 | 1204 | $group_info = $oMemberModel->getGroup($group_srl, $columnList); |
1205 | 1205 | |
1206 | - if(!$group_info) return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1207 | - if($group_info->is_default == 'Y') return new BaseObject(-1, 'msg_not_delete_default'); |
|
1206 | + if (!$group_info) return new BaseObject(-1, 'lang->msg_not_founded'); |
|
1207 | + if ($group_info->is_default == 'Y') return new BaseObject(-1, 'msg_not_delete_default'); |
|
1208 | 1208 | |
1209 | 1209 | // Get groups where is_default == 'Y' |
1210 | 1210 | $columnList = array('site_srl', 'group_srl'); |
@@ -1241,7 +1241,7 @@ discard block |
||
1241 | 1241 | $defaultGroup = $oMemberModel->getDefaultGroup(0); |
1242 | 1242 | $defaultGroupSrl = $defaultGroup->group_srl; |
1243 | 1243 | $group_srls = $vars->group_srls; |
1244 | - foreach($group_srls as $order=>$group_srl) |
|
1244 | + foreach ($group_srls as $order=>$group_srl) |
|
1245 | 1245 | { |
1246 | 1246 | $isInsert = false; |
1247 | 1247 | $update_args = new stdClass(); |
@@ -1250,9 +1250,9 @@ discard block |
||
1250 | 1250 | $update_args->image_mark = $vars->image_marks[$order]; |
1251 | 1251 | $update_args->list_order = $order + 1; |
1252 | 1252 | |
1253 | - if(!$update_args->title) continue; |
|
1253 | + if (!$update_args->title) continue; |
|
1254 | 1254 | |
1255 | - if(is_numeric($group_srl)) { |
|
1255 | + if (is_numeric($group_srl)) { |
|
1256 | 1256 | $update_args->group_srl = $group_srl; |
1257 | 1257 | $output = $this->updateGroup($update_args); |
1258 | 1258 | } |
@@ -1261,7 +1261,7 @@ discard block |
||
1261 | 1261 | $output = $this->insertGroup($update_args); |
1262 | 1262 | } |
1263 | 1263 | |
1264 | - if($vars->defaultGroup == $group_srl) { |
|
1264 | + if ($vars->defaultGroup == $group_srl) { |
|
1265 | 1265 | $defaultGroupSrl = $update_args->group_srl; |
1266 | 1266 | } |
1267 | 1267 | } |
@@ -1287,7 +1287,7 @@ discard block |
||
1287 | 1287 | { |
1288 | 1288 | $vars = Context::getRequestVars(); |
1289 | 1289 | |
1290 | - foreach($vars->group_srls as $key => $val) |
|
1290 | + foreach ($vars->group_srls as $key => $val) |
|
1291 | 1291 | { |
1292 | 1292 | $args = new stdClass; |
1293 | 1293 | $args->group_srl = $val; |
@@ -1308,7 +1308,7 @@ discard block |
||
1308 | 1308 | { |
1309 | 1309 | //remove from cache |
1310 | 1310 | $oCacheHandler = CacheHandler::getInstance('object', null, true); |
1311 | - if($oCacheHandler->isSupport()) |
|
1311 | + if ($oCacheHandler->isSupport()) |
|
1312 | 1312 | { |
1313 | 1313 | $oCacheHandler->invalidateGroupKey('member'); |
1314 | 1314 | } |
@@ -1325,7 +1325,7 @@ discard block |
||
1325 | 1325 | $args = new stdClass(); |
1326 | 1326 | $args->user_id = $user_id; |
1327 | 1327 | $args->description = $description; |
1328 | - $args->list_order = -1*getNextSequence(); |
|
1328 | + $args->list_order = -1 * getNextSequence(); |
|
1329 | 1329 | |
1330 | 1330 | return executeQuery('member.insertDeniedID', $args); |
1331 | 1331 | } |
@@ -1346,7 +1346,7 @@ discard block |
||
1346 | 1346 | */ |
1347 | 1347 | function deleteDeniedID($user_id) |
1348 | 1348 | { |
1349 | - if(!$user_id) unset($user_id); |
|
1349 | + if (!$user_id) unset($user_id); |
|
1350 | 1350 | |
1351 | 1351 | $args = new stdClass; |
1352 | 1352 | $args->user_id = $user_id; |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | */ |
1361 | 1361 | function deleteDeniedNickName($nick_name) |
1362 | 1362 | { |
1363 | - if(!$nick_name) unset($nick_name); |
|
1363 | + if (!$nick_name) unset($nick_name); |
|
1364 | 1364 | |
1365 | 1365 | $args = new stdClass; |
1366 | 1366 | $args->nick_name = $nick_name; |
@@ -1399,16 +1399,16 @@ discard block |
||
1399 | 1399 | // Get a list of all join forms |
1400 | 1400 | $join_form_list = $oMemberModel->getJoinFormList(); |
1401 | 1401 | $join_form_srl_list = array_keys($join_form_list); |
1402 | - if(count($join_form_srl_list)<2) return new BaseObject(); |
|
1402 | + if (count($join_form_srl_list) < 2) return new BaseObject(); |
|
1403 | 1403 | |
1404 | 1404 | $prev_member_join_form = NULL; |
1405 | - foreach($join_form_list as $key => $val) |
|
1405 | + foreach ($join_form_list as $key => $val) |
|
1406 | 1406 | { |
1407 | - if($val->member_join_form_srl == $member_join_form_srl) break; |
|
1407 | + if ($val->member_join_form_srl == $member_join_form_srl) break; |
|
1408 | 1408 | $prev_member_join_form = $val; |
1409 | 1409 | } |
1410 | 1410 | // Return if no previous join form exists |
1411 | - if(!$prev_member_join_form) return new BaseObject(); |
|
1411 | + if (!$prev_member_join_form) return new BaseObject(); |
|
1412 | 1412 | // Information of the join form |
1413 | 1413 | $cur_args = new stdClass; |
1414 | 1414 | $cur_args->member_join_form_srl = $member_join_form_srl; |
@@ -1419,10 +1419,10 @@ discard block |
||
1419 | 1419 | $prev_args->list_order = $list_order; |
1420 | 1420 | // Execute Query |
1421 | 1421 | $output = executeQuery('member.updateMemberJoinFormListorder', $cur_args); |
1422 | - if(!$output->toBool()) return $output; |
|
1422 | + if (!$output->toBool()) return $output; |
|
1423 | 1423 | |
1424 | 1424 | executeQuery('member.updateMemberJoinFormListorder', $prev_args); |
1425 | - if(!$output->toBool()) return $output; |
|
1425 | + if (!$output->toBool()) return $output; |
|
1426 | 1426 | |
1427 | 1427 | return new BaseObject(); |
1428 | 1428 | } |
@@ -1446,16 +1446,16 @@ discard block |
||
1446 | 1446 | // Get information of all join forms |
1447 | 1447 | $join_form_list = $oMemberModel->getJoinFormList(); |
1448 | 1448 | $join_form_srl_list = array_keys($join_form_list); |
1449 | - if(count($join_form_srl_list)<2) return new BaseObject(); |
|
1449 | + if (count($join_form_srl_list) < 2) return new BaseObject(); |
|
1450 | 1450 | |
1451 | - for($i=0;$i<count($join_form_srl_list);$i++) |
|
1451 | + for ($i = 0; $i < count($join_form_srl_list); $i++) |
|
1452 | 1452 | { |
1453 | - if($join_form_srl_list[$i]==$member_join_form_srl) break; |
|
1453 | + if ($join_form_srl_list[$i] == $member_join_form_srl) break; |
|
1454 | 1454 | } |
1455 | 1455 | |
1456 | - $next_member_join_form_srl = $join_form_srl_list[$i+1]; |
|
1456 | + $next_member_join_form_srl = $join_form_srl_list[$i + 1]; |
|
1457 | 1457 | // Return if no previous join form exists |
1458 | - if(!$next_member_join_form_srl) return new BaseObject(); |
|
1458 | + if (!$next_member_join_form_srl) return new BaseObject(); |
|
1459 | 1459 | $next_member_join_form = $join_form_list[$next_member_join_form_srl]; |
1460 | 1460 | // Information of the join form |
1461 | 1461 | $cur_args = new stdClass; |
@@ -1467,10 +1467,10 @@ discard block |
||
1467 | 1467 | $next_args->list_order = $list_order; |
1468 | 1468 | // Execute Query |
1469 | 1469 | $output = executeQuery('member.updateMemberJoinFormListorder', $cur_args); |
1470 | - if(!$output->toBool()) return $output; |
|
1470 | + if (!$output->toBool()) return $output; |
|
1471 | 1471 | |
1472 | 1472 | $output = executeQuery('member.updateMemberJoinFormListorder', $next_args); |
1473 | - if(!$output->toBool()) return $output; |
|
1473 | + if (!$output->toBool()) return $output; |
|
1474 | 1474 | |
1475 | 1475 | return new BaseObject(); |
1476 | 1476 | } |
@@ -63,20 +63,28 @@ discard block |
||
63 | 63 | switch($search_target) |
64 | 64 | { |
65 | 65 | case 'user_id' : |
66 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
66 | + if($search_keyword) { |
|
67 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
68 | + } |
|
67 | 69 | $args->s_user_id = $search_keyword; |
68 | 70 | break; |
69 | 71 | case 'user_name' : |
70 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
72 | + if($search_keyword) { |
|
73 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
74 | + } |
|
71 | 75 | $args->s_user_name = $search_keyword; |
72 | 76 | break; |
73 | 77 | case 'nick_name' : |
74 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
78 | + if($search_keyword) { |
|
79 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
80 | + } |
|
75 | 81 | $args->s_nick_name = $search_keyword; |
76 | 82 | $args->html_nick_name = htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
77 | 83 | break; |
78 | 84 | case 'email_address' : |
79 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
85 | + if($search_keyword) { |
|
86 | + $search_keyword = str_replace(' ','%',$search_keyword); |
|
87 | + } |
|
80 | 88 | $args->s_email_address = $search_keyword; |
81 | 89 | break; |
82 | 90 | case 'regdate' : |
@@ -129,8 +137,7 @@ discard block |
||
129 | 137 | { |
130 | 138 | $query_id = 'member.getMemberListWithinGroup'; |
131 | 139 | $args->sort_index = "member.".$sort_index; |
132 | - } |
|
133 | - else |
|
140 | + } else |
|
134 | 141 | { |
135 | 142 | $query_id = 'member.getMemberList'; |
136 | 143 | $args->sort_index = $sort_index; |
@@ -174,7 +181,9 @@ discard block |
||
174 | 181 | function getSiteAdminMemberSrls() |
175 | 182 | { |
176 | 183 | $output = executeQueryArray('member.getSiteAdminMemberSrls'); |
177 | - if(!$output->toBool() || !$output->data) return array(); |
|
184 | + if(!$output->toBool() || !$output->data) { |
|
185 | + return array(); |
|
186 | + } |
|
178 | 187 | |
179 | 188 | $member_srls = array(); |
180 | 189 | foreach($output->data as $member_info) |
@@ -193,8 +202,9 @@ discard block |
||
193 | 202 | function getMemberAdminColorset() |
194 | 203 | { |
195 | 204 | $skin = Context::get('skin'); |
196 | - if(!$skin) $tpl = ""; |
|
197 | - else |
|
205 | + if(!$skin) { |
|
206 | + $tpl = ""; |
|
207 | + } else |
|
198 | 208 | { |
199 | 209 | $oModuleModel = getModel('module'); |
200 | 210 | $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin); |
@@ -202,7 +212,9 @@ discard block |
||
202 | 212 | |
203 | 213 | $oModuleModel = getModel('module'); |
204 | 214 | $config = $oModuleModel->getModuleConfig('member'); |
205 | - if(!$config->colorset) $config->colorset = "white"; |
|
215 | + if(!$config->colorset) { |
|
216 | + $config->colorset = "white"; |
|
217 | + } |
|
206 | 218 | Context::set('config', $config); |
207 | 219 | |
208 | 220 | $oTemplate = &TemplateHandler::getInstance(); |
@@ -223,10 +235,14 @@ discard block |
||
223 | 235 | public function getMemberCountByDate($date = '') |
224 | 236 | { |
225 | 237 | $args = new stdClass(); |
226 | - if($date) $args->regDate = date('Ymd', strtotime($date)); |
|
238 | + if($date) { |
|
239 | + $args->regDate = date('Ymd', strtotime($date)); |
|
240 | + } |
|
227 | 241 | |
228 | 242 | $output = executeQuery('member.getMemberCountByDate', $args); |
229 | - if(!$output->toBool()) return 0; |
|
243 | + if(!$output->toBool()) { |
|
244 | + return 0; |
|
245 | + } |
|
230 | 246 | |
231 | 247 | return $output->data->count; |
232 | 248 | } |
@@ -240,10 +256,14 @@ discard block |
||
240 | 256 | */ |
241 | 257 | function getMemberGroupMemberCountByDate($date = '') |
242 | 258 | { |
243 | - if($date) $args->regDate = date('Ymd', strtotime($date)); |
|
259 | + if($date) { |
|
260 | + $args->regDate = date('Ymd', strtotime($date)); |
|
261 | + } |
|
244 | 262 | |
245 | 263 | $output = executeQuery('member.getMemberGroupMemberCountByDate', $args); |
246 | - if(!$output->toBool()) return 0; |
|
264 | + if(!$output->toBool()) { |
|
265 | + return 0; |
|
266 | + } |
|
247 | 267 | |
248 | 268 | return count($output->data); |
249 | 269 | } |
@@ -298,10 +318,17 @@ discard block |
||
298 | 318 | { |
299 | 319 | $db_info = Context::getDBInfo(); |
300 | 320 | $admin_ip_list = $db_info->admin_ip_list; |
301 | - if(!$admin_ip_list) return true; |
|
302 | - if(!is_array($admin_ip_list)) $admin_ip_list = explode(',',$admin_ip_list); |
|
303 | - if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true; |
|
304 | - else return false; |
|
321 | + if(!$admin_ip_list) { |
|
322 | + return true; |
|
323 | + } |
|
324 | + if(!is_array($admin_ip_list)) { |
|
325 | + $admin_ip_list = explode(',',$admin_ip_list); |
|
326 | + } |
|
327 | + if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) { |
|
328 | + return true; |
|
329 | + } else { |
|
330 | + return false; |
|
331 | + } |
|
305 | 332 | } |
306 | 333 | } |
307 | 334 | /* End of file member.admin.model.php */ |
@@ -42,64 +42,64 @@ discard block |
||
42 | 42 | { |
43 | 43 | // Search option |
44 | 44 | $args = new stdClass(); |
45 | - $args->is_admin = Context::get('is_admin')=='Y'?'Y':''; |
|
46 | - $args->is_denied = Context::get('is_denied')=='Y'?'Y':''; |
|
45 | + $args->is_admin = Context::get('is_admin') == 'Y' ? 'Y' : ''; |
|
46 | + $args->is_denied = Context::get('is_denied') == 'Y' ? 'Y' : ''; |
|
47 | 47 | $args->selected_group_srl = Context::get('selected_group_srl'); |
48 | 48 | |
49 | 49 | $filter = Context::get('filter_type'); |
50 | - switch($filter) |
|
50 | + switch ($filter) |
|
51 | 51 | { |
52 | - case 'super_admin' : $args->is_admin = 'Y';break; |
|
53 | - case 'site_admin' : $args->member_srls = $this->getSiteAdminMemberSrls();break; |
|
54 | - case 'enable' : $args->is_denied = 'N';break; |
|
55 | - case 'disable' : $args->is_denied = 'Y';break; |
|
52 | + case 'super_admin' : $args->is_admin = 'Y'; break; |
|
53 | + case 'site_admin' : $args->member_srls = $this->getSiteAdminMemberSrls(); break; |
|
54 | + case 'enable' : $args->is_denied = 'N'; break; |
|
55 | + case 'disable' : $args->is_denied = 'Y'; break; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | $search_target = trim(Context::get('search_target')); |
59 | 59 | $search_keyword = trim(Context::get('search_keyword')); |
60 | 60 | |
61 | - if($search_target && $search_keyword) |
|
61 | + if ($search_target && $search_keyword) |
|
62 | 62 | { |
63 | - switch($search_target) |
|
63 | + switch ($search_target) |
|
64 | 64 | { |
65 | 65 | case 'user_id' : |
66 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
66 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
67 | 67 | $args->s_user_id = $search_keyword; |
68 | 68 | break; |
69 | 69 | case 'user_name' : |
70 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
70 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
71 | 71 | $args->s_user_name = $search_keyword; |
72 | 72 | break; |
73 | 73 | case 'nick_name' : |
74 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
74 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
75 | 75 | $args->s_nick_name = $search_keyword; |
76 | 76 | $args->html_nick_name = htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
77 | 77 | break; |
78 | 78 | case 'email_address' : |
79 | - if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword); |
|
79 | + if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword); |
|
80 | 80 | $args->s_email_address = $search_keyword; |
81 | 81 | break; |
82 | 82 | case 'regdate' : |
83 | - $args->s_regdate = preg_replace("/[^0-9]/","",$search_keyword); |
|
83 | + $args->s_regdate = preg_replace("/[^0-9]/", "", $search_keyword); |
|
84 | 84 | break; |
85 | 85 | case 'regdate_more' : |
86 | - $args->s_regdate_more = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14); |
|
86 | + $args->s_regdate_more = substr(preg_replace("/[^0-9]/", "", $search_keyword).'00000000000000', 0, 14); |
|
87 | 87 | break; |
88 | 88 | case 'regdate_less' : |
89 | - $args->s_regdate_less = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14); |
|
89 | + $args->s_regdate_less = substr(preg_replace("/[^0-9]/", "", $search_keyword).'00000000000000', 0, 14); |
|
90 | 90 | break; |
91 | 91 | case 'last_login' : |
92 | - $args->s_last_login = preg_replace("/[^0-9]/","",$search_keyword); |
|
92 | + $args->s_last_login = preg_replace("/[^0-9]/", "", $search_keyword); |
|
93 | 93 | //$args->s_last_login = $search_keyword; |
94 | 94 | break; |
95 | 95 | case 'last_login_more' : |
96 | - $args->s_last_login_more = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14); |
|
96 | + $args->s_last_login_more = substr(preg_replace("/[^0-9]/", "", $search_keyword).'00000000000000', 0, 14); |
|
97 | 97 | break; |
98 | 98 | case 'last_login_less' : |
99 | - $args->s_last_login_less = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14); |
|
99 | + $args->s_last_login_less = substr(preg_replace("/[^0-9]/", "", $search_keyword).'00000000000000', 0, 14); |
|
100 | 100 | break; |
101 | 101 | case 'birthday' : |
102 | - $args->s_birthday = preg_replace("/[^0-9]/","",$search_keyword); |
|
102 | + $args->s_birthday = preg_replace("/[^0-9]/", "", $search_keyword); |
|
103 | 103 | break; |
104 | 104 | case 'extra_vars' : |
105 | 105 | $args->s_extra_vars = $search_keyword; |
@@ -110,22 +110,22 @@ discard block |
||
110 | 110 | // Change the query id if selected_group_srl exists (for table join) |
111 | 111 | $sort_order = Context::get('sort_order'); |
112 | 112 | $sort_index = Context::get('sort_index'); |
113 | - if(!$sort_index) |
|
113 | + if (!$sort_index) |
|
114 | 114 | { |
115 | 115 | $sort_index = "list_order"; |
116 | 116 | } |
117 | 117 | |
118 | - if(!$sort_order) |
|
118 | + if (!$sort_order) |
|
119 | 119 | { |
120 | 120 | $sort_order = 'asc'; |
121 | 121 | } |
122 | 122 | |
123 | - if($sort_order != 'asc') |
|
123 | + if ($sort_order != 'asc') |
|
124 | 124 | { |
125 | 125 | $sort_order = 'desc'; |
126 | 126 | } |
127 | 127 | |
128 | - if($args->selected_group_srl) |
|
128 | + if ($args->selected_group_srl) |
|
129 | 129 | { |
130 | 130 | $query_id = 'member.getMemberListWithinGroup'; |
131 | 131 | $args->sort_index = "member.".$sort_index; |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | function getSiteAdminMemberSrls() |
175 | 175 | { |
176 | 176 | $output = executeQueryArray('member.getSiteAdminMemberSrls'); |
177 | - if(!$output->toBool() || !$output->data) return array(); |
|
177 | + if (!$output->toBool() || !$output->data) return array(); |
|
178 | 178 | |
179 | 179 | $member_srls = array(); |
180 | - foreach($output->data as $member_info) |
|
180 | + foreach ($output->data as $member_info) |
|
181 | 181 | { |
182 | 182 | $member_srls[] = $member_info->member_srl; |
183 | 183 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | function getMemberAdminColorset() |
194 | 194 | { |
195 | 195 | $skin = Context::get('skin'); |
196 | - if(!$skin) $tpl = ""; |
|
196 | + if (!$skin) $tpl = ""; |
|
197 | 197 | else |
198 | 198 | { |
199 | 199 | $oModuleModel = getModel('module'); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | $oModuleModel = getModel('module'); |
204 | 204 | $config = $oModuleModel->getModuleConfig('member'); |
205 | - if(!$config->colorset) $config->colorset = "white"; |
|
205 | + if (!$config->colorset) $config->colorset = "white"; |
|
206 | 206 | Context::set('config', $config); |
207 | 207 | |
208 | 208 | $oTemplate = &TemplateHandler::getInstance(); |
@@ -223,10 +223,10 @@ discard block |
||
223 | 223 | public function getMemberCountByDate($date = '') |
224 | 224 | { |
225 | 225 | $args = new stdClass(); |
226 | - if($date) $args->regDate = date('Ymd', strtotime($date)); |
|
226 | + if ($date) $args->regDate = date('Ymd', strtotime($date)); |
|
227 | 227 | |
228 | 228 | $output = executeQuery('member.getMemberCountByDate', $args); |
229 | - if(!$output->toBool()) return 0; |
|
229 | + if (!$output->toBool()) return 0; |
|
230 | 230 | |
231 | 231 | return $output->data->count; |
232 | 232 | } |
@@ -240,10 +240,10 @@ discard block |
||
240 | 240 | */ |
241 | 241 | function getMemberGroupMemberCountByDate($date = '') |
242 | 242 | { |
243 | - if($date) $args->regDate = date('Ymd', strtotime($date)); |
|
243 | + if ($date) $args->regDate = date('Ymd', strtotime($date)); |
|
244 | 244 | |
245 | 245 | $output = executeQuery('member.getMemberGroupMemberCountByDate', $args); |
246 | - if(!$output->toBool()) return 0; |
|
246 | + if (!$output->toBool()) return 0; |
|
247 | 247 | |
248 | 248 | return count($output->data); |
249 | 249 | } |
@@ -261,11 +261,11 @@ discard block |
||
261 | 261 | $args->member_join_form_srl = $member_join_form_srl; |
262 | 262 | $output = executeQuery('member.getJoinForm', $args); |
263 | 263 | |
264 | - if($output->toBool() && $output->data) |
|
264 | + if ($output->toBool() && $output->data) |
|
265 | 265 | { |
266 | 266 | $formInfo = $output->data; |
267 | 267 | $default_value = $formInfo->default_value; |
268 | - if($default_value) |
|
268 | + if ($default_value) |
|
269 | 269 | { |
270 | 270 | $default_value = unserialize($default_value); |
271 | 271 | Context::set('default_value', $default_value); |
@@ -275,18 +275,18 @@ discard block |
||
275 | 275 | |
276 | 276 | $oMemberModel = getModel('member'); |
277 | 277 | $config = $oMemberModel->getMemberConfig(); |
278 | - foreach($config->signupForm as $item) |
|
278 | + foreach ($config->signupForm as $item) |
|
279 | 279 | { |
280 | 280 | $list[] = $item->name; |
281 | 281 | } |
282 | 282 | |
283 | - $id_list = implode(',',$list); |
|
284 | - Context::set('id_list',$id_list); |
|
283 | + $id_list = implode(',', $list); |
|
284 | + Context::set('id_list', $id_list); |
|
285 | 285 | |
286 | 286 | $oTemplate = &TemplateHandler::getInstance(); |
287 | 287 | $tpl = $oTemplate->compile($this->module_path.'tpl', 'insert_join_form'); |
288 | 288 | |
289 | - $this->add('tpl', str_replace("\n"," ",$tpl)); |
|
289 | + $this->add('tpl', str_replace("\n", " ", $tpl)); |
|
290 | 290 | } |
291 | 291 | |
292 | 292 | /** |
@@ -298,9 +298,9 @@ discard block |
||
298 | 298 | { |
299 | 299 | $db_info = Context::getDBInfo(); |
300 | 300 | $admin_ip_list = $db_info->admin_ip_list; |
301 | - if(!$admin_ip_list) return true; |
|
302 | - if(!is_array($admin_ip_list)) $admin_ip_list = explode(',',$admin_ip_list); |
|
303 | - if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true; |
|
301 | + if (!$admin_ip_list) return true; |
|
302 | + if (!is_array($admin_ip_list)) $admin_ip_list = explode(',', $admin_ip_list); |
|
303 | + if (!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true; |
|
304 | 304 | else return false; |
305 | 305 | } |
306 | 306 | } |
@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | $mskin = 'default'; |
27 | 27 | $template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin); |
28 | - } |
|
29 | - else |
|
28 | + } else |
|
30 | 29 | { |
31 | 30 | $template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin); |
32 | 31 | } |
@@ -40,8 +39,7 @@ discard block |
||
40 | 39 | if(!$this->memberInfo) |
41 | 40 | { |
42 | 41 | Context::set('member_srl',''); |
43 | - } |
|
44 | - else |
|
42 | + } else |
|
45 | 43 | { |
46 | 44 | Context::set('member_info',$this->memberInfo); |
47 | 45 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | $mskin = $this->member_config->mskin; |
23 | 23 | // Set the template path |
24 | - if(!$mskin) |
|
24 | + if (!$mskin) |
|
25 | 25 | { |
26 | 26 | $mskin = 'default'; |
27 | 27 | $template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin); |
@@ -33,17 +33,17 @@ discard block |
||
33 | 33 | |
34 | 34 | // if member_srl exists, set memberInfo |
35 | 35 | $member_srl = Context::get('member_srl'); |
36 | - if($member_srl) |
|
36 | + if ($member_srl) |
|
37 | 37 | { |
38 | 38 | $oMemberModel = getModel('member'); |
39 | 39 | $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl); |
40 | - if(!$this->memberInfo) |
|
40 | + if (!$this->memberInfo) |
|
41 | 41 | { |
42 | - Context::set('member_srl',''); |
|
42 | + Context::set('member_srl', ''); |
|
43 | 43 | } |
44 | 44 | else |
45 | 45 | { |
46 | - Context::set('member_info',$this->memberInfo); |
|
46 | + Context::set('member_info', $this->memberInfo); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | $oLayoutModel = getModel('layout'); |
53 | 53 | $layout_info = $oLayoutModel->getLayout($this->member_config->mlayout_srl); |
54 | - if($layout_info) |
|
54 | + if ($layout_info) |
|
55 | 55 | { |
56 | 56 | $this->module_info->mlayout_srl = $this->member_config->mlayout_srl; |
57 | 57 | $this->setLayoutPath($layout_info->path); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | { |
63 | 63 | parent::dispMemberModifyInfo(); |
64 | 64 | |
65 | - if($this->member_info) |
|
65 | + if ($this->member_info) |
|
66 | 66 | { |
67 | 67 | Context::set('oMemberInfo', get_object_vars($this->member_info)); |
68 | 68 | } |
@@ -41,7 +41,9 @@ discard block |
||
41 | 41 | // document.getDocumentList query execution |
42 | 42 | $output = executeQuery('menu.getMenuList', $args); |
43 | 43 | // Return if no result or an error occurs |
44 | - if(!$output->toBool()||!count($output->data)) return $output; |
|
44 | + if(!$output->toBool()||!count($output->data)) { |
|
45 | + return $output; |
|
46 | + } |
|
45 | 47 | |
46 | 48 | return $output; |
47 | 49 | } |
@@ -63,7 +65,9 @@ discard block |
||
63 | 65 | $args->site_srl = $site_srl ; |
64 | 66 | $args->menu_srl = $menu_srl; |
65 | 67 | $output = executeQueryArray('menu.getMenus', $args); |
66 | - if(!$output->data) return; |
|
68 | + if(!$output->data) { |
|
69 | + return; |
|
70 | + } |
|
67 | 71 | $menus = $output->data; |
68 | 72 | return $menus; |
69 | 73 | } |
@@ -80,7 +84,9 @@ discard block |
||
80 | 84 | $args = new stdClass(); |
81 | 85 | $args->menu_srl = $menu_srl; |
82 | 86 | $output = executeQuery('menu.getMenu', $args); |
83 | - if(!$output->data) return; |
|
87 | + if(!$output->data) { |
|
88 | + return; |
|
89 | + } |
|
84 | 90 | |
85 | 91 | $menu_info = $output->data; |
86 | 92 | $menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php',$menu_srl); |
@@ -105,10 +111,15 @@ discard block |
||
105 | 111 | $args->title = $title; |
106 | 112 | $args->site_srl = $site_srl; |
107 | 113 | $output = executeQuery('menu.getMenuByTitle', $args); |
108 | - if(!$output->data) return; |
|
114 | + if(!$output->data) { |
|
115 | + return; |
|
116 | + } |
|
109 | 117 | |
110 | - if(is_array($output->data)) $menu_info = $output->data[0]; |
|
111 | - else $menu_info = $output->data; |
|
118 | + if(is_array($output->data)) { |
|
119 | + $menu_info = $output->data[0]; |
|
120 | + } else { |
|
121 | + $menu_info = $output->data; |
|
122 | + } |
|
112 | 123 | |
113 | 124 | if($menu_info->menu_srl) |
114 | 125 | { |
@@ -152,15 +163,20 @@ discard block |
||
152 | 163 | $output = executeQuery('menu.getMenuItem', $args); |
153 | 164 | $node = $output->data; |
154 | 165 | settype($node,'object'); |
155 | - if($node->group_srls) $node->group_srls = explode(',',$node->group_srls); |
|
156 | - else $node->group_srls = array(); |
|
166 | + if($node->group_srls) { |
|
167 | + $node->group_srls = explode(',',$node->group_srls); |
|
168 | + } else { |
|
169 | + $node->group_srls = array(); |
|
170 | + } |
|
157 | 171 | |
158 | 172 | $tmp_name = unserialize($node->name); |
159 | 173 | if($tmp_name && count($tmp_name)) |
160 | 174 | { |
161 | 175 | $selected_lang = array(); |
162 | 176 | $rand_name = $tmp_name[Context::getLangType()]; |
163 | - if(!$rand_name) $rand_name = array_shift($tmp_name); |
|
177 | + if(!$rand_name) { |
|
178 | + $rand_name = array_shift($tmp_name); |
|
179 | + } |
|
164 | 180 | $node->name = $rand_name; |
165 | 181 | } |
166 | 182 | return $node; |
@@ -178,13 +194,13 @@ discard block |
||
178 | 194 | if(!$menuItem->url) |
179 | 195 | { |
180 | 196 | $menuItem->moduleType = null; |
181 | - } |
|
182 | - else if(strncasecmp('http', $menuItem->url, 4) !== 0) |
|
197 | + } else if(strncasecmp('http', $menuItem->url, 4) !== 0) |
|
183 | 198 | { |
184 | 199 | $oModuleModel = getModel('module'); |
185 | 200 | $moduleInfo = $oModuleModel->getModuleInfoByMid($menuItem->url, 0); |
186 | - if(!$moduleInfo) $menuItem->moduleType = 'url'; |
|
187 | - else |
|
201 | + if(!$moduleInfo) { |
|
202 | + $menuItem->moduleType = 'url'; |
|
203 | + } else |
|
188 | 204 | { |
189 | 205 | if($moduleInfo->mid == $menuItem->url) |
190 | 206 | { |
@@ -193,8 +209,9 @@ discard block |
||
193 | 209 | $menuItem->layoutSrl = $moduleInfo->layout_srl; |
194 | 210 | } |
195 | 211 | } |
212 | + } else { |
|
213 | + $menuItem->moduleType = 'url'; |
|
196 | 214 | } |
197 | - else $menuItem->moduleType = 'url'; |
|
198 | 215 | |
199 | 216 | // grant setting |
200 | 217 | if(is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0) |
@@ -202,12 +219,10 @@ discard block |
||
202 | 219 | if($menuItem->group_srls[0] == -1) |
203 | 220 | { |
204 | 221 | $menuItem->grant = 'member'; |
205 | - } |
|
206 | - else if($menuItem->group_srls[0] == -3) |
|
222 | + } else if($menuItem->group_srls[0] == -3) |
|
207 | 223 | { |
208 | 224 | $menuItem->grant = 'manager'; |
209 | - } |
|
210 | - else |
|
225 | + } else |
|
211 | 226 | { |
212 | 227 | $menuItem->grant = 'group'; |
213 | 228 | } |
@@ -228,11 +243,15 @@ discard block |
||
228 | 243 | { |
229 | 244 | $tmp = $oModuleAdminModel->getLangCode(0, $value->title); |
230 | 245 | $groupList[$value->group_srl]->title = $tmp[Context::getLangType()]; |
246 | + } else { |
|
247 | + $groupList[$value->group_srl]->title = $value->title; |
|
231 | 248 | } |
232 | - else $groupList[$value->group_srl]->title = $value->title; |
|
233 | 249 | |
234 | - if(in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked = true; |
|
235 | - else $groupList[$value->group_srl]->isChecked = false; |
|
250 | + if(in_array($key, $menuItem->group_srls)) { |
|
251 | + $groupList[$value->group_srl]->isChecked = true; |
|
252 | + } else { |
|
253 | + $groupList[$value->group_srl]->isChecked = false; |
|
254 | + } |
|
236 | 255 | } |
237 | 256 | } |
238 | 257 | $menuItem->groupList = $groupList; |
@@ -305,11 +324,12 @@ discard block |
||
305 | 324 | $item_info->parent_srl = $parent_srl; |
306 | 325 | $item_info->parent_menu_name = $parent_info->name; |
307 | 326 | // In case of modifying the existing menu or addting a new menu to the root |
308 | - } |
|
309 | - else |
|
327 | + } else |
|
310 | 328 | { |
311 | 329 | // Get information of the menu if menu_item_srl exists |
312 | - if($menu_item_srl) $item_info = $this->getMenuItemInfo($menu_item_srl); |
|
330 | + if($menu_item_srl) { |
|
331 | + $item_info = $this->getMenuItemInfo($menu_item_srl); |
|
332 | + } |
|
313 | 333 | // Get only menu_item_srl if no values found, considering it as adding a new menu |
314 | 334 | if(!$item_info->menu_item_srl) |
315 | 335 | { |
@@ -349,7 +369,9 @@ discard block |
||
349 | 369 | foreach($_allModules as $module_name) |
350 | 370 | { |
351 | 371 | $module = $oModuleModel->getModuleInfoXml($module_name); |
352 | - if(!isset($module)) continue; |
|
372 | + if(!isset($module)) { |
|
373 | + continue; |
|
374 | + } |
|
353 | 375 | $defaultSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'P'); |
354 | 376 | $defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M'); |
355 | 377 | $skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin); |
@@ -379,8 +401,7 @@ discard block |
||
379 | 401 | $oModuleInfo->title = $pageTypeName['OUTSIDE']; |
380 | 402 | $oModuleInfo->no_skin = 'Y'; |
381 | 403 | $allModules['OUTSIDE'] = $oModuleInfo; |
382 | - } |
|
383 | - else |
|
404 | + } else |
|
384 | 405 | { |
385 | 406 | $allModules[$module_name] = $module; |
386 | 407 | } |
@@ -414,7 +435,9 @@ discard block |
||
414 | 435 | |
415 | 436 | // after trigger |
416 | 437 | $output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList); |
417 | - if(!$output->toBool()) return $output; |
|
438 | + if(!$output->toBool()) { |
|
439 | + return $output; |
|
440 | + } |
|
418 | 441 | |
419 | 442 | $localModuleList = array_unique($moduleList); |
420 | 443 | |
@@ -425,7 +448,9 @@ discard block |
||
425 | 448 | $remoteModuleList = array(); |
426 | 449 | foreach($remotePackageList as $package) |
427 | 450 | { |
428 | - if(strpos($package->path, './modules/') !== 0) continue; |
|
451 | + if(strpos($package->path, './modules/') !== 0) { |
|
452 | + continue; |
|
453 | + } |
|
429 | 454 | |
430 | 455 | $pathInfo = explode('/', $package->path); |
431 | 456 | $remoteModuleList[] = $pathInfo[2]; |
@@ -464,8 +489,7 @@ discard block |
||
464 | 489 | $oModuleInfo->title = $pageTypeName['OUTSIDE']; |
465 | 490 | $oModuleInfo->no_skin = 'Y'; |
466 | 491 | $moduleInfoList['OUTSIDE'] = $oModuleInfo; |
467 | - } |
|
468 | - else |
|
492 | + } else |
|
469 | 493 | { |
470 | 494 | $moduleInfoList[$value] = $moduleInfo; |
471 | 495 | } |
@@ -497,8 +521,11 @@ discard block |
||
497 | 521 | $isMenuFixed = false; |
498 | 522 | $output = $this->getMenu($menuSrl); |
499 | 523 | $php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$output->menu_srl); |
500 | - if(file_exists($php_file)) include($php_file); |
|
501 | - else $oMenuAdminController->makeXmlFile($menuSrl); |
|
524 | + if(file_exists($php_file)) { |
|
525 | + include($php_file); |
|
526 | + } else { |
|
527 | + $oMenuAdminController->makeXmlFile($menuSrl); |
|
528 | + } |
|
502 | 529 | |
503 | 530 | if(count($menu->list)>0) |
504 | 531 | { |
@@ -518,8 +545,7 @@ discard block |
||
518 | 545 | $menuItems->title = $output->title; |
519 | 546 | $menuItems->menuItems = $menu; |
520 | 547 | $menuList[] = $menuItems; |
521 | - } |
|
522 | - else |
|
548 | + } else |
|
523 | 549 | { |
524 | 550 | $menuListFromDB = $this->getMenus($siteSrl); |
525 | 551 | if(is_array($menuListFromDB)) |
@@ -527,8 +553,9 @@ discard block |
||
527 | 553 | $oAdmin = getClass('admin'); |
528 | 554 | foreach($menuListFromDB AS $key=>$value) |
529 | 555 | { |
530 | - if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]); |
|
531 | - else |
|
556 | + if($value->title == $oAdmin->getAdminMenuName()) { |
|
557 | + unset($output[$key]); |
|
558 | + } else |
|
532 | 559 | { |
533 | 560 | unset($menu); |
534 | 561 | unset($menuItems); |
@@ -564,8 +591,7 @@ discard block |
||
564 | 591 | if($value->menu_srl == $this->menuSrlWithinHome) |
565 | 592 | { |
566 | 593 | $menuList[-1] = $menuItems; |
567 | - } |
|
568 | - else |
|
594 | + } else |
|
569 | 595 | { |
570 | 596 | $menuList[] = $menuItems; |
571 | 597 | } |
@@ -639,8 +665,11 @@ discard block |
||
639 | 665 | $args = new stdClass; |
640 | 666 | $args->menu_item_srl = $menu['node_srl']; |
641 | 667 | $args->is_shortcut = 'Y'; |
642 | - if($menu['menu_name_key']) $args->name = $menu['menu_name_key']; |
|
643 | - else $args->name = $menu['menu_name']; |
|
668 | + if($menu['menu_name_key']) { |
|
669 | + $args->name = $menu['menu_name_key']; |
|
670 | + } else { |
|
671 | + $args->name = $menu['menu_name']; |
|
672 | + } |
|
644 | 673 | $output = executeQuery('menu.updateMenuItem', $args); |
645 | 674 | |
646 | 675 | $isMenuFixed = true; |
@@ -661,8 +690,7 @@ discard block |
||
661 | 690 | if($midInfo->page_type) |
662 | 691 | { |
663 | 692 | $menu['module_type'] = $midInfo->page_type; |
664 | - } |
|
665 | - else |
|
693 | + } else |
|
666 | 694 | { |
667 | 695 | $menu['module_type'] = $midInfo->module; |
668 | 696 | } |
@@ -671,8 +699,7 @@ discard block |
||
671 | 699 | if($moduleInfo->setup_index_act) |
672 | 700 | { |
673 | 701 | $menu['setup_index_act'] = $moduleInfo->setup_index_act; |
674 | - } |
|
675 | - else if($moduleInfo->default_index_act) |
|
702 | + } else if($moduleInfo->default_index_act) |
|
676 | 703 | { |
677 | 704 | $menu['setup_index_act'] = $moduleInfo->default_index_act; |
678 | 705 | } |
@@ -579,7 +579,7 @@ |
||
579 | 579 | |
580 | 580 | /** |
581 | 581 | * Get module's detail setup contents |
582 | - * @return void |
|
582 | + * @return BaseObject|null |
|
583 | 583 | */ |
584 | 584 | public function getMenuAdminDetailSetup() |
585 | 585 | { |
@@ -27,21 +27,21 @@ discard block |
||
27 | 27 | */ |
28 | 28 | function getMenuList($obj) |
29 | 29 | { |
30 | - if(!$obj->site_srl) |
|
30 | + if (!$obj->site_srl) |
|
31 | 31 | { |
32 | 32 | $site_module_info = Context::get('site_module_info'); |
33 | - $obj->site_srl = (int)$site_module_info->site_srl; |
|
33 | + $obj->site_srl = (int) $site_module_info->site_srl; |
|
34 | 34 | } |
35 | 35 | $args = new stdClass; |
36 | 36 | $args->site_srl = $obj->site_srl; |
37 | 37 | $args->sort_index = $obj->sort_index; |
38 | - $args->page = $obj->page?$obj->page:1; |
|
39 | - $args->list_count = $obj->list_count?$obj->list_count:20; |
|
40 | - $args->page_count = $obj->page_count?$obj->page_count:10; |
|
38 | + $args->page = $obj->page ? $obj->page : 1; |
|
39 | + $args->list_count = $obj->list_count ? $obj->list_count : 20; |
|
40 | + $args->page_count = $obj->page_count ? $obj->page_count : 10; |
|
41 | 41 | // document.getDocumentList query execution |
42 | 42 | $output = executeQuery('menu.getMenuList', $args); |
43 | 43 | // Return if no result or an error occurs |
44 | - if(!$output->toBool()||!count($output->data)) return $output; |
|
44 | + if (!$output->toBool() || !count($output->data)) return $output; |
|
45 | 45 | |
46 | 46 | return $output; |
47 | 47 | } |
@@ -53,17 +53,17 @@ discard block |
||
53 | 53 | */ |
54 | 54 | function getMenus($site_srl = null) |
55 | 55 | { |
56 | - if(!isset($site_srl)) |
|
56 | + if (!isset($site_srl)) |
|
57 | 57 | { |
58 | 58 | $site_module_info = Context::get('site_module_info'); |
59 | - $site_srl = (int)$site_module_info->site_srl; |
|
59 | + $site_srl = (int) $site_module_info->site_srl; |
|
60 | 60 | } |
61 | 61 | // Get information from the DB |
62 | 62 | $args = new stdClass(); |
63 | - $args->site_srl = $site_srl ; |
|
63 | + $args->site_srl = $site_srl; |
|
64 | 64 | $args->menu_srl = $menu_srl; |
65 | 65 | $output = executeQueryArray('menu.getMenus', $args); |
66 | - if(!$output->data) return; |
|
66 | + if (!$output->data) return; |
|
67 | 67 | $menus = $output->data; |
68 | 68 | return $menus; |
69 | 69 | } |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | $args = new stdClass(); |
81 | 81 | $args->menu_srl = $menu_srl; |
82 | 82 | $output = executeQuery('menu.getMenu', $args); |
83 | - if(!$output->data) return; |
|
83 | + if (!$output->data) return; |
|
84 | 84 | |
85 | 85 | $menu_info = $output->data; |
86 | - $menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php',$menu_srl); |
|
87 | - $menu_info->php_file = sprintf('./files/cache/menu/%s.php',$menu_srl); |
|
86 | + $menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php', $menu_srl); |
|
87 | + $menu_info->php_file = sprintf('./files/cache/menu/%s.php', $menu_srl); |
|
88 | 88 | return $menu_info; |
89 | 89 | } |
90 | 90 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | function getMenuByTitle($title, $site_srl = 0) |
98 | 98 | { |
99 | 99 | // Get information from the DB |
100 | - if(!is_array($title)) |
|
100 | + if (!is_array($title)) |
|
101 | 101 | { |
102 | 102 | $title = array($title); |
103 | 103 | } |
@@ -105,15 +105,15 @@ discard block |
||
105 | 105 | $args->title = $title; |
106 | 106 | $args->site_srl = $site_srl; |
107 | 107 | $output = executeQuery('menu.getMenuByTitle', $args); |
108 | - if(!$output->data) return; |
|
108 | + if (!$output->data) return; |
|
109 | 109 | |
110 | - if(is_array($output->data)) $menu_info = $output->data[0]; |
|
110 | + if (is_array($output->data)) $menu_info = $output->data[0]; |
|
111 | 111 | else $menu_info = $output->data; |
112 | 112 | |
113 | - if($menu_info->menu_srl) |
|
113 | + if ($menu_info->menu_srl) |
|
114 | 114 | { |
115 | - $menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php',$menu_info->menu_srl); |
|
116 | - $menu_info->php_file = sprintf('./files/cache/menu/%s.php',$menu_info->menu_srl); |
|
115 | + $menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php', $menu_info->menu_srl); |
|
116 | + $menu_info->php_file = sprintf('./files/cache/menu/%s.php', $menu_info->menu_srl); |
|
117 | 117 | } |
118 | 118 | return $menu_info; |
119 | 119 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $args = new stdClass(); |
131 | 131 | $args->title = $title; |
132 | 132 | $output = executeQueryArray('menu.getMenuByTitle', $args); |
133 | - if(!$output->data) |
|
133 | + if (!$output->data) |
|
134 | 134 | { |
135 | 135 | return array(); |
136 | 136 | } |
@@ -151,16 +151,16 @@ discard block |
||
151 | 151 | $args->menu_item_srl = $menu_item_srl; |
152 | 152 | $output = executeQuery('menu.getMenuItem', $args); |
153 | 153 | $node = $output->data; |
154 | - settype($node,'object'); |
|
155 | - if($node->group_srls) $node->group_srls = explode(',',$node->group_srls); |
|
154 | + settype($node, 'object'); |
|
155 | + if ($node->group_srls) $node->group_srls = explode(',', $node->group_srls); |
|
156 | 156 | else $node->group_srls = array(); |
157 | 157 | |
158 | 158 | $tmp_name = unserialize($node->name); |
159 | - if($tmp_name && count($tmp_name)) |
|
159 | + if ($tmp_name && count($tmp_name)) |
|
160 | 160 | { |
161 | 161 | $selected_lang = array(); |
162 | 162 | $rand_name = $tmp_name[Context::getLangType()]; |
163 | - if(!$rand_name) $rand_name = array_shift($tmp_name); |
|
163 | + if (!$rand_name) $rand_name = array_shift($tmp_name); |
|
164 | 164 | $node->name = $rand_name; |
165 | 165 | } |
166 | 166 | return $node; |
@@ -175,18 +175,18 @@ discard block |
||
175 | 175 | $menuItemSrl = Context::get('menu_item_srl'); |
176 | 176 | $menuItem = $this->getMenuItemInfo($menuItemSrl); |
177 | 177 | |
178 | - if(!$menuItem->url) |
|
178 | + if (!$menuItem->url) |
|
179 | 179 | { |
180 | 180 | $menuItem->moduleType = null; |
181 | 181 | } |
182 | - else if(strncasecmp('http', $menuItem->url, 4) !== 0) |
|
182 | + else if (strncasecmp('http', $menuItem->url, 4) !== 0) |
|
183 | 183 | { |
184 | 184 | $oModuleModel = getModel('module'); |
185 | 185 | $moduleInfo = $oModuleModel->getModuleInfoByMid($menuItem->url, 0); |
186 | - if(!$moduleInfo) $menuItem->moduleType = 'url'; |
|
186 | + if (!$moduleInfo) $menuItem->moduleType = 'url'; |
|
187 | 187 | else |
188 | 188 | { |
189 | - if($moduleInfo->mid == $menuItem->url) |
|
189 | + if ($moduleInfo->mid == $menuItem->url) |
|
190 | 190 | { |
191 | 191 | $menuItem->moduleType = $moduleInfo->module; |
192 | 192 | $menuItem->pageType = $moduleInfo->page_type; |
@@ -197,13 +197,13 @@ discard block |
||
197 | 197 | else $menuItem->moduleType = 'url'; |
198 | 198 | |
199 | 199 | // grant setting |
200 | - if(is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0) |
|
200 | + if (is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0) |
|
201 | 201 | { |
202 | - if($menuItem->group_srls[0] == -1) |
|
202 | + if ($menuItem->group_srls[0] == -1) |
|
203 | 203 | { |
204 | 204 | $menuItem->grant = 'member'; |
205 | 205 | } |
206 | - else if($menuItem->group_srls[0] == -3) |
|
206 | + else if ($menuItem->group_srls[0] == -3) |
|
207 | 207 | { |
208 | 208 | $menuItem->grant = 'manager'; |
209 | 209 | } |
@@ -217,21 +217,21 @@ discard block |
||
217 | 217 | $oMemberModel = getModel('member'); |
218 | 218 | $oModuleAdminModel = getAdminModel('module'); |
219 | 219 | $output = $oMemberModel->getGroups(); |
220 | - if(is_array($output)) |
|
220 | + if (is_array($output)) |
|
221 | 221 | { |
222 | 222 | $groupList = array(); |
223 | - foreach($output AS $key=>$value) |
|
223 | + foreach ($output AS $key=>$value) |
|
224 | 224 | { |
225 | 225 | $groupList[$value->group_srl] = new stdClass(); |
226 | 226 | $groupList[$value->group_srl]->group_srl = $value->group_srl; |
227 | - if(substr($value->title,0,12)=='$user_lang->') |
|
227 | + if (substr($value->title, 0, 12) == '$user_lang->') |
|
228 | 228 | { |
229 | 229 | $tmp = $oModuleAdminModel->getLangCode(0, $value->title); |
230 | 230 | $groupList[$value->group_srl]->title = $tmp[Context::getLangType()]; |
231 | 231 | } |
232 | 232 | else $groupList[$value->group_srl]->title = $value->title; |
233 | 233 | |
234 | - if(in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked = true; |
|
234 | + if (in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked = true; |
|
235 | 235 | else $groupList[$value->group_srl]->isChecked = false; |
236 | 236 | } |
237 | 237 | } |
@@ -269,10 +269,10 @@ discard block |
||
269 | 269 | */ |
270 | 270 | function getMenuItemNames($source_name, $site_srl = null) |
271 | 271 | { |
272 | - if(!$site_srl) |
|
272 | + if (!$site_srl) |
|
273 | 273 | { |
274 | 274 | $site_module_info = Context::get('site_module_info'); |
275 | - $site_srl = (int)$site_module_info->site_srl; |
|
275 | + $site_srl = (int) $site_module_info->site_srl; |
|
276 | 276 | } |
277 | 277 | // Get language code |
278 | 278 | $oModuleAdminModel = getAdminModel('module'); |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | |
297 | 297 | // Add a sub-menu if there is parent_srl but not menu_item_srl |
298 | 298 | $item_info = new stdClass; |
299 | - if(!$menu_item_srl && $parent_srl) |
|
299 | + if (!$menu_item_srl && $parent_srl) |
|
300 | 300 | { |
301 | 301 | // Get information of the parent menu |
302 | 302 | $parent_info = $this->getMenuItemInfo($parent_srl); |
@@ -309,9 +309,9 @@ discard block |
||
309 | 309 | else |
310 | 310 | { |
311 | 311 | // Get information of the menu if menu_item_srl exists |
312 | - if($menu_item_srl) $item_info = $this->getMenuItemInfo($menu_item_srl); |
|
312 | + if ($menu_item_srl) $item_info = $this->getMenuItemInfo($menu_item_srl); |
|
313 | 313 | // Get only menu_item_srl if no values found, considering it as adding a new menu |
314 | - if(!$item_info->menu_item_srl) |
|
314 | + if (!$item_info->menu_item_srl) |
|
315 | 315 | { |
316 | 316 | $item_info->menu_item_srl = getNextSequence(); |
317 | 317 | } |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | $oTemplate = &TemplateHandler::getInstance(); |
328 | 328 | $tpl = $oTemplate->compile($this->module_path.'tpl', 'menu_item_info'); |
329 | 329 | |
330 | - $this->add('tpl', str_replace("\n"," ",$tpl)); |
|
330 | + $this->add('tpl', str_replace("\n", " ", $tpl)); |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | /** |
@@ -346,10 +346,10 @@ discard block |
||
346 | 346 | |
347 | 347 | Context::loadLang('modules/page/lang'); |
348 | 348 | |
349 | - foreach($_allModules as $module_name) |
|
349 | + foreach ($_allModules as $module_name) |
|
350 | 350 | { |
351 | 351 | $module = $oModuleModel->getModuleInfoXml($module_name); |
352 | - if(!isset($module)) continue; |
|
352 | + if (!isset($module)) continue; |
|
353 | 353 | $defaultSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'P'); |
354 | 354 | $defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M'); |
355 | 355 | $skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin); |
@@ -361,10 +361,10 @@ discard block |
||
361 | 361 | $module->defaultMobileSkin->skin = $defaultMobileSkin; |
362 | 362 | $module->defaultMobileSkin->title = $mobileSkinInfo->title ? $mobileSkinInfo->title : $defaultMobileSkin; |
363 | 363 | |
364 | - $module->package_srl = $oAutoinstallModel->getPackageSrlByPath('./modules/' . $module_name); |
|
365 | - $module->url = _XE_LOCATION_SITE_ . '?mid=download&package_srl=' . $module->package_srl; |
|
364 | + $module->package_srl = $oAutoinstallModel->getPackageSrlByPath('./modules/'.$module_name); |
|
365 | + $module->url = _XE_LOCATION_SITE_.'?mid=download&package_srl='.$module->package_srl; |
|
366 | 366 | |
367 | - if($module_name == 'page') |
|
367 | + if ($module_name == 'page') |
|
368 | 368 | { |
369 | 369 | $pageTypeName = Context::getLang('page_type_name'); |
370 | 370 | $module->title = $pageTypeName['ARTICLE']; |
@@ -401,11 +401,11 @@ discard block |
||
401 | 401 | $moduleList = array('page'); |
402 | 402 | |
403 | 403 | $output = $oModuleModel->getModuleListByInstance($site_srl); |
404 | - if(is_array($output->data)) |
|
404 | + if (is_array($output->data)) |
|
405 | 405 | { |
406 | - foreach($output->data as $value) |
|
406 | + foreach ($output->data as $value) |
|
407 | 407 | { |
408 | - if($value->instanceCount > 1) |
|
408 | + if ($value->instanceCount > 1) |
|
409 | 409 | { |
410 | 410 | $moduleList[] = $value->module; |
411 | 411 | } |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | |
415 | 415 | // after trigger |
416 | 416 | $output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList); |
417 | - if(!$output->toBool()) return $output; |
|
417 | + if (!$output->toBool()) return $output; |
|
418 | 418 | |
419 | 419 | $localModuleList = array_unique($moduleList); |
420 | 420 | |
@@ -423,9 +423,9 @@ discard block |
||
423 | 423 | // get have instance |
424 | 424 | $remotePackageList = $oAutoinstallModel->getHaveInstance(array('path')); |
425 | 425 | $remoteModuleList = array(); |
426 | - foreach($remotePackageList as $package) |
|
426 | + foreach ($remotePackageList as $package) |
|
427 | 427 | { |
428 | - if(strpos($package->path, './modules/') !== 0) continue; |
|
428 | + if (strpos($package->path, './modules/') !== 0) continue; |
|
429 | 429 | |
430 | 430 | $pathInfo = explode('/', $package->path); |
431 | 431 | $remoteModuleList[] = $pathInfo[2]; |
@@ -443,13 +443,13 @@ discard block |
||
443 | 443 | |
444 | 444 | $moduleInfoList = array(); |
445 | 445 | Context::loadLang('modules/page/lang'); |
446 | - if(is_array($moduleList)) |
|
446 | + if (is_array($moduleList)) |
|
447 | 447 | { |
448 | - foreach($moduleList as $value) |
|
448 | + foreach ($moduleList as $value) |
|
449 | 449 | { |
450 | 450 | $moduleInfo = $oModuleModel->getModuleInfoXml($value); |
451 | 451 | |
452 | - if($value == 'page') |
|
452 | + if ($value == 'page') |
|
453 | 453 | { |
454 | 454 | $pageTypeName = Context::getLang('page_type_name'); |
455 | 455 | $moduleInfo->title = $pageTypeName['ARTICLE']; |
@@ -480,10 +480,10 @@ discard block |
||
480 | 480 | $siteSrl = Context::get('site_srl'); |
481 | 481 | $menuSrl = Context::get('menu_srl'); |
482 | 482 | |
483 | - if(!isset($siteSrl)) |
|
483 | + if (!isset($siteSrl)) |
|
484 | 484 | { |
485 | 485 | $site_module_info = Context::get('site_module_info'); |
486 | - $siteSrl = (int)$site_module_info->site_srl; |
|
486 | + $siteSrl = (int) $site_module_info->site_srl; |
|
487 | 487 | } |
488 | 488 | |
489 | 489 | $oModuleModel = getModel('module'); |
@@ -492,24 +492,24 @@ discard block |
||
492 | 492 | $start_module = $oModuleModel->getSiteInfo(0, $columnList); |
493 | 493 | |
494 | 494 | $menuList = array(); |
495 | - if($menuSrl) |
|
495 | + if ($menuSrl) |
|
496 | 496 | { |
497 | 497 | $isMenuFixed = false; |
498 | 498 | $output = $this->getMenu($menuSrl); |
499 | - $php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$output->menu_srl); |
|
500 | - if(file_exists($php_file)) include($php_file); |
|
499 | + $php_file = sprintf(_XE_PATH_.'files/cache/menu/%s.php', $output->menu_srl); |
|
500 | + if (file_exists($php_file)) include($php_file); |
|
501 | 501 | else $oMenuAdminController->makeXmlFile($menuSrl); |
502 | 502 | |
503 | - if(count($menu->list)>0) |
|
503 | + if (count($menu->list) > 0) |
|
504 | 504 | { |
505 | - foreach($menu->list AS $key=>$value) |
|
505 | + foreach ($menu->list AS $key=>$value) |
|
506 | 506 | { |
507 | - $this->_menuInfoSetting($menu->list[$key], $start_module, $isMenuFixed, $menuSrl,$siteSrl); |
|
507 | + $this->_menuInfoSetting($menu->list[$key], $start_module, $isMenuFixed, $menuSrl, $siteSrl); |
|
508 | 508 | } |
509 | 509 | } |
510 | 510 | |
511 | 511 | // menu recreate |
512 | - if($isMenuFixed) |
|
512 | + if ($isMenuFixed) |
|
513 | 513 | { |
514 | 514 | $oMenuAdminController->makeXmlFile($menuSrl); |
515 | 515 | } |
@@ -522,18 +522,18 @@ discard block |
||
522 | 522 | else |
523 | 523 | { |
524 | 524 | $menuListFromDB = $this->getMenus($siteSrl); |
525 | - if(is_array($menuListFromDB)) |
|
525 | + if (is_array($menuListFromDB)) |
|
526 | 526 | { |
527 | 527 | $oAdmin = getClass('admin'); |
528 | - foreach($menuListFromDB AS $key=>$value) |
|
528 | + foreach ($menuListFromDB AS $key=>$value) |
|
529 | 529 | { |
530 | - if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]); |
|
530 | + if ($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]); |
|
531 | 531 | else |
532 | 532 | { |
533 | 533 | unset($menu); |
534 | 534 | unset($menuItems); |
535 | - $value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$value->menu_srl); |
|
536 | - if(!file_exists($value->php_file)) |
|
535 | + $value->php_file = sprintf(_XE_PATH_.'files/cache/menu/%s.php', $value->menu_srl); |
|
536 | + if (!file_exists($value->php_file)) |
|
537 | 537 | { |
538 | 538 | $oMenuAdminController->makeXmlFile($value->menu_srl); |
539 | 539 | } |
@@ -541,16 +541,16 @@ discard block |
||
541 | 541 | include($value->php_file); |
542 | 542 | |
543 | 543 | $isMenuFixed = false; |
544 | - if(count($menu->list) > 0) |
|
544 | + if (count($menu->list) > 0) |
|
545 | 545 | { |
546 | - foreach($menu->list AS $key2=>$value2) |
|
546 | + foreach ($menu->list AS $key2=>$value2) |
|
547 | 547 | { |
548 | - $this->_menuInfoSetting($menu->list[$key2], $start_module, $isMenuFixed, $value->menu_srl,$siteSrl); |
|
548 | + $this->_menuInfoSetting($menu->list[$key2], $start_module, $isMenuFixed, $value->menu_srl, $siteSrl); |
|
549 | 549 | } |
550 | 550 | } |
551 | 551 | |
552 | 552 | // menu recreate |
553 | - if($isMenuFixed) |
|
553 | + if ($isMenuFixed) |
|
554 | 554 | { |
555 | 555 | $oMenuAdminController->makeXmlFile($value->menu_srl); |
556 | 556 | } |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $menuItems->menuItems = $menu; |
562 | 562 | |
563 | 563 | // If include home menu, move first |
564 | - if($value->menu_srl == $this->menuSrlWithinHome) |
|
564 | + if ($value->menu_srl == $this->menuSrlWithinHome) |
|
565 | 565 | { |
566 | 566 | $menuList[-1] = $menuItems; |
567 | 567 | } |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | public function getMenuAdminDetailSetup() |
585 | 585 | { |
586 | 586 | $menuItemSrl = Context::get('menu_item_srl'); |
587 | - if(!$menuItemSrl) |
|
587 | + if (!$menuItemSrl) |
|
588 | 588 | { |
589 | 589 | return new BaseObject(-1, 'msg_invalid_request'); |
590 | 590 | } |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $menuItemInfo = $this->getMenuItemInfo($menuItemSrl); |
593 | 593 | |
594 | 594 | // if menu is shortcut |
595 | - if($menuItemInfo->is_shortcut == 'Y') |
|
595 | + if ($menuItemInfo->is_shortcut == 'Y') |
|
596 | 596 | { |
597 | 597 | return new BaseObject(-1, 'msg_invalid_request'); |
598 | 598 | } |
@@ -604,18 +604,18 @@ discard block |
||
604 | 604 | // get xml info |
605 | 605 | $moduleConfInfo = $oModuleModel->getModuleInfoXml($moduleInfo->module); |
606 | 606 | |
607 | - if($moduleConfInfo->setup_index_act) |
|
607 | + if ($moduleConfInfo->setup_index_act) |
|
608 | 608 | { |
609 | 609 | $setupUrl = getNotEncodedUrl('', 'module', 'admin', 'act', $moduleConfInfo->setup_index_act, 'module_srl', $moduleInfo->module_srl, 'isLayoutDrop', '1'); |
610 | 610 | } |
611 | 611 | |
612 | - if($moduleConfInfo->simple_setup_index_act) |
|
612 | + if ($moduleConfInfo->simple_setup_index_act) |
|
613 | 613 | { |
614 | 614 | $oTargetmoduleAdminModel = getAdminModel($moduleInfo->module); |
615 | 615 | $advancedSetupUrl = getUrl('', 'module', 'admin', 'act', $moduleConfInfo->setup_index_act, 'module_srl', $moduleInfo->module_srl); |
616 | 616 | $simpleSetupHtml = $oTargetmoduleAdminModel->{$moduleConfInfo->simple_setup_index_act}($moduleInfo->module_srl, $advancedSetupUrl); |
617 | 617 | |
618 | - if($simpleSetupHtml) |
|
618 | + if ($simpleSetupHtml) |
|
619 | 619 | { |
620 | 620 | $this->add('simpleSetupHtml', $simpleSetupHtml); |
621 | 621 | } |
@@ -628,18 +628,18 @@ discard block |
||
628 | 628 | * @param array $menu |
629 | 629 | * @return void |
630 | 630 | */ |
631 | - private function _menuInfoSetting(&$menu, &$start_module, &$isMenuFixed, $menuSrl,$siteSrl = 0) |
|
631 | + private function _menuInfoSetting(&$menu, &$start_module, &$isMenuFixed, $menuSrl, $siteSrl = 0) |
|
632 | 632 | { |
633 | 633 | $oModuleModel = getModel('module'); |
634 | 634 | // if url is empty and is_shortcut is 'N', change to is_shortcut 'Y' |
635 | - if(!$menu['url'] && $menu['is_shortcut'] == 'N') |
|
635 | + if (!$menu['url'] && $menu['is_shortcut'] == 'N') |
|
636 | 636 | { |
637 | 637 | $menu['is_shortcut'] = 'Y'; |
638 | 638 | |
639 | 639 | $args = new stdClass; |
640 | 640 | $args->menu_item_srl = $menu['node_srl']; |
641 | 641 | $args->is_shortcut = 'Y'; |
642 | - if($menu['menu_name_key']) $args->name = $menu['menu_name_key']; |
|
642 | + if ($menu['menu_name_key']) $args->name = $menu['menu_name_key']; |
|
643 | 643 | else $args->name = $menu['menu_name']; |
644 | 644 | $output = executeQuery('menu.updateMenuItem', $args); |
645 | 645 | |
@@ -648,17 +648,17 @@ discard block |
||
648 | 648 | |
649 | 649 | //if menu type is module menu |
650 | 650 | //if(!empty($menu['url']) && !preg_match('/^http/i', $menu['url'])) |
651 | - if($menu['is_shortcut'] != 'Y') |
|
651 | + if ($menu['is_shortcut'] != 'Y') |
|
652 | 652 | { |
653 | 653 | unset($midInfo, $moduleInfo); |
654 | 654 | $midInfo = $oModuleModel->getModuleInfoByMid($menu['url'], $siteSrl); |
655 | 655 | $moduleInfo = $oModuleModel->getModuleInfoXml($midInfo->module); |
656 | 656 | |
657 | - if($midInfo) |
|
657 | + if ($midInfo) |
|
658 | 658 | { |
659 | 659 | $menu['module_srl'] = $midInfo->module_srl; |
660 | 660 | $menu['module'] = $midInfo->module; |
661 | - if($midInfo->page_type) |
|
661 | + if ($midInfo->page_type) |
|
662 | 662 | { |
663 | 663 | $menu['module_type'] = $midInfo->page_type; |
664 | 664 | } |
@@ -668,16 +668,16 @@ discard block |
||
668 | 668 | } |
669 | 669 | } |
670 | 670 | |
671 | - if($moduleInfo->setup_index_act) |
|
671 | + if ($moduleInfo->setup_index_act) |
|
672 | 672 | { |
673 | 673 | $menu['setup_index_act'] = $moduleInfo->setup_index_act; |
674 | 674 | } |
675 | - else if($moduleInfo->default_index_act) |
|
675 | + else if ($moduleInfo->default_index_act) |
|
676 | 676 | { |
677 | 677 | $menu['setup_index_act'] = $moduleInfo->default_index_act; |
678 | 678 | } |
679 | 679 | |
680 | - if($menu['is_shortcut'] == 'N' && $midInfo->mid == $start_module->mid) |
|
680 | + if ($menu['is_shortcut'] == 'N' && $midInfo->mid == $start_module->mid) |
|
681 | 681 | { |
682 | 682 | $menu['is_start_module'] = true; |
683 | 683 | $this->menuSrlWithinHome = $menuSrl; |
@@ -686,9 +686,9 @@ discard block |
||
686 | 686 | $menu['layout_srl'] = $midInfo->layout_srl; |
687 | 687 | $menu['browser_title'] = $midInfo->browser_title; |
688 | 688 | } |
689 | - if(count($menu['list']) > 0) |
|
689 | + if (count($menu['list']) > 0) |
|
690 | 690 | { |
691 | - foreach($menu['list'] as $key=>$value) |
|
691 | + foreach ($menu['list'] as $key=>$value) |
|
692 | 692 | { |
693 | 693 | $this->_menuInfoSetting($menu['list'][$key], $start_module, $isMenuFixed, $menuSrl, $siteSrl); |
694 | 694 | } |
@@ -36,8 +36,11 @@ discard block |
||
36 | 36 | |
37 | 37 | if(!$site_srl) |
38 | 38 | { |
39 | - if($logged_info->is_admin == 'Y' && !$site_keyword) $site_srl = 0; |
|
40 | - else $site_srl = (int)$site_module_info->site_srl; |
|
39 | + if($logged_info->is_admin == 'Y' && !$site_keyword) { |
|
40 | + $site_srl = 0; |
|
41 | + } else { |
|
42 | + $site_srl = (int)$site_module_info->site_srl; |
|
43 | + } |
|
41 | 44 | } |
42 | 45 | |
43 | 46 | // process for unlinked modules |
@@ -51,7 +54,9 @@ discard block |
||
51 | 54 | |
52 | 55 | $oMenuAdminModel = getAdminModel('menu'); |
53 | 56 | $menuListFromDB = $oMenuAdminModel->getMenus(); |
54 | - if(is_array($menuListFromDB)) $output = array_reverse($menuListFromDB); |
|
57 | + if(is_array($menuListFromDB)) { |
|
58 | + $output = array_reverse($menuListFromDB); |
|
59 | + } |
|
55 | 60 | |
56 | 61 | $menuList = array(); |
57 | 62 | if(is_array($output)) |
@@ -59,13 +64,16 @@ discard block |
||
59 | 64 | $menuItems = array(); |
60 | 65 | foreach($output as $key=>$value) |
61 | 66 | { |
62 | - if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]); |
|
63 | - else |
|
67 | + if($value->title == $oAdmin->getAdminMenuName()) { |
|
68 | + unset($output[$key]); |
|
69 | + } else |
|
64 | 70 | { |
65 | 71 | unset($menu, $menuItems); |
66 | 72 | //$value->xml_file = sprintf('./files/cache/menu/%s.xml.php',$value->menu_srl); |
67 | 73 | $value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$value->menu_srl); |
68 | - if(file_exists($value->php_file)) include($value->php_file); |
|
74 | + if(file_exists($value->php_file)) { |
|
75 | + include($value->php_file); |
|
76 | + } |
|
69 | 77 | |
70 | 78 | if(count($menu->list)>0) |
71 | 79 | { |
@@ -102,8 +110,7 @@ discard block |
||
102 | 110 | { |
103 | 111 | include($theme_file); |
104 | 112 | Context::set('current_layout', $theme_info->layout); |
105 | - } |
|
106 | - else |
|
113 | + } else |
|
107 | 114 | { |
108 | 115 | $oModuleModel = getModel('module'); |
109 | 116 | $default_mid = $oModuleModel->getDefaultMid(); |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | $site_srl = Context::get('site_srl'); |
35 | 35 | $site_module_info = Context::get('site_module_info'); |
36 | 36 | |
37 | - if(!$site_srl) |
|
37 | + if (!$site_srl) |
|
38 | 38 | { |
39 | - if($logged_info->is_admin == 'Y' && !$site_keyword) $site_srl = 0; |
|
40 | - else $site_srl = (int)$site_module_info->site_srl; |
|
39 | + if ($logged_info->is_admin == 'Y' && !$site_keyword) $site_srl = 0; |
|
40 | + else $site_srl = (int) $site_module_info->site_srl; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // process for unlinked modules |
44 | - if($site_srl == 0) |
|
44 | + if ($site_srl == 0) |
|
45 | 45 | { |
46 | 46 | $oMenuController = getAdminController('menu'); |
47 | 47 | $oMenuController->linkAllModuleInstancesToSitemap(); |
@@ -51,25 +51,25 @@ discard block |
||
51 | 51 | |
52 | 52 | $oMenuAdminModel = getAdminModel('menu'); |
53 | 53 | $menuListFromDB = $oMenuAdminModel->getMenus(); |
54 | - if(is_array($menuListFromDB)) $output = array_reverse($menuListFromDB); |
|
54 | + if (is_array($menuListFromDB)) $output = array_reverse($menuListFromDB); |
|
55 | 55 | |
56 | 56 | $menuList = array(); |
57 | - if(is_array($output)) |
|
57 | + if (is_array($output)) |
|
58 | 58 | { |
59 | 59 | $menuItems = array(); |
60 | - foreach($output as $key=>$value) |
|
60 | + foreach ($output as $key=>$value) |
|
61 | 61 | { |
62 | - if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]); |
|
62 | + if ($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]); |
|
63 | 63 | else |
64 | 64 | { |
65 | 65 | unset($menu, $menuItems); |
66 | 66 | //$value->xml_file = sprintf('./files/cache/menu/%s.xml.php',$value->menu_srl); |
67 | - $value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$value->menu_srl); |
|
68 | - if(file_exists($value->php_file)) include($value->php_file); |
|
67 | + $value->php_file = sprintf(_XE_PATH_.'files/cache/menu/%s.php', $value->menu_srl); |
|
68 | + if (file_exists($value->php_file)) include($value->php_file); |
|
69 | 69 | |
70 | - if(count($menu->list)>0) |
|
70 | + if (count($menu->list) > 0) |
|
71 | 71 | { |
72 | - foreach($menu->list as $key2=>$value2) |
|
72 | + foreach ($menu->list as $key2=>$value2) |
|
73 | 73 | { |
74 | 74 | $this->_menuInfoSetting($menu->list[$key2]); |
75 | 75 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | // choice theme file |
100 | 100 | $theme_file = _XE_PATH_.'files/theme/theme_info.php'; |
101 | - if(is_readable($theme_file)) |
|
101 | + if (is_readable($theme_file)) |
|
102 | 102 | { |
103 | 103 | include($theme_file); |
104 | 104 | Context::set('current_layout', $theme_info->layout); |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | // get default group list |
114 | 114 | $oMemberModel = getModel('member'); |
115 | 115 | $output = $oMemberModel->getGroups(); |
116 | - if(is_array($output)) |
|
116 | + if (is_array($output)) |
|
117 | 117 | { |
118 | 118 | $groupList = array(); |
119 | - foreach($output as $value) |
|
119 | + foreach ($output as $value) |
|
120 | 120 | { |
121 | 121 | $groupList[$value->group_srl] = new stdClass(); |
122 | 122 | $groupList[$value->group_srl]->group_srl = $value->group_srl; |
@@ -145,13 +145,13 @@ discard block |
||
145 | 145 | function _menuInfoSetting(&$menu) |
146 | 146 | { |
147 | 147 | $oModuleModel = getModel('module'); |
148 | - if($menu['url'] && strncasecmp('http', $menu['url'], 4) !== 0) |
|
148 | + if ($menu['url'] && strncasecmp('http', $menu['url'], 4) !== 0) |
|
149 | 149 | { |
150 | 150 | unset($midInfo); |
151 | 151 | unset($moduleInfo); |
152 | 152 | $midInfo = $oModuleModel->getModuleInfoByMid($menu['url'], 0); |
153 | 153 | $moduleInfo = $oModuleModel->getModuleInfoXml($midInfo->module); |
154 | - if($moduleInfo->setup_index_act) |
|
154 | + if ($moduleInfo->setup_index_act) |
|
155 | 155 | { |
156 | 156 | $menu['module_srl'] = $midInfo->module_srl; |
157 | 157 | $menu['setup_index_act'] = $moduleInfo->setup_index_act; |
@@ -159,9 +159,9 @@ discard block |
||
159 | 159 | // setting layout srl for layout management |
160 | 160 | $menu['layout_srl'] = $midInfo->layout_srl; |
161 | 161 | } |
162 | - if(count($menu['list']) > 0) |
|
162 | + if (count($menu['list']) > 0) |
|
163 | 163 | { |
164 | - foreach($menu['list'] as $key=>$value) |
|
164 | + foreach ($menu['list'] as $key=>$value) |
|
165 | 165 | { |
166 | 166 | $this->_menuInfoSetting($menu['list'][$key]); |
167 | 167 | } |
@@ -175,17 +175,17 @@ discard block |
||
175 | 175 | */ |
176 | 176 | function _arrangeMenuItem($menuItems) |
177 | 177 | { |
178 | - if(is_array($menuItems)) |
|
178 | + if (is_array($menuItems)) |
|
179 | 179 | { |
180 | 180 | $arrangedMenuItemList = array(); |
181 | - foreach($menuItems as $value) |
|
181 | + foreach ($menuItems as $value) |
|
182 | 182 | { |
183 | - if($value->parent_srl == 0) |
|
183 | + if ($value->parent_srl == 0) |
|
184 | 184 | { |
185 | 185 | $arrangedMenuItemList[$value->menu_item_srl] = array('name'=>$value->name, 'subMenu'=>array()); |
186 | 186 | } |
187 | 187 | |
188 | - if($value->parent_srl > 0 && isset($arrangedMenuItemList[$value->parent_srl])) |
|
188 | + if ($value->parent_srl > 0 && isset($arrangedMenuItemList[$value->parent_srl])) |
|
189 | 189 | { |
190 | 190 | $arrangedMenuItemList[$value->parent_srl]['subMenu'][$value->menu_item_srl] = $value; |
191 | 191 | } |
@@ -23,8 +23,8 @@ |
||
23 | 23 | $args = Context::gets('skin', 'mskin', 'colorset', 'mcolorset'); |
24 | 24 | // Create a module Controller object |
25 | 25 | $oModuleController = getController('module'); |
26 | - $output = $oModuleController->insertModuleConfig('message',$args); |
|
27 | - if(!$output->toBool()) return $output; |
|
26 | + $output = $oModuleController->insertModuleConfig('message', $args); |
|
27 | + if (!$output->toBool()) return $output; |
|
28 | 28 | |
29 | 29 | $this->setMessage('success_updated'); |
30 | 30 |
@@ -24,7 +24,9 @@ |
||
24 | 24 | // Create a module Controller object |
25 | 25 | $oModuleController = getController('module'); |
26 | 26 | $output = $oModuleController->insertModuleConfig('message',$args); |
27 | - if(!$output->toBool()) return $output; |
|
27 | + if(!$output->toBool()) { |
|
28 | + return $output; |
|
29 | + } |
|
28 | 30 | |
29 | 31 | $this->setMessage('success_updated'); |
30 | 32 |
@@ -11,8 +11,7 @@ |
||
11 | 11 | if(!$skin) |
12 | 12 | { |
13 | 13 | $tpl = ''; |
14 | - } |
|
15 | - else |
|
14 | + } else |
|
16 | 15 | { |
17 | 16 | $oModuleModel = getModel('module'); /* @var $oModuleModel moduleModel */ |
18 | 17 | $skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin, $dir); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* Copyright (C) NAVER <http://www.navercorp.com> */ |
3 | -class messageAdminModel extends message{ |
|
3 | +class messageAdminModel extends message { |
|
4 | 4 | public function getMessageAdminColorset() |
5 | 5 | { |
6 | 6 | $skin = Context::get('skin'); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | Context::set('type', $type); |
9 | 9 | $dir = $type == 'P' ? 'skins' : 'm.skins'; |
10 | 10 | |
11 | - if(!$skin) |
|
11 | + if (!$skin) |
|
12 | 12 | { |
13 | 13 | $tpl = ''; |
14 | 14 | } |