@@ -2556,7 +2556,7 @@ discard block |
||
2556 | 2556 | * @param array &$menu_list |
2557 | 2557 | * |
2558 | 2558 | * @return object |
2559 | - **/ |
|
2559 | + **/ |
|
2560 | 2560 | function triggerGetDocumentMenu(&$menu_list) |
2561 | 2561 | { |
2562 | 2562 | if(!Context::get('is_logged')) return new Object(); |
@@ -2586,7 +2586,7 @@ discard block |
||
2586 | 2586 | * @param array &$menu_list |
2587 | 2587 | * |
2588 | 2588 | * @return object |
2589 | - **/ |
|
2589 | + **/ |
|
2590 | 2590 | function triggerGetCommentMenu(&$menu_list) |
2591 | 2591 | { |
2592 | 2592 | if(!Context::get('is_logged')) return new Object(); |
@@ -2614,7 +2614,7 @@ discard block |
||
2614 | 2614 | * Spammer manage. Denied user login. And delete or trash all documents. Response Ajax string |
2615 | 2615 | * |
2616 | 2616 | * @return object |
2617 | - **/ |
|
2617 | + **/ |
|
2618 | 2618 | function procMemberSpammerManage() |
2619 | 2619 | { |
2620 | 2620 | if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted'); |
@@ -2680,7 +2680,7 @@ discard block |
||
2680 | 2680 | * @param int $member_srl |
2681 | 2681 | * |
2682 | 2682 | * @return object |
2683 | - **/ |
|
2683 | + **/ |
|
2684 | 2684 | private function _spammerMember($member_srl) { |
2685 | 2685 | $logged_info = Context::get('logged_info'); |
2686 | 2686 | $spam_description = trim( Context::get('spam_description') ); |
@@ -2721,7 +2721,7 @@ discard block |
||
2721 | 2721 | * @param bool $isMoveToTrash |
2722 | 2722 | * |
2723 | 2723 | * @return object |
2724 | - **/ |
|
2724 | + **/ |
|
2725 | 2725 | private function _spammerDocuments($member_srl, $isMoveToTrash) { |
2726 | 2726 | $oDocumentController = getController('document'); |
2727 | 2727 | $oDocumentModel = getModel('document'); |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | /** |
224 | 224 | * Delete the post |
225 | 225 | * |
226 | - * @return void|Object (void : success, Object : fail) |
|
226 | + * @return Object|null (void : success, Object : fail) |
|
227 | 227 | */ |
228 | 228 | function procMemberDeleteSavedDocument() |
229 | 229 | { |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | /** |
255 | 255 | * Check values when member joining |
256 | 256 | * |
257 | - * @return void|Object (void : success, Object : fail) |
|
257 | + * @return null|Object (void : success, Object : fail) |
|
258 | 258 | */ |
259 | 259 | function procMemberCheckValue() |
260 | 260 | { |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | /** |
727 | 727 | * Add a profile image |
728 | 728 | * |
729 | - * @return void|Object (void : success, Object : fail) |
|
729 | + * @return ModuleObject|null (void : success, Object : fail) |
|
730 | 730 | */ |
731 | 731 | function procMemberInsertProfileImage() |
732 | 732 | { |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | /** |
806 | 806 | * Add an image name |
807 | 807 | * |
808 | - * @return void|Object (void : success, Object : fail) |
|
808 | + * @return ModuleObject|null (void : success, Object : fail) |
|
809 | 809 | */ |
810 | 810 | function procMemberInsertImageName() |
811 | 811 | { |
@@ -890,7 +890,7 @@ discard block |
||
890 | 890 | /** |
891 | 891 | * Delete Image name |
892 | 892 | * |
893 | - * @return void |
|
893 | + * @return Object |
|
894 | 894 | */ |
895 | 895 | function procMemberDeleteImageName($_memberSrl = 0) |
896 | 896 | { |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | /** |
915 | 915 | * Add an image to mark |
916 | 916 | * |
917 | - * @return void|Object (void : success, Object : fail) |
|
917 | + * @return ModuleObject|null (void : success, Object : fail) |
|
918 | 918 | */ |
919 | 919 | function procMemberInsertImageMark() |
920 | 920 | { |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | * Execute finding ID/Passoword |
1182 | 1182 | * When clicking the link in the verification email, a method is called to change the old password and to authenticate it |
1183 | 1183 | * |
1184 | - * @return void|Object (void : success, Object : fail) |
|
1184 | + * @return ModuleObject|null (void : success, Object : fail) |
|
1185 | 1185 | */ |
1186 | 1186 | function procMemberAuthAccount() |
1187 | 1187 | { |
@@ -1253,7 +1253,7 @@ discard block |
||
1253 | 1253 | /** |
1254 | 1254 | * Request to re-send the authentication mail |
1255 | 1255 | * |
1256 | - * @return void|Object (void : success, Object : fail) |
|
1256 | + * @return Object|null (void : success, Object : fail) |
|
1257 | 1257 | */ |
1258 | 1258 | function procMemberResendAuthMail() |
1259 | 1259 | { |
@@ -1412,6 +1412,9 @@ discard block |
||
1412 | 1412 | $this->setRedirectUrl($returnUrl); |
1413 | 1413 | } |
1414 | 1414 | |
1415 | + /** |
|
1416 | + * @param stdClass $auth_args |
|
1417 | + */ |
|
1415 | 1418 | function _sendAuthMail($auth_args, $member_info) |
1416 | 1419 | { |
1417 | 1420 | $oMemberModel = getModel('member'); |
@@ -1467,7 +1470,7 @@ discard block |
||
1467 | 1470 | /** |
1468 | 1471 | * Join a virtual site |
1469 | 1472 | * |
1470 | - * @return void|Object (void : success, Object : fail) |
|
1473 | + * @return Object|null (void : success, Object : fail) |
|
1471 | 1474 | */ |
1472 | 1475 | function procMemberSiteSignUp() |
1473 | 1476 | { |
@@ -1544,7 +1547,7 @@ discard block |
||
1544 | 1547 | * @param int $member_srl |
1545 | 1548 | * @param string $signature |
1546 | 1549 | * |
1547 | - * @return void |
|
1550 | + * @return boolean|null |
|
1548 | 1551 | */ |
1549 | 1552 | function putSignature($member_srl, $signature) |
1550 | 1553 | { |
@@ -1946,6 +1949,8 @@ discard block |
||
1946 | 1949 | /** |
1947 | 1950 | * Logged method for providing a personalized menu |
1948 | 1951 | * Login information is used in the output widget, or personalized page |
1952 | + * @param string $act |
|
1953 | + * @param string $str |
|
1949 | 1954 | */ |
1950 | 1955 | function addMemberMenu($act, $str) |
1951 | 1956 | { |
@@ -1976,6 +1981,7 @@ discard block |
||
1976 | 1981 | |
1977 | 1982 | /** |
1978 | 1983 | * Add users to the member table |
1984 | + * @param stdClass $args |
|
1979 | 1985 | */ |
1980 | 1986 | function insertMember(&$args, $password_is_hashed = false) |
1981 | 1987 | { |
@@ -2176,6 +2182,7 @@ discard block |
||
2176 | 2182 | * Modify member information |
2177 | 2183 | * |
2178 | 2184 | * @param bool $is_admin , modified 2013-11-22 |
2185 | + * @param stdClass $args |
|
2179 | 2186 | */ |
2180 | 2187 | function updateMember($args, $is_admin = FALSE) |
2181 | 2188 | { |
@@ -2380,6 +2387,7 @@ discard block |
||
2380 | 2387 | |
2381 | 2388 | /** |
2382 | 2389 | * Modify member password |
2390 | + * @param stdClass $args |
|
2383 | 2391 | */ |
2384 | 2392 | function updateMemberPassword($args) |
2385 | 2393 | { |
@@ -2414,6 +2422,9 @@ discard block |
||
2414 | 2422 | return $output; |
2415 | 2423 | } |
2416 | 2424 | |
2425 | + /** |
|
2426 | + * @param string $answer |
|
2427 | + */ |
|
2417 | 2428 | function updateFindAccountAnswer($member_srl, $answer) |
2418 | 2429 | { |
2419 | 2430 | $oPassword = new Password(); |
@@ -2673,7 +2684,7 @@ discard block |
||
2673 | 2684 | * |
2674 | 2685 | * @param array &$menu_list |
2675 | 2686 | * |
2676 | - * @return object |
|
2687 | + * @return Object |
|
2677 | 2688 | **/ |
2678 | 2689 | function triggerGetDocumentMenu(&$menu_list) |
2679 | 2690 | { |
@@ -2703,7 +2714,7 @@ discard block |
||
2703 | 2714 | * |
2704 | 2715 | * @param array &$menu_list |
2705 | 2716 | * |
2706 | - * @return object |
|
2717 | + * @return Object |
|
2707 | 2718 | **/ |
2708 | 2719 | function triggerGetCommentMenu(&$menu_list) |
2709 | 2720 | { |
@@ -2731,7 +2742,7 @@ discard block |
||
2731 | 2742 | /** |
2732 | 2743 | * Spammer manage. Denied user login. And delete or trash all documents. Response Ajax string |
2733 | 2744 | * |
2734 | - * @return object |
|
2745 | + * @return Object |
|
2735 | 2746 | **/ |
2736 | 2747 | function procMemberSpammerManage() |
2737 | 2748 | { |
@@ -34,25 +34,25 @@ discard block |
||
34 | 34 | */ |
35 | 35 | function procMemberLogin($user_id = null, $password = null, $keep_signed = null) |
36 | 36 | { |
37 | - if(!$user_id && !$password && Context::getRequestMethod() == 'GET') |
|
37 | + if (!$user_id && !$password && Context::getRequestMethod() == 'GET') |
|
38 | 38 | { |
39 | 39 | $this->setRedirectUrl(getNotEncodedUrl('')); |
40 | 40 | return new Object(-1, 'null_user_id'); |
41 | 41 | } |
42 | 42 | |
43 | 43 | // Variables |
44 | - if(!$user_id) $user_id = Context::get('user_id'); |
|
44 | + if (!$user_id) $user_id = Context::get('user_id'); |
|
45 | 45 | $user_id = trim($user_id); |
46 | 46 | |
47 | - if(!$password) $password = Context::get('password'); |
|
47 | + if (!$password) $password = Context::get('password'); |
|
48 | 48 | $password = trim($password); |
49 | 49 | |
50 | - if(!$keep_signed) $keep_signed = Context::get('keep_signed'); |
|
50 | + if (!$keep_signed) $keep_signed = Context::get('keep_signed'); |
|
51 | 51 | // Return an error when id and password doesn't exist |
52 | - if(!$user_id) return new Object(-1,'null_user_id'); |
|
53 | - if(!$password) return new Object(-1,'null_password'); |
|
52 | + if (!$user_id) return new Object(-1, 'null_user_id'); |
|
53 | + if (!$password) return new Object(-1, 'null_password'); |
|
54 | 54 | |
55 | - $output = $this->doLogin($user_id, $password, $keep_signed=='Y'?true:false); |
|
55 | + $output = $this->doLogin($user_id, $password, $keep_signed == 'Y' ? true : false); |
|
56 | 56 | if (!$output->toBool()) return $output; |
57 | 57 | |
58 | 58 | $oModuleModel = getModel('module'); |
@@ -62,13 +62,13 @@ discard block |
||
62 | 62 | $limit_date = $config->change_password_date; |
63 | 63 | |
64 | 64 | // Check if change_password_date is set |
65 | - if($limit_date > 0) |
|
65 | + if ($limit_date > 0) |
|
66 | 66 | { |
67 | 67 | $oMemberModel = getModel('member'); |
68 | - if($this->memberInfo->change_password_date < date ('YmdHis', strtotime ('-' . $limit_date . ' day'))) |
|
68 | + if ($this->memberInfo->change_password_date < date('YmdHis', strtotime('-'.$limit_date.' day'))) |
|
69 | 69 | { |
70 | 70 | $msg = sprintf(Context::getLang('msg_change_password_date'), $limit_date); |
71 | - return $this->setRedirectUrl(getNotEncodedUrl('','vid',Context::get('vid'),'mid',Context::get('mid'),'act','dispMemberModifyPassword'), new Object(-1, $msg)); |
|
71 | + return $this->setRedirectUrl(getNotEncodedUrl('', 'vid', Context::get('vid'), 'mid', Context::get('mid'), 'act', 'dispMemberModifyPassword'), new Object(-1, $msg)); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $args->member_srl = $this->memberInfo->member_srl; |
78 | 78 | executeQuery('member.deleteAuthMail', $args); |
79 | 79 | |
80 | - if(!$config->after_login_url) |
|
80 | + if (!$config->after_login_url) |
|
81 | 81 | { |
82 | 82 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', ''); |
83 | 83 | } |
@@ -98,18 +98,18 @@ discard block |
||
98 | 98 | // Call a trigger before log-out (before) |
99 | 99 | $logged_info = Context::get('logged_info'); |
100 | 100 | $trigger_output = ModuleHandler::triggerCall('member.doLogout', 'before', $logged_info); |
101 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
101 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
102 | 102 | // Destroy session information |
103 | 103 | $this->destroySessionInfo(); |
104 | 104 | // Call a trigger after log-out (after) |
105 | 105 | $trigger_output = ModuleHandler::triggerCall('member.doLogout', 'after', $logged_info); |
106 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
106 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
107 | 107 | |
108 | 108 | $output = new Object(); |
109 | 109 | |
110 | 110 | $oModuleModel = getModel('module'); |
111 | 111 | $config = $oModuleModel->getModuleConfig('member'); |
112 | - if($config->after_logout_url) |
|
112 | + if ($config->after_logout_url) |
|
113 | 113 | $output->redirect_url = $config->after_logout_url; |
114 | 114 | |
115 | 115 | $this->_clearMemberCache($logged_info->member_srl); |
@@ -127,18 +127,18 @@ discard block |
||
127 | 127 | $oModuleModel = &getModel('module'); |
128 | 128 | |
129 | 129 | // Check login information |
130 | - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
130 | + if (!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
131 | 131 | $logged_info = Context::get('logged_info'); |
132 | 132 | |
133 | - $document_srl = (int)Context::get('document_srl'); |
|
134 | - if(!$document_srl) $document_srl = (int)Context::get('target_srl'); |
|
135 | - if(!$document_srl) return new Object(-1,'msg_invalid_request'); |
|
133 | + $document_srl = (int) Context::get('document_srl'); |
|
134 | + if (!$document_srl) $document_srl = (int) Context::get('target_srl'); |
|
135 | + if (!$document_srl) return new Object(-1, 'msg_invalid_request'); |
|
136 | 136 | |
137 | 137 | // Get document |
138 | 138 | $oDocumentModel = getModel('document'); |
139 | 139 | $oDocument = $oDocumentModel->getDocument($document_srl); |
140 | 140 | |
141 | - if($oDocument->isSecret() && !$oDocument->isGranted()) |
|
141 | + if ($oDocument->isSecret() && !$oDocument->isGranted()) |
|
142 | 142 | { |
143 | 143 | return new Object(-1, 'msg_is_secret'); |
144 | 144 | } |
@@ -147,19 +147,19 @@ discard block |
||
147 | 147 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($oDocument->get('module_srl')); |
148 | 148 | $grant = $oModuleModel->getGrant($module_info, $logged_info); |
149 | 149 | |
150 | - if(!$grant->access) |
|
150 | + if (!$grant->access) |
|
151 | 151 | { |
152 | 152 | return new Object(-1, 'msg_not_permitted'); |
153 | 153 | } |
154 | 154 | |
155 | 155 | // 게시판 모듈에서 글 목록 보기 권한이 없으면 스크랩 제한 |
156 | - if($module_info->module === 'board' && isset($grant->list) && !$grant->list) |
|
156 | + if ($module_info->module === 'board' && isset($grant->list) && !$grant->list) |
|
157 | 157 | { |
158 | 158 | return new Object(-1, 'msg_not_permitted'); |
159 | 159 | } |
160 | 160 | |
161 | 161 | // 게시판 모듈에서 상담 기능 사용 시 권한이 없는 게시물(타인의 게시물) 스크랩 제한 |
162 | - if($module_info->module === 'board' && |
|
162 | + if ($module_info->module === 'board' && |
|
163 | 163 | $module_info->consultation === 'Y' && |
164 | 164 | isset($grant->consultation_read) && |
165 | 165 | !$grant->consultation_read && !$oDocument->isGranted() |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | |
181 | 181 | // Check if already scrapped |
182 | 182 | $output = executeQuery('member.getScrapDocument', $args); |
183 | - if($output->data->count) return new Object(-1, 'msg_alreay_scrapped'); |
|
183 | + if ($output->data->count) return new Object(-1, 'msg_alreay_scrapped'); |
|
184 | 184 | |
185 | 185 | // Insert |
186 | 186 | $output = executeQuery('member.addScrapDocument', $args); |
187 | - if(!$output->toBool()) return $output; |
|
187 | + if (!$output->toBool()) return $output; |
|
188 | 188 | |
189 | 189 | $this->setError(-1); |
190 | 190 | $this->setMessage('success_registed'); |
@@ -198,11 +198,11 @@ discard block |
||
198 | 198 | function procMemberDeleteScrap() |
199 | 199 | { |
200 | 200 | // Check login information |
201 | - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
201 | + if (!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
202 | 202 | $logged_info = Context::get('logged_info'); |
203 | 203 | |
204 | - $document_srl = (int)Context::get('document_srl'); |
|
205 | - if(!$document_srl) return new Object(-1,'msg_invalid_request'); |
|
204 | + $document_srl = (int) Context::get('document_srl'); |
|
205 | + if (!$document_srl) return new Object(-1, 'msg_invalid_request'); |
|
206 | 206 | // Variables |
207 | 207 | $args = new stdClass; |
208 | 208 | $args->member_srl = $logged_info->member_srl; |
@@ -228,23 +228,23 @@ discard block |
||
228 | 228 | function procMemberDeleteSavedDocument() |
229 | 229 | { |
230 | 230 | // Check login information |
231 | - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
231 | + if (!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
232 | 232 | $logged_info = Context::get('logged_info'); |
233 | 233 | |
234 | - $document_srl = (int)Context::get('document_srl'); |
|
235 | - if(!$document_srl) return new Object(-1,'msg_invalid_request'); |
|
234 | + $document_srl = (int) Context::get('document_srl'); |
|
235 | + if (!$document_srl) return new Object(-1, 'msg_invalid_request'); |
|
236 | 236 | |
237 | 237 | $oDocumentModel = getModel('document'); |
238 | 238 | $oDocument = $oDocumentModel->getDocument($document_srl); |
239 | 239 | if ($oDocument->get('member_srl') != $logged_info->member_srl) |
240 | 240 | { |
241 | - return new Object(-1,'msg_invalid_request'); |
|
241 | + return new Object(-1, 'msg_invalid_request'); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | $configStatusList = $oDocumentModel->getStatusList(); |
245 | 245 | if ($oDocument->get('status') != $configStatusList['temp']) |
246 | 246 | { |
247 | - return new Object(-1,'msg_invalid_request'); |
|
247 | + return new Object(-1, 'msg_invalid_request'); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | $oDocumentController = getController('document'); |
@@ -260,37 +260,37 @@ discard block |
||
260 | 260 | { |
261 | 261 | $name = Context::get('name'); |
262 | 262 | $value = Context::get('value'); |
263 | - if(!$value) return; |
|
263 | + if (!$value) return; |
|
264 | 264 | |
265 | 265 | $oMemberModel = getModel('member'); |
266 | 266 | // Check if logged-in |
267 | 267 | $logged_info = Context::get('logged_info'); |
268 | 268 | |
269 | 269 | |
270 | - switch($name) |
|
270 | + switch ($name) |
|
271 | 271 | { |
272 | 272 | case 'user_id' : |
273 | 273 | // Check denied ID |
274 | - if($oMemberModel->isDeniedID($value)) return new Object(0,'denied_user_id'); |
|
274 | + if ($oMemberModel->isDeniedID($value)) return new Object(0, 'denied_user_id'); |
|
275 | 275 | // Check if duplicated |
276 | 276 | $member_srl = $oMemberModel->getMemberSrlByUserID($value); |
277 | - if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_user_id'); |
|
277 | + if ($member_srl && $logged_info->member_srl != $member_srl) return new Object(0, 'msg_exists_user_id'); |
|
278 | 278 | break; |
279 | 279 | case 'nick_name' : |
280 | 280 | // Check denied ID |
281 | - if($oMemberModel->isDeniedNickName($value)) |
|
281 | + if ($oMemberModel->isDeniedNickName($value)) |
|
282 | 282 | { |
283 | - return new Object(0,'denied_nick_name'); |
|
283 | + return new Object(0, 'denied_nick_name'); |
|
284 | 284 | } |
285 | 285 | // Check if duplicated |
286 | 286 | $member_srl = $oMemberModel->getMemberSrlByNickName($value); |
287 | - if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_nick_name'); |
|
287 | + if ($member_srl && $logged_info->member_srl != $member_srl) return new Object(0, 'msg_exists_nick_name'); |
|
288 | 288 | |
289 | 289 | break; |
290 | 290 | case 'email_address' : |
291 | 291 | // Check if duplicated |
292 | 292 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($value); |
293 | - if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_email_address'); |
|
293 | + if ($member_srl && $logged_info->member_srl != $member_srl) return new Object(0, 'msg_exists_email_address'); |
|
294 | 294 | break; |
295 | 295 | } |
296 | 296 | } |
@@ -302,25 +302,25 @@ discard block |
||
302 | 302 | */ |
303 | 303 | function procMemberInsert() |
304 | 304 | { |
305 | - if (Context::getRequestMethod () == "GET") return new Object (-1, "msg_invalid_request"); |
|
306 | - $oMemberModel = &getModel ('member'); |
|
305 | + if (Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request"); |
|
306 | + $oMemberModel = &getModel('member'); |
|
307 | 307 | $config = $oMemberModel->getMemberConfig(); |
308 | 308 | |
309 | 309 | // call a trigger (before) |
310 | - $trigger_output = ModuleHandler::triggerCall ('member.procMemberInsert', 'before', $config); |
|
311 | - if(!$trigger_output->toBool ()) return $trigger_output; |
|
310 | + $trigger_output = ModuleHandler::triggerCall('member.procMemberInsert', 'before', $config); |
|
311 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
312 | 312 | // Check if an administrator allows a membership |
313 | - if($config->enable_join != 'Y') return $this->stop ('msg_signup_disabled'); |
|
313 | + if ($config->enable_join != 'Y') return $this->stop('msg_signup_disabled'); |
|
314 | 314 | // Check if the user accept the license terms (only if terms exist) |
315 | - if($config->agreement && Context::get('accept_agreement')!='Y') return $this->stop('msg_accept_agreement'); |
|
315 | + if ($config->agreement && Context::get('accept_agreement') != 'Y') return $this->stop('msg_accept_agreement'); |
|
316 | 316 | |
317 | 317 | // Extract the necessary information in advance |
318 | 318 | $getVars = array(); |
319 | - if($config->signupForm) |
|
319 | + if ($config->signupForm) |
|
320 | 320 | { |
321 | - foreach($config->signupForm as $formInfo) |
|
321 | + foreach ($config->signupForm as $formInfo) |
|
322 | 322 | { |
323 | - if($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) |
|
323 | + if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) |
|
324 | 324 | { |
325 | 325 | $getVars[] = $formInfo->name; |
326 | 326 | } |
@@ -328,22 +328,22 @@ discard block |
||
328 | 328 | } |
329 | 329 | |
330 | 330 | $args = new stdClass; |
331 | - foreach($getVars as $val) |
|
331 | + foreach ($getVars as $val) |
|
332 | 332 | { |
333 | 333 | $args->{$val} = Context::get($val); |
334 | - if($val == 'birthday') $args->birthday_ui = Context::get('birthday_ui'); |
|
334 | + if ($val == 'birthday') $args->birthday_ui = Context::get('birthday_ui'); |
|
335 | 335 | } |
336 | 336 | $args->birthday = intval(strtr($args->birthday, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
337 | - if(!$args->birthday && $args->birthday_ui) $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
337 | + if (!$args->birthday && $args->birthday_ui) $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
338 | 338 | |
339 | 339 | $args->find_account_answer = Context::get('find_account_answer'); |
340 | 340 | $args->allow_mailing = Context::get('allow_mailing'); |
341 | 341 | $args->allow_message = Context::get('allow_message'); |
342 | 342 | |
343 | - if($args->password1) $args->password = $args->password1; |
|
343 | + if ($args->password1) $args->password = $args->password1; |
|
344 | 344 | |
345 | 345 | // check password strength |
346 | - if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
346 | + if (!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
347 | 347 | { |
348 | 348 | $message = Context::getLang('about_password_strength'); |
349 | 349 | return new Object(-1, $message[$config->password_strength]); |
@@ -369,58 +369,58 @@ discard block |
||
369 | 369 | unset($all_args->secret_text); |
370 | 370 | |
371 | 371 | // Set the user state as "denied" when using mail authentication |
372 | - if($config->enable_confirm == 'Y') $args->denied = 'Y'; |
|
372 | + if ($config->enable_confirm == 'Y') $args->denied = 'Y'; |
|
373 | 373 | // Add extra vars after excluding necessary information from all the requested arguments |
374 | 374 | $extra_vars = delObjectVars($all_args, $args); |
375 | 375 | $args->extra_vars = serialize($extra_vars); |
376 | 376 | |
377 | 377 | // remove whitespace |
378 | 378 | $checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address'); |
379 | - foreach($checkInfos as $val) |
|
379 | + foreach ($checkInfos as $val) |
|
380 | 380 | { |
381 | - if(isset($args->{$val})) |
|
381 | + if (isset($args->{$val})) |
|
382 | 382 | { |
383 | 383 | $args->{$val} = preg_replace('/[\pZ\pC]+/u', '', $args->{$val}); |
384 | 384 | } |
385 | 385 | } |
386 | 386 | $output = $this->insertMember($args); |
387 | - if(!$output->toBool()) return $output; |
|
387 | + if (!$output->toBool()) return $output; |
|
388 | 388 | |
389 | 389 | // insert ProfileImage, ImageName, ImageMark |
390 | 390 | $profile_image = $_FILES['profile_image']; |
391 | - if(is_uploaded_file($profile_image['tmp_name'])) |
|
391 | + if (is_uploaded_file($profile_image['tmp_name'])) |
|
392 | 392 | { |
393 | 393 | $this->insertProfileImage($args->member_srl, $profile_image['tmp_name']); |
394 | 394 | } |
395 | 395 | |
396 | 396 | $image_mark = $_FILES['image_mark']; |
397 | - if(is_uploaded_file($image_mark['tmp_name'])) |
|
397 | + if (is_uploaded_file($image_mark['tmp_name'])) |
|
398 | 398 | { |
399 | 399 | $this->insertImageMark($args->member_srl, $image_mark['tmp_name']); |
400 | 400 | } |
401 | 401 | |
402 | 402 | $image_name = $_FILES['image_name']; |
403 | - if(is_uploaded_file($image_name['tmp_name'])) |
|
403 | + if (is_uploaded_file($image_name['tmp_name'])) |
|
404 | 404 | { |
405 | 405 | $this->insertImageName($args->member_srl, $image_name['tmp_name']); |
406 | 406 | } |
407 | 407 | |
408 | 408 | // If a virtual site, join the site |
409 | 409 | $site_module_info = Context::get('site_module_info'); |
410 | - if($site_module_info->site_srl > 0) |
|
410 | + if ($site_module_info->site_srl > 0) |
|
411 | 411 | { |
412 | 412 | $columnList = array('site_srl', 'group_srl'); |
413 | 413 | $default_group = $oMemberModel->getDefaultGroup($site_module_info->site_srl, $columnList); |
414 | - if($default_group->group_srl) |
|
414 | + if ($default_group->group_srl) |
|
415 | 415 | { |
416 | 416 | $this->addMemberToGroup($args->member_srl, $default_group->group_srl, $site_module_info->site_srl); |
417 | 417 | } |
418 | 418 | |
419 | 419 | } |
420 | 420 | // Log-in |
421 | - if($config->enable_confirm != 'Y') |
|
421 | + if ($config->enable_confirm != 'Y') |
|
422 | 422 | { |
423 | - if($config->identifier == 'email_address') |
|
423 | + if ($config->identifier == 'email_address') |
|
424 | 424 | { |
425 | 425 | $output = $this->doLogin($args->email_address); |
426 | 426 | } |
@@ -428,8 +428,8 @@ discard block |
||
428 | 428 | { |
429 | 429 | $output = $this->doLogin($args->user_id); |
430 | 430 | } |
431 | - if(!$output->toBool()) { |
|
432 | - if($output->error == -9) |
|
431 | + if (!$output->toBool()) { |
|
432 | + if ($output->error == -9) |
|
433 | 433 | $output->error = -11; |
434 | 434 | return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), $output); |
435 | 435 | } |
@@ -437,8 +437,8 @@ discard block |
||
437 | 437 | |
438 | 438 | // Results |
439 | 439 | $this->add('member_srl', $args->member_srl); |
440 | - if($config->redirect_url) $this->add('redirect_url', $config->redirect_url); |
|
441 | - if($config->enable_confirm == 'Y') |
|
440 | + if ($config->redirect_url) $this->add('redirect_url', $config->redirect_url); |
|
441 | + if ($config->enable_confirm == 'Y') |
|
442 | 442 | { |
443 | 443 | $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $args->email_address); |
444 | 444 | $this->setMessage($msg); |
@@ -447,19 +447,19 @@ discard block |
||
447 | 447 | else $this->setMessage('success_registed'); |
448 | 448 | // Call a trigger (after) |
449 | 449 | $trigger_output = ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config); |
450 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
450 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
451 | 451 | |
452 | - if($config->redirect_url) |
|
452 | + if ($config->redirect_url) |
|
453 | 453 | { |
454 | 454 | $returnUrl = $config->redirect_url; |
455 | 455 | } |
456 | 456 | else |
457 | 457 | { |
458 | - if(Context::get('success_return_url')) |
|
458 | + if (Context::get('success_return_url')) |
|
459 | 459 | { |
460 | 460 | $returnUrl = Context::get('success_return_url'); |
461 | 461 | } |
462 | - else if($_COOKIE['XE_REDIRECT_URL']) |
|
462 | + else if ($_COOKIE['XE_REDIRECT_URL']) |
|
463 | 463 | { |
464 | 464 | $returnUrl = $_COOKIE['XE_REDIRECT_URL']; |
465 | 465 | setcookie("XE_REDIRECT_URL", '', 1); |
@@ -473,26 +473,26 @@ discard block |
||
473 | 473 | |
474 | 474 | function procMemberModifyInfoBefore() |
475 | 475 | { |
476 | - if($_SESSION['rechecked_password_step'] != 'INPUT_PASSWORD') |
|
476 | + if ($_SESSION['rechecked_password_step'] != 'INPUT_PASSWORD') |
|
477 | 477 | { |
478 | 478 | return $this->stop('msg_invalid_request'); |
479 | 479 | } |
480 | 480 | |
481 | - if(!Context::get('is_logged')) |
|
481 | + if (!Context::get('is_logged')) |
|
482 | 482 | { |
483 | 483 | return $this->stop('msg_not_logged'); |
484 | 484 | } |
485 | 485 | |
486 | 486 | $password = Context::get('password'); |
487 | 487 | |
488 | - if(!$password) |
|
488 | + if (!$password) |
|
489 | 489 | { |
490 | 490 | return $this->stop('msg_invalid_request'); |
491 | 491 | } |
492 | 492 | |
493 | 493 | $oMemberModel = getModel('member'); |
494 | 494 | |
495 | - if(!$this->memberInfo->password) |
|
495 | + if (!$this->memberInfo->password) |
|
496 | 496 | { |
497 | 497 | // Get information of logged-in user |
498 | 498 | $logged_info = Context::get('logged_info'); |
@@ -503,14 +503,14 @@ discard block |
||
503 | 503 | $this->memberInfo->password = $memberInfo->password; |
504 | 504 | } |
505 | 505 | // Verify the current password |
506 | - if(!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) |
|
506 | + if (!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) |
|
507 | 507 | { |
508 | 508 | return new Object(-1, 'invalid_password'); |
509 | 509 | } |
510 | 510 | |
511 | 511 | $_SESSION['rechecked_password_step'] = 'VALIDATE_PASSWORD'; |
512 | 512 | |
513 | - if(Context::get('success_return_url')) |
|
513 | + if (Context::get('success_return_url')) |
|
514 | 514 | { |
515 | 515 | $redirectUrl = Context::get('success_return_url'); |
516 | 516 | } |
@@ -528,12 +528,12 @@ discard block |
||
528 | 528 | */ |
529 | 529 | function procMemberModifyInfo() |
530 | 530 | { |
531 | - if(!Context::get('is_logged')) |
|
531 | + if (!Context::get('is_logged')) |
|
532 | 532 | { |
533 | 533 | return $this->stop('msg_not_logged'); |
534 | 534 | } |
535 | 535 | |
536 | - if($_SESSION['rechecked_password_step'] != 'INPUT_DATA') |
|
536 | + if ($_SESSION['rechecked_password_step'] != 'INPUT_DATA') |
|
537 | 537 | { |
538 | 538 | return $this->stop('msg_invalid_request'); |
539 | 539 | } |
@@ -541,13 +541,13 @@ discard block |
||
541 | 541 | |
542 | 542 | // Extract the necessary information in advance |
543 | 543 | $oMemberModel = getModel('member'); |
544 | - $config = $oMemberModel->getMemberConfig (); |
|
545 | - $getVars = array('find_account_answer','allow_mailing','allow_message'); |
|
546 | - if($config->signupForm) |
|
544 | + $config = $oMemberModel->getMemberConfig(); |
|
545 | + $getVars = array('find_account_answer', 'allow_mailing', 'allow_message'); |
|
546 | + if ($config->signupForm) |
|
547 | 547 | { |
548 | - foreach($config->signupForm as $formInfo) |
|
548 | + foreach ($config->signupForm as $formInfo) |
|
549 | 549 | { |
550 | - if($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) |
|
550 | + if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired)) |
|
551 | 551 | { |
552 | 552 | $getVars[] = $formInfo->name; |
553 | 553 | } |
@@ -555,11 +555,11 @@ discard block |
||
555 | 555 | } |
556 | 556 | |
557 | 557 | $args = new stdClass; |
558 | - foreach($getVars as $val) |
|
558 | + foreach ($getVars as $val) |
|
559 | 559 | { |
560 | 560 | $args->{$val} = Context::get($val); |
561 | - if($val == 'birthday') $args->birthday_ui = Context::get('birthday_ui'); |
|
562 | - if($val == 'find_account_answer' && !Context::get($val)) { |
|
561 | + if ($val == 'birthday') $args->birthday_ui = Context::get('birthday_ui'); |
|
562 | + if ($val == 'find_account_answer' && !Context::get($val)) { |
|
563 | 563 | unset($args->{$val}); |
564 | 564 | } |
565 | 565 | } |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | $logged_info = Context::get('logged_info'); |
569 | 569 | $args->member_srl = $logged_info->member_srl; |
570 | 570 | $args->birthday = intval(strtr($args->birthday, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
571 | - if(!$args->birthday && $args->birthday_ui) $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
571 | + if (!$args->birthday && $args->birthday_ui) $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
572 | 572 | |
573 | 573 | // Remove some unnecessary variables from all the vars |
574 | 574 | $all_args = Context::getRequestVars(); |
@@ -593,9 +593,9 @@ discard block |
||
593 | 593 | |
594 | 594 | // remove whitespace |
595 | 595 | $checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address'); |
596 | - foreach($checkInfos as $val) |
|
596 | + foreach ($checkInfos as $val) |
|
597 | 597 | { |
598 | - if(isset($args->{$val})) |
|
598 | + if (isset($args->{$val})) |
|
599 | 599 | { |
600 | 600 | $args->{$val} = preg_replace('/[\pZ\pC]+/u', '', $args->{$val}); |
601 | 601 | } |
@@ -603,22 +603,22 @@ discard block |
||
603 | 603 | |
604 | 604 | // Execute insert or update depending on the value of member_srl |
605 | 605 | $output = $this->updateMember($args); |
606 | - if(!$output->toBool()) return $output; |
|
606 | + if (!$output->toBool()) return $output; |
|
607 | 607 | |
608 | 608 | $profile_image = $_FILES['profile_image']; |
609 | - if(is_uploaded_file($profile_image['tmp_name'])) |
|
609 | + if (is_uploaded_file($profile_image['tmp_name'])) |
|
610 | 610 | { |
611 | 611 | $this->insertProfileImage($args->member_srl, $profile_image['tmp_name']); |
612 | 612 | } |
613 | 613 | |
614 | 614 | $image_mark = $_FILES['image_mark']; |
615 | - if(is_uploaded_file($image_mark['tmp_name'])) |
|
615 | + if (is_uploaded_file($image_mark['tmp_name'])) |
|
616 | 616 | { |
617 | 617 | $this->insertImageMark($args->member_srl, $image_mark['tmp_name']); |
618 | 618 | } |
619 | 619 | |
620 | 620 | $image_name = $_FILES['image_name']; |
621 | - if(is_uploaded_file($image_name['tmp_name'])) |
|
621 | + if (is_uploaded_file($image_name['tmp_name'])) |
|
622 | 622 | { |
623 | 623 | $this->insertImageName($args->member_srl, $image_name['tmp_name']); |
624 | 624 | } |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | |
634 | 634 | // Call a trigger after successfully log-in (after) |
635 | 635 | $trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo); |
636 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
636 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
637 | 637 | |
638 | 638 | $this->setSessionInfo(); |
639 | 639 | // Return result |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | */ |
655 | 655 | function procMemberModifyPassword() |
656 | 656 | { |
657 | - if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
657 | + if (!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
658 | 658 | // Extract the necessary information in advance |
659 | 659 | $current_password = trim(Context::get('current_password')); |
660 | 660 | $password = trim(Context::get('password1')); |
@@ -668,17 +668,17 @@ discard block |
||
668 | 668 | |
669 | 669 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
670 | 670 | // Verify the cuttent password |
671 | - if(!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) return new Object(-1, 'invalid_password'); |
|
671 | + if (!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) return new Object(-1, 'invalid_password'); |
|
672 | 672 | |
673 | 673 | // Check if a new password is as same as the previous password |
674 | - if($current_password == $password) return new Object(-1, 'invalid_new_password'); |
|
674 | + if ($current_password == $password) return new Object(-1, 'invalid_new_password'); |
|
675 | 675 | |
676 | 676 | // Execute insert or update depending on the value of member_srl |
677 | 677 | $args = new stdClass; |
678 | 678 | $args->member_srl = $member_srl; |
679 | 679 | $args->password = $password; |
680 | 680 | $output = $this->updateMemberPassword($args); |
681 | - if(!$output->toBool()) return $output; |
|
681 | + if (!$output->toBool()) return $output; |
|
682 | 682 | |
683 | 683 | $this->add('member_srl', $args->member_srl); |
684 | 684 | $this->setMessage('success_updated'); |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | */ |
695 | 695 | function procMemberLeave() |
696 | 696 | { |
697 | - if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
697 | + if (!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
698 | 698 | // Extract the necessary information in advance |
699 | 699 | $password = trim(Context::get('password')); |
700 | 700 | // Get information of logged-in user |
@@ -703,17 +703,17 @@ discard block |
||
703 | 703 | // Create a member model object |
704 | 704 | $oMemberModel = getModel('member'); |
705 | 705 | // Get information of member_srl |
706 | - if(!$this->memberInfo->password) |
|
706 | + if (!$this->memberInfo->password) |
|
707 | 707 | { |
708 | 708 | $columnList = array('member_srl', 'password'); |
709 | 709 | $memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
710 | 710 | $this->memberInfo->password = $memberInfo->password; |
711 | 711 | } |
712 | 712 | // Verify the cuttent password |
713 | - if(!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) return new Object(-1, 'invalid_password'); |
|
713 | + if (!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) return new Object(-1, 'invalid_password'); |
|
714 | 714 | |
715 | 715 | $output = $this->deleteMember($member_srl); |
716 | - if(!$output->toBool()) return $output; |
|
716 | + if (!$output->toBool()) return $output; |
|
717 | 717 | // Destroy all session information |
718 | 718 | $this->destroySessionInfo(); |
719 | 719 | // Return success message |
@@ -732,17 +732,17 @@ discard block |
||
732 | 732 | { |
733 | 733 | // Check if the file is successfully uploaded |
734 | 734 | $file = $_FILES['profile_image']; |
735 | - if(!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_profile_image'); |
|
735 | + if (!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_profile_image'); |
|
736 | 736 | // Ignore if member_srl is invalid or doesn't exist. |
737 | 737 | $member_srl = Context::get('member_srl'); |
738 | - if(!$member_srl) return $this->stop('msg_not_uploaded_profile_image'); |
|
738 | + if (!$member_srl) return $this->stop('msg_not_uploaded_profile_image'); |
|
739 | 739 | |
740 | 740 | $logged_info = Context::get('logged_info'); |
741 | - if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_profile_image'); |
|
741 | + if ($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_profile_image'); |
|
742 | 742 | // Return if member module is set not to use an image name or the user is not an administrator ; |
743 | 743 | $oModuleModel = getModel('module'); |
744 | 744 | $config = $oModuleModel->getModuleConfig('member'); |
745 | - if($logged_info->is_admin != 'Y' && $config->profile_image != 'Y') return $this->stop('msg_not_uploaded_profile_image'); |
|
745 | + if ($logged_info->is_admin != 'Y' && $config->profile_image != 'Y') return $this->stop('msg_not_uploaded_profile_image'); |
|
746 | 746 | |
747 | 747 | $this->insertProfileImage($member_srl, $file['tmp_name']); |
748 | 748 | // Page refresh |
@@ -764,25 +764,25 @@ discard block |
||
764 | 764 | { |
765 | 765 | |
766 | 766 | // Check uploaded file |
767 | - if(!checkUploadedFile($target_file)) return; |
|
767 | + if (!checkUploadedFile($target_file)) return; |
|
768 | 768 | |
769 | 769 | $oMemberModel = getModel('member'); |
770 | 770 | $config = $oMemberModel->getMemberConfig(); |
771 | 771 | |
772 | 772 | // Get an image size |
773 | 773 | $max_width = $config->profile_image_max_width; |
774 | - if(!$max_width) $max_width = "90"; |
|
774 | + if (!$max_width) $max_width = "90"; |
|
775 | 775 | $max_height = $config->profile_image_max_height; |
776 | - if(!$max_height) $max_height = "90"; |
|
776 | + if (!$max_height) $max_height = "90"; |
|
777 | 777 | // Get a target path to save |
778 | 778 | $target_path = sprintf('files/member_extra_info/profile_image/%s', getNumberingPath($member_srl)); |
779 | 779 | FileHandler::makeDir($target_path); |
780 | 780 | |
781 | 781 | // Get file information |
782 | 782 | list($width, $height, $type, $attrs) = @getimagesize($target_file); |
783 | - if(IMAGETYPE_PNG == $type) $ext = 'png'; |
|
784 | - elseif(IMAGETYPE_JPEG == $type) $ext = 'jpg'; |
|
785 | - elseif(IMAGETYPE_GIF == $type) $ext = 'gif'; |
|
783 | + if (IMAGETYPE_PNG == $type) $ext = 'png'; |
|
784 | + elseif (IMAGETYPE_JPEG == $type) $ext = 'jpg'; |
|
785 | + elseif (IMAGETYPE_GIF == $type) $ext = 'gif'; |
|
786 | 786 | else |
787 | 787 | { |
788 | 788 | return; |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | |
793 | 793 | $target_filename = sprintf('%s%d.%s', $target_path, $member_srl, $ext); |
794 | 794 | // Convert if the image size is larger than a given size or if the format is not a gif |
795 | - if(($width > $max_width || $height > $max_height ) && $type != 1) |
|
795 | + if (($width > $max_width || $height > $max_height) && $type != 1) |
|
796 | 796 | { |
797 | 797 | FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, $ext); |
798 | 798 | } |
@@ -811,17 +811,17 @@ discard block |
||
811 | 811 | { |
812 | 812 | // Check if the file is successfully uploaded |
813 | 813 | $file = $_FILES['image_name']; |
814 | - if(!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_image_name'); |
|
814 | + if (!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_image_name'); |
|
815 | 815 | // Ignore if member_srl is invalid or doesn't exist. |
816 | 816 | $member_srl = Context::get('member_srl'); |
817 | - if(!$member_srl) return $this->stop('msg_not_uploaded_image_name'); |
|
817 | + if (!$member_srl) return $this->stop('msg_not_uploaded_image_name'); |
|
818 | 818 | |
819 | 819 | $logged_info = Context::get('logged_info'); |
820 | - if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_image_name'); |
|
820 | + if ($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_image_name'); |
|
821 | 821 | // Return if member module is set not to use an image name or the user is not an administrator ; |
822 | 822 | $oModuleModel = getModel('module'); |
823 | 823 | $config = $oModuleModel->getModuleConfig('member'); |
824 | - if($logged_info->is_admin != 'Y' && $config->image_name != 'Y') return $this->stop('msg_not_uploaded_image_name'); |
|
824 | + if ($logged_info->is_admin != 'Y' && $config->image_name != 'Y') return $this->stop('msg_not_uploaded_image_name'); |
|
825 | 825 | |
826 | 826 | $this->insertImageName($member_srl, $file['tmp_name']); |
827 | 827 | // Page refresh |
@@ -842,15 +842,15 @@ discard block |
||
842 | 842 | function insertImageName($member_srl, $target_file) |
843 | 843 | { |
844 | 844 | // Check uploaded file |
845 | - if(!checkUploadedFile($target_file)) return; |
|
845 | + if (!checkUploadedFile($target_file)) return; |
|
846 | 846 | |
847 | 847 | $oModuleModel = getModel('module'); |
848 | 848 | $config = $oModuleModel->getModuleConfig('member'); |
849 | 849 | // Get an image size |
850 | 850 | $max_width = $config->image_name_max_width; |
851 | - if(!$max_width) $max_width = "90"; |
|
851 | + if (!$max_width) $max_width = "90"; |
|
852 | 852 | $max_height = $config->image_name_max_height; |
853 | - if(!$max_height) $max_height = "20"; |
|
853 | + if (!$max_height) $max_height = "20"; |
|
854 | 854 | // Get a target path to save |
855 | 855 | $target_path = sprintf('files/member_extra_info/image_name/%s/', getNumberingPath($member_srl)); |
856 | 856 | FileHandler::makeDir($target_path); |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | // Get file information |
860 | 860 | list($width, $height, $type, $attrs) = @getimagesize($target_file); |
861 | 861 | // Convert if the image size is larger than a given size or if the format is not a gif |
862 | - if($width > $max_width || $height > $max_height || $type!=1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
862 | + if ($width > $max_width || $height > $max_height || $type != 1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
863 | 863 | else @copy($target_file, $target_filename); |
864 | 864 | } |
865 | 865 | |
@@ -871,20 +871,20 @@ discard block |
||
871 | 871 | function procMemberDeleteProfileImage($_memberSrl = 0) |
872 | 872 | { |
873 | 873 | $member_srl = ($_memberSrl) ? $_memberSrl : Context::get('member_srl'); |
874 | - if(!$member_srl) |
|
874 | + if (!$member_srl) |
|
875 | 875 | { |
876 | - return new Object(0,'success'); |
|
876 | + return new Object(0, 'success'); |
|
877 | 877 | } |
878 | 878 | |
879 | 879 | $logged_info = Context::get('logged_info'); |
880 | 880 | |
881 | - if($logged_info && ($logged_info->is_admin == 'Y' || $logged_info->member_srl == $member_srl)) |
|
881 | + if ($logged_info && ($logged_info->is_admin == 'Y' || $logged_info->member_srl == $member_srl)) |
|
882 | 882 | { |
883 | 883 | $oMemberModel = getModel('member'); |
884 | 884 | $profile_image = $oMemberModel->getProfileImage($member_srl); |
885 | 885 | FileHandler::removeFile($profile_image->file); |
886 | 886 | } |
887 | - return new Object(0,'success'); |
|
887 | + return new Object(0, 'success'); |
|
888 | 888 | } |
889 | 889 | |
890 | 890 | /** |
@@ -895,20 +895,20 @@ discard block |
||
895 | 895 | function procMemberDeleteImageName($_memberSrl = 0) |
896 | 896 | { |
897 | 897 | $member_srl = ($_memberSrl) ? $_memberSrl : Context::get('member_srl'); |
898 | - if(!$member_srl) |
|
898 | + if (!$member_srl) |
|
899 | 899 | { |
900 | - return new Object(0,'success'); |
|
900 | + return new Object(0, 'success'); |
|
901 | 901 | } |
902 | 902 | |
903 | 903 | $logged_info = Context::get('logged_info'); |
904 | 904 | |
905 | - if($logged_info && ($logged_info->is_admin == 'Y' || $logged_info->member_srl == $member_srl)) |
|
905 | + if ($logged_info && ($logged_info->is_admin == 'Y' || $logged_info->member_srl == $member_srl)) |
|
906 | 906 | { |
907 | 907 | $oMemberModel = getModel('member'); |
908 | 908 | $image_name = $oMemberModel->getImageName($member_srl); |
909 | 909 | FileHandler::removeFile($image_name->file); |
910 | 910 | } |
911 | - return new Object(0,'success'); |
|
911 | + return new Object(0, 'success'); |
|
912 | 912 | } |
913 | 913 | |
914 | 914 | /** |
@@ -920,17 +920,17 @@ discard block |
||
920 | 920 | { |
921 | 921 | // Check if the file is successfully uploaded |
922 | 922 | $file = $_FILES['image_mark']; |
923 | - if(!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_image_mark'); |
|
923 | + if (!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_image_mark'); |
|
924 | 924 | // Ignore if member_srl is invalid or doesn't exist. |
925 | 925 | $member_srl = Context::get('member_srl'); |
926 | - if(!$member_srl) return $this->stop('msg_not_uploaded_image_mark'); |
|
926 | + if (!$member_srl) return $this->stop('msg_not_uploaded_image_mark'); |
|
927 | 927 | |
928 | 928 | $logged_info = Context::get('logged_info'); |
929 | - if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_image_mark'); |
|
929 | + if ($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_image_mark'); |
|
930 | 930 | // Membership in the images mark the module using the ban was set by an administrator or return; |
931 | 931 | $oModuleModel = getModel('module'); |
932 | 932 | $config = $oModuleModel->getModuleConfig('member'); |
933 | - if($logged_info->is_admin != 'Y' && $config->image_mark != 'Y') return $this->stop('msg_not_uploaded_image_mark'); |
|
933 | + if ($logged_info->is_admin != 'Y' && $config->image_mark != 'Y') return $this->stop('msg_not_uploaded_image_mark'); |
|
934 | 934 | |
935 | 935 | $this->insertImageMark($member_srl, $file['tmp_name']); |
936 | 936 | // Page refresh |
@@ -951,15 +951,15 @@ discard block |
||
951 | 951 | function insertImageMark($member_srl, $target_file) |
952 | 952 | { |
953 | 953 | // Check uploaded file |
954 | - if(!checkUploadedFile($target_file)) return; |
|
954 | + if (!checkUploadedFile($target_file)) return; |
|
955 | 955 | |
956 | 956 | $oModuleModel = getModel('module'); |
957 | 957 | $config = $oModuleModel->getModuleConfig('member'); |
958 | 958 | // Get an image size |
959 | 959 | $max_width = $config->image_mark_max_width; |
960 | - if(!$max_width) $max_width = "20"; |
|
960 | + if (!$max_width) $max_width = "20"; |
|
961 | 961 | $max_height = $config->image_mark_max_height; |
962 | - if(!$max_height) $max_height = "20"; |
|
962 | + if (!$max_height) $max_height = "20"; |
|
963 | 963 | |
964 | 964 | $target_path = sprintf('files/member_extra_info/image_mark/%s/', getNumberingPath($member_srl)); |
965 | 965 | FileHandler::makeDir($target_path); |
@@ -968,7 +968,7 @@ discard block |
||
968 | 968 | // Get file information |
969 | 969 | list($width, $height, $type, $attrs) = @getimagesize($target_file); |
970 | 970 | |
971 | - if($width > $max_width || $height > $max_height || $type!=1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
971 | + if ($width > $max_width || $height > $max_height || $type != 1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
972 | 972 | else @copy($target_file, $target_filename); |
973 | 973 | } |
974 | 974 | |
@@ -980,20 +980,20 @@ discard block |
||
980 | 980 | function procMemberDeleteImageMark($_memberSrl = 0) |
981 | 981 | { |
982 | 982 | $member_srl = ($_memberSrl) ? $_memberSrl : Context::get('member_srl'); |
983 | - if(!$member_srl) |
|
983 | + if (!$member_srl) |
|
984 | 984 | { |
985 | - return new Object(0,'success'); |
|
985 | + return new Object(0, 'success'); |
|
986 | 986 | } |
987 | 987 | |
988 | 988 | $logged_info = Context::get('logged_info'); |
989 | 989 | |
990 | - if($logged_info && ($logged_info->is_admin == 'Y' || $logged_info->member_srl == $member_srl)) |
|
990 | + if ($logged_info && ($logged_info->is_admin == 'Y' || $logged_info->member_srl == $member_srl)) |
|
991 | 991 | { |
992 | 992 | $oMemberModel = getModel('member'); |
993 | 993 | $image_mark = $oMemberModel->getImageMark($member_srl); |
994 | 994 | FileHandler::removeFile($image_mark->file); |
995 | 995 | } |
996 | - return new Object(0,'success'); |
|
996 | + return new Object(0, 'success'); |
|
997 | 997 | } |
998 | 998 | |
999 | 999 | /** |
@@ -1004,26 +1004,26 @@ discard block |
||
1004 | 1004 | function procMemberFindAccount() |
1005 | 1005 | { |
1006 | 1006 | $email_address = Context::get('email_address'); |
1007 | - if(!$email_address) return new Object(-1, 'msg_invalid_request'); |
|
1007 | + if (!$email_address) return new Object(-1, 'msg_invalid_request'); |
|
1008 | 1008 | |
1009 | 1009 | $oMemberModel = getModel('member'); |
1010 | 1010 | $oModuleModel = getModel('module'); |
1011 | 1011 | |
1012 | 1012 | // Check if a member having the same email address exists |
1013 | 1013 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($email_address); |
1014 | - if(!$member_srl) return new Object(-1, 'msg_email_not_exists'); |
|
1014 | + if (!$member_srl) return new Object(-1, 'msg_email_not_exists'); |
|
1015 | 1015 | |
1016 | 1016 | // Get information of the member |
1017 | 1017 | $columnList = array('denied', 'member_srl', 'user_id', 'user_name', 'email_address', 'nick_name'); |
1018 | 1018 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
1019 | 1019 | |
1020 | 1020 | // Check if possible to find member's ID and password |
1021 | - if($member_info->denied == 'Y') |
|
1021 | + if ($member_info->denied == 'Y') |
|
1022 | 1022 | { |
1023 | 1023 | $chk_args = new stdClass; |
1024 | 1024 | $chk_args->member_srl = $member_info->member_srl; |
1025 | 1025 | $output = executeQuery('member.chkAuthMail', $chk_args); |
1026 | - if($output->toBool() && $output->data->count != '0') return new Object(-1, 'msg_user_not_confirmed'); |
|
1026 | + if ($output->toBool() && $output->data->count != '0') return new Object(-1, 'msg_user_not_confirmed'); |
|
1027 | 1027 | } |
1028 | 1028 | |
1029 | 1029 | // Insert data into the authentication DB |
@@ -1036,19 +1036,19 @@ discard block |
||
1036 | 1036 | $args->is_register = 'N'; |
1037 | 1037 | |
1038 | 1038 | $output = executeQuery('member.insertAuthMail', $args); |
1039 | - if(!$output->toBool()) return $output; |
|
1039 | + if (!$output->toBool()) return $output; |
|
1040 | 1040 | // Get content of the email to send a member |
1041 | 1041 | Context::set('auth_args', $args); |
1042 | 1042 | |
1043 | 1043 | $member_config = $oModuleModel->getModuleConfig('member'); |
1044 | 1044 | $memberInfo = array(); |
1045 | 1045 | global $lang; |
1046 | - if(is_array($member_config->signupForm)) |
|
1046 | + if (is_array($member_config->signupForm)) |
|
1047 | 1047 | { |
1048 | - $exceptForm=array('password', 'find_account_question'); |
|
1049 | - foreach($member_config->signupForm as $form) |
|
1048 | + $exceptForm = array('password', 'find_account_question'); |
|
1049 | + foreach ($member_config->signupForm as $form) |
|
1050 | 1050 | { |
1051 | - if(!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired)) |
|
1051 | + if (!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired)) |
|
1052 | 1052 | { |
1053 | 1053 | $memberInfo[$lang->{$form->name}] = $member_info->{$form->name}; |
1054 | 1054 | } |
@@ -1063,15 +1063,15 @@ discard block |
||
1063 | 1063 | } |
1064 | 1064 | Context::set('memberInfo', $memberInfo); |
1065 | 1065 | |
1066 | - if(!$member_config->skin) $member_config->skin = "default"; |
|
1067 | - if(!$member_config->colorset) $member_config->colorset = "white"; |
|
1066 | + if (!$member_config->skin) $member_config->skin = "default"; |
|
1067 | + if (!$member_config->colorset) $member_config->colorset = "white"; |
|
1068 | 1068 | |
1069 | 1069 | Context::set('member_config', $member_config); |
1070 | 1070 | |
1071 | 1071 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
1072 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1072 | + if (!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1073 | 1073 | |
1074 | - $find_url = getFullUrl ('', 'module', 'member', 'act', 'procMemberAuthAccount', 'member_srl', $member_info->member_srl, 'auth_key', $args->auth_key); |
|
1074 | + $find_url = getFullUrl('', 'module', 'member', 'act', 'procMemberAuthAccount', 'member_srl', $member_info->member_srl, 'auth_key', $args->auth_key); |
|
1075 | 1075 | Context::set('find_url', $find_url); |
1076 | 1076 | |
1077 | 1077 | $oTemplate = &TemplateHandler::getInstance(); |
@@ -1081,19 +1081,19 @@ discard block |
||
1081 | 1081 | $member_config = $oModuleModel->getModuleConfig('member'); |
1082 | 1082 | // Send a mail |
1083 | 1083 | $oMail = new Mail(); |
1084 | - $oMail->setTitle( Context::getLang('msg_find_account_title') ); |
|
1084 | + $oMail->setTitle(Context::getLang('msg_find_account_title')); |
|
1085 | 1085 | $oMail->setContent($content); |
1086 | - $oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email); |
|
1087 | - $oMail->setReceiptor( $member_info->user_name, $member_info->email_address ); |
|
1086 | + $oMail->setSender($member_config->webmaster_name ? $member_config->webmaster_name : 'webmaster', $member_config->webmaster_email); |
|
1087 | + $oMail->setReceiptor($member_info->user_name, $member_info->email_address); |
|
1088 | 1088 | $oMail->send(); |
1089 | 1089 | // Return message |
1090 | 1090 | $msg = sprintf(Context::getLang('msg_auth_mail_sent'), $member_info->email_address); |
1091 | - if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) |
|
1091 | + if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON'))) |
|
1092 | 1092 | { |
1093 | 1093 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispMemberFindAccount'); |
1094 | 1094 | $this->setRedirectUrl($returnUrl); |
1095 | 1095 | } |
1096 | - return new Object(0,$msg); |
|
1096 | + return new Object(0, $msg); |
|
1097 | 1097 | } |
1098 | 1098 | |
1099 | 1099 | /** |
@@ -1104,7 +1104,7 @@ discard block |
||
1104 | 1104 | function procMemberFindAccountByQuestion() |
1105 | 1105 | { |
1106 | 1106 | $oMemberModel = getModel('member'); |
1107 | - $oPassword = new Password(); |
|
1107 | + $oPassword = new Password(); |
|
1108 | 1108 | $config = $oMemberModel->getMemberConfig(); |
1109 | 1109 | |
1110 | 1110 | $email_address = Context::get('email_address'); |
@@ -1112,49 +1112,49 @@ discard block |
||
1112 | 1112 | $find_account_question = trim(Context::get('find_account_question')); |
1113 | 1113 | $find_account_answer = trim(Context::get('find_account_answer')); |
1114 | 1114 | |
1115 | - if(($config->identifier == 'user_id' && !$user_id) || !$email_address || !$find_account_question || !$find_account_answer) return new Object(-1, 'msg_invalid_request'); |
|
1115 | + if (($config->identifier == 'user_id' && !$user_id) || !$email_address || !$find_account_question || !$find_account_answer) return new Object(-1, 'msg_invalid_request'); |
|
1116 | 1116 | |
1117 | 1117 | $oModuleModel = getModel('module'); |
1118 | 1118 | // Check if a member having the same email address exists |
1119 | 1119 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($email_address); |
1120 | - if(!$member_srl) return new Object(-1, 'msg_email_not_exists'); |
|
1120 | + if (!$member_srl) return new Object(-1, 'msg_email_not_exists'); |
|
1121 | 1121 | |
1122 | 1122 | // Get information of the member |
1123 | 1123 | $columnList = array('member_srl', 'find_account_question', 'find_account_answer'); |
1124 | 1124 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
1125 | 1125 | |
1126 | 1126 | // Display a message if no answer is entered |
1127 | - if(!$member_info->find_account_question || !$member_info->find_account_answer) return new Object(-1, 'msg_question_not_exists'); |
|
1127 | + if (!$member_info->find_account_question || !$member_info->find_account_answer) return new Object(-1, 'msg_question_not_exists'); |
|
1128 | 1128 | |
1129 | 1129 | // 답변 확인 |
1130 | 1130 | $hashed = $oPassword->checkAlgorithm($member_info->find_account_answer); |
1131 | 1131 | $authed = true; |
1132 | 1132 | $member_info->find_account_question = trim($member_info->find_account_question); |
1133 | - if($member_info->find_account_question != $find_account_question) |
|
1133 | + if ($member_info->find_account_question != $find_account_question) |
|
1134 | 1134 | { |
1135 | 1135 | $authed = false; |
1136 | 1136 | } |
1137 | - else if($hashed && !$oPassword->checkPassword($find_account_answer, $member_info->find_account_answer)) |
|
1137 | + else if ($hashed && !$oPassword->checkPassword($find_account_answer, $member_info->find_account_answer)) |
|
1138 | 1138 | { |
1139 | 1139 | $authed = false; |
1140 | 1140 | } |
1141 | - else if(!$hashed && $find_account_answer != $member_info->find_account_answer) |
|
1141 | + else if (!$hashed && $find_account_answer != $member_info->find_account_answer) |
|
1142 | 1142 | { |
1143 | 1143 | $authed = false; |
1144 | 1144 | } |
1145 | 1145 | |
1146 | - if(!$authed) |
|
1146 | + if (!$authed) |
|
1147 | 1147 | { |
1148 | 1148 | return new Object(-1, 'msg_answer_not_matches'); |
1149 | 1149 | } |
1150 | 1150 | |
1151 | 1151 | // answer가 동일하고 hash 되지 않았으면 hash 값으로 저장 |
1152 | - if($authed && !$hashed) |
|
1152 | + if ($authed && !$hashed) |
|
1153 | 1153 | { |
1154 | 1154 | $this->updateFindAccountAnswer($member_srl, $find_account_answer); |
1155 | 1155 | } |
1156 | 1156 | |
1157 | - if($config->identifier == 'email_address') |
|
1157 | + if ($config->identifier == 'email_address') |
|
1158 | 1158 | { |
1159 | 1159 | $user_id = $email_address; |
1160 | 1160 | } |
@@ -1167,11 +1167,11 @@ discard block |
||
1167 | 1167 | $args->password = $temp_password; |
1168 | 1168 | $args->change_password_date = '1'; |
1169 | 1169 | $output = $this->updateMemberPassword($args); |
1170 | - if(!$output->toBool()) return $output; |
|
1170 | + if (!$output->toBool()) return $output; |
|
1171 | 1171 | |
1172 | - $_SESSION['xe_temp_password_' . $user_id] = $temp_password; |
|
1172 | + $_SESSION['xe_temp_password_'.$user_id] = $temp_password; |
|
1173 | 1173 | |
1174 | - $this->add('user_id',$user_id); |
|
1174 | + $this->add('user_id', $user_id); |
|
1175 | 1175 | |
1176 | 1176 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', ''); |
1177 | 1177 | $this->setRedirectUrl($returnUrl.'&user_id='.$user_id); |
@@ -1191,7 +1191,7 @@ discard block |
||
1191 | 1191 | $member_srl = Context::get('member_srl'); |
1192 | 1192 | $auth_key = Context::get('auth_key'); |
1193 | 1193 | |
1194 | - if(!$member_srl || !$auth_key) |
|
1194 | + if (!$member_srl || !$auth_key) |
|
1195 | 1195 | { |
1196 | 1196 | return $this->stop('msg_invalid_request'); |
1197 | 1197 | } |
@@ -1202,9 +1202,9 @@ discard block |
||
1202 | 1202 | $args->auth_key = $auth_key; |
1203 | 1203 | $output = executeQuery('member.getAuthMail', $args); |
1204 | 1204 | |
1205 | - if(!$output->toBool() || $output->data->auth_key != $auth_key) |
|
1205 | + if (!$output->toBool() || $output->data->auth_key != $auth_key) |
|
1206 | 1206 | { |
1207 | - if(strlen($output->data->auth_key) !== strlen($auth_key)) |
|
1207 | + if (strlen($output->data->auth_key) !== strlen($auth_key)) |
|
1208 | 1208 | { |
1209 | 1209 | executeQuery('member.deleteAuthMail', $args); |
1210 | 1210 | } |
@@ -1212,7 +1212,7 @@ discard block |
||
1212 | 1212 | return $this->stop('msg_invalid_auth_key'); |
1213 | 1213 | } |
1214 | 1214 | |
1215 | - if(ztime($output->data->regdate) < $_SERVER['REQUEST_TIME'] + zgap() - 86400) |
|
1215 | + if (ztime($output->data->regdate) < $_SERVER['REQUEST_TIME'] + zgap() - 86400) |
|
1216 | 1216 | { |
1217 | 1217 | executeQuery('member.deleteAuthMail', $args); |
1218 | 1218 | return $this->stop('msg_invalid_auth_key'); |
@@ -1221,7 +1221,7 @@ discard block |
||
1221 | 1221 | $args->password = $output->data->new_password; |
1222 | 1222 | |
1223 | 1223 | // If credentials are correct, change the password to a new one |
1224 | - if($output->data->is_register == 'Y') |
|
1224 | + if ($output->data->is_register == 'Y') |
|
1225 | 1225 | { |
1226 | 1226 | $args->denied = 'N'; |
1227 | 1227 | } |
@@ -1234,13 +1234,13 @@ discard block |
||
1234 | 1234 | $is_register = $output->data->is_register; |
1235 | 1235 | |
1236 | 1236 | $output = executeQuery('member.updateMemberPassword', $args); |
1237 | - if(!$output->toBool()) |
|
1237 | + if (!$output->toBool()) |
|
1238 | 1238 | { |
1239 | 1239 | return $this->stop($output->getMessage()); |
1240 | 1240 | } |
1241 | 1241 | |
1242 | 1242 | // Remove all values having the member_srl from authentication table |
1243 | - executeQuery('member.deleteAuthMail',$args); |
|
1243 | + executeQuery('member.deleteAuthMail', $args); |
|
1244 | 1244 | |
1245 | 1245 | $this->_clearMemberCache($args->member_srl); |
1246 | 1246 | |
@@ -1259,33 +1259,33 @@ discard block |
||
1259 | 1259 | { |
1260 | 1260 | // Get an email_address |
1261 | 1261 | $email_address = Context::get('email_address'); |
1262 | - if(!$email_address) return new Object(-1, 'msg_invalid_request'); |
|
1262 | + if (!$email_address) return new Object(-1, 'msg_invalid_request'); |
|
1263 | 1263 | // Log test by using email_address |
1264 | 1264 | $oMemberModel = getModel('member'); |
1265 | 1265 | |
1266 | 1266 | $args = new stdClass; |
1267 | 1267 | $args->email_address = $email_address; |
1268 | 1268 | $memberSrl = $oMemberModel->getMemberSrlByEmailAddress($email_address); |
1269 | - if(!$memberSrl) return new Object(-1, 'msg_not_exists_member'); |
|
1269 | + if (!$memberSrl) return new Object(-1, 'msg_not_exists_member'); |
|
1270 | 1270 | |
1271 | 1271 | $columnList = array('member_srl', 'user_id', 'user_name', 'nick_name', 'email_address'); |
1272 | 1272 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($memberSrl, 0, $columnList); |
1273 | 1273 | |
1274 | 1274 | $oModuleModel = getModel('module'); |
1275 | 1275 | $member_config = $oModuleModel->getModuleConfig('member'); |
1276 | - if(!$member_config->skin) $member_config->skin = "default"; |
|
1277 | - if(!$member_config->colorset) $member_config->colorset = "white"; |
|
1276 | + if (!$member_config->skin) $member_config->skin = "default"; |
|
1277 | + if (!$member_config->colorset) $member_config->colorset = "white"; |
|
1278 | 1278 | |
1279 | 1279 | // Check if a authentication mail has been sent previously |
1280 | 1280 | $chk_args = new stdClass; |
1281 | 1281 | $chk_args->member_srl = $member_info->member_srl; |
1282 | 1282 | $output = executeQuery('member.chkAuthMail', $chk_args); |
1283 | - if($output->toBool() && $output->data->count == '0') return new Object(-1, 'msg_invalid_request'); |
|
1283 | + if ($output->toBool() && $output->data->count == '0') return new Object(-1, 'msg_invalid_request'); |
|
1284 | 1284 | |
1285 | 1285 | $auth_args = new stdClass; |
1286 | 1286 | $auth_args->member_srl = $member_info->member_srl; |
1287 | 1287 | $output = executeQueryArray('member.getAuthMailInfo', $auth_args); |
1288 | - if(!$output->data || !$output->data[0]->auth_key) return new Object(-1, 'msg_invalid_request'); |
|
1288 | + if (!$output->data || !$output->data[0]->auth_key) return new Object(-1, 'msg_invalid_request'); |
|
1289 | 1289 | $auth_info = $output->data[0]; |
1290 | 1290 | |
1291 | 1291 | // Update the regdate of authmail entry |
@@ -1296,12 +1296,12 @@ discard block |
||
1296 | 1296 | |
1297 | 1297 | $memberInfo = array(); |
1298 | 1298 | global $lang; |
1299 | - if(is_array($member_config->signupForm)) |
|
1299 | + if (is_array($member_config->signupForm)) |
|
1300 | 1300 | { |
1301 | - $exceptForm=array('password', 'find_account_question'); |
|
1302 | - foreach($member_config->signupForm as $form) |
|
1301 | + $exceptForm = array('password', 'find_account_question'); |
|
1302 | + foreach ($member_config->signupForm as $form) |
|
1303 | 1303 | { |
1304 | - if(!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired)) |
|
1304 | + if (!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired)) |
|
1305 | 1305 | { |
1306 | 1306 | $memberInfo[$lang->{$form->name}] = $member_info->{$form->name}; |
1307 | 1307 | } |
@@ -1320,19 +1320,19 @@ discard block |
||
1320 | 1320 | Context::set('member_config', $member_config); |
1321 | 1321 | |
1322 | 1322 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
1323 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1323 | + if (!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1324 | 1324 | |
1325 | - $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$auth_info->auth_key); |
|
1325 | + $auth_url = getFullUrl('', 'module', 'member', 'act', 'procMemberAuthAccount', 'member_srl', $member_info->member_srl, 'auth_key', $auth_info->auth_key); |
|
1326 | 1326 | Context::set('auth_url', $auth_url); |
1327 | 1327 | |
1328 | 1328 | $oTemplate = &TemplateHandler::getInstance(); |
1329 | 1329 | $content = $oTemplate->compile($tpl_path, 'confirm_member_account_mail'); |
1330 | 1330 | // Send a mail |
1331 | 1331 | $oMail = new Mail(); |
1332 | - $oMail->setTitle( Context::getLang('msg_confirm_account_title') ); |
|
1332 | + $oMail->setTitle(Context::getLang('msg_confirm_account_title')); |
|
1333 | 1333 | $oMail->setContent($content); |
1334 | - $oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email); |
|
1335 | - $oMail->setReceiptor( $args->user_name, $args->email_address ); |
|
1334 | + $oMail->setSender($member_config->webmaster_name ? $member_config->webmaster_name : 'webmaster', $member_config->webmaster_email); |
|
1335 | + $oMail->setReceiptor($args->user_name, $args->email_address); |
|
1336 | 1336 | $oMail->send(); |
1337 | 1337 | |
1338 | 1338 | $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $args->email_address); |
@@ -1347,23 +1347,23 @@ discard block |
||
1347 | 1347 | $memberInfo = $_SESSION['auth_member_info']; |
1348 | 1348 | unset($_SESSION['auth_member_info']); |
1349 | 1349 | |
1350 | - if(!$memberInfo) |
|
1350 | + if (!$memberInfo) |
|
1351 | 1351 | { |
1352 | 1352 | return $this->stop('msg_invalid_request'); |
1353 | 1353 | } |
1354 | 1354 | |
1355 | 1355 | $newEmail = Context::get('email_address'); |
1356 | 1356 | |
1357 | - if(!$newEmail) |
|
1357 | + if (!$newEmail) |
|
1358 | 1358 | { |
1359 | 1359 | return $this->stop('msg_invalid_request'); |
1360 | 1360 | } |
1361 | 1361 | |
1362 | 1362 | $oMemberModel = getModel('member'); |
1363 | 1363 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail); |
1364 | - if($member_srl) |
|
1364 | + if ($member_srl) |
|
1365 | 1365 | { |
1366 | - return new Object(-1,'msg_exists_email_address'); |
|
1366 | + return new Object(-1, 'msg_exists_email_address'); |
|
1367 | 1367 | } |
1368 | 1368 | |
1369 | 1369 | // remove all key by member_srl |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | $args->member_srl = $memberInfo->member_srl; |
1372 | 1372 | $output = executeQuery('member.deleteAuthMail', $args); |
1373 | 1373 | |
1374 | - if(!$output->toBool()) |
|
1374 | + if (!$output->toBool()) |
|
1375 | 1375 | { |
1376 | 1376 | return $output; |
1377 | 1377 | } |
@@ -1381,7 +1381,7 @@ discard block |
||
1381 | 1381 | list($args->email_id, $args->email_host) = explode('@', $newEmail); |
1382 | 1382 | |
1383 | 1383 | $output = executeQuery('member.updateMemberEmailAddress', $args); |
1384 | - if(!$output->toBool()) |
|
1384 | + if (!$output->toBool()) |
|
1385 | 1385 | { |
1386 | 1386 | return $this->stop($output->getMessage()); |
1387 | 1387 | } |
@@ -1398,7 +1398,7 @@ discard block |
||
1398 | 1398 | $auth_args->is_register = 'Y'; |
1399 | 1399 | |
1400 | 1400 | $output = executeQuery('member.insertAuthMail', $auth_args); |
1401 | - if(!$output->toBool()) return $output; |
|
1401 | + if (!$output->toBool()) return $output; |
|
1402 | 1402 | |
1403 | 1403 | $memberInfo->email_address = $newEmail; |
1404 | 1404 | |
@@ -1422,12 +1422,12 @@ discard block |
||
1422 | 1422 | $memberInfo = array(); |
1423 | 1423 | |
1424 | 1424 | global $lang; |
1425 | - if(is_array($member_config->signupForm)) |
|
1425 | + if (is_array($member_config->signupForm)) |
|
1426 | 1426 | { |
1427 | - $exceptForm=array('password', 'find_account_question'); |
|
1428 | - foreach($member_config->signupForm as $form) |
|
1427 | + $exceptForm = array('password', 'find_account_question'); |
|
1428 | + foreach ($member_config->signupForm as $form) |
|
1429 | 1429 | { |
1430 | - if(!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired)) |
|
1430 | + if (!in_array($form->name, $exceptForm) && $form->isDefaultForm && ($form->required || $form->mustRequired)) |
|
1431 | 1431 | { |
1432 | 1432 | $memberInfo[$lang->{$form->name}] = $member_info->{$form->name}; |
1433 | 1433 | } |
@@ -1442,25 +1442,25 @@ discard block |
||
1442 | 1442 | } |
1443 | 1443 | Context::set('memberInfo', $memberInfo); |
1444 | 1444 | |
1445 | - if(!$member_config->skin) $member_config->skin = "default"; |
|
1446 | - if(!$member_config->colorset) $member_config->colorset = "white"; |
|
1445 | + if (!$member_config->skin) $member_config->skin = "default"; |
|
1446 | + if (!$member_config->colorset) $member_config->colorset = "white"; |
|
1447 | 1447 | |
1448 | 1448 | Context::set('member_config', $member_config); |
1449 | 1449 | |
1450 | 1450 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
1451 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1451 | + if (!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1452 | 1452 | |
1453 | - $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$auth_args->auth_key); |
|
1453 | + $auth_url = getFullUrl('', 'module', 'member', 'act', 'procMemberAuthAccount', 'member_srl', $member_info->member_srl, 'auth_key', $auth_args->auth_key); |
|
1454 | 1454 | Context::set('auth_url', $auth_url); |
1455 | 1455 | |
1456 | 1456 | $oTemplate = &TemplateHandler::getInstance(); |
1457 | 1457 | $content = $oTemplate->compile($tpl_path, 'confirm_member_account_mail'); |
1458 | 1458 | // Send a mail |
1459 | 1459 | $oMail = new Mail(); |
1460 | - $oMail->setTitle( Context::getLang('msg_confirm_account_title') ); |
|
1460 | + $oMail->setTitle(Context::getLang('msg_confirm_account_title')); |
|
1461 | 1461 | $oMail->setContent($content); |
1462 | - $oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email); |
|
1463 | - $oMail->setReceiptor( $member_info->user_name, $member_info->email_address ); |
|
1462 | + $oMail->setSender($member_config->webmaster_name ? $member_config->webmaster_name : 'webmaster', $member_config->webmaster_email); |
|
1463 | + $oMail->setReceiptor($member_info->user_name, $member_info->email_address); |
|
1464 | 1464 | $oMail->send(); |
1465 | 1465 | } |
1466 | 1466 | |
@@ -1473,7 +1473,7 @@ discard block |
||
1473 | 1473 | { |
1474 | 1474 | $site_module_info = Context::get('site_module_info'); |
1475 | 1475 | $logged_info = Context::get('logged_info'); |
1476 | - if(!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list) ) return new Object(-1,'msg_invalid_request'); |
|
1476 | + if (!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list)) return new Object(-1, 'msg_invalid_request'); |
|
1477 | 1477 | |
1478 | 1478 | $oMemberModel = getModel('member'); |
1479 | 1479 | $columnList = array('site_srl', 'group_srl', 'title'); |
@@ -1492,13 +1492,13 @@ discard block |
||
1492 | 1492 | { |
1493 | 1493 | $site_module_info = Context::get('site_module_info'); |
1494 | 1494 | $logged_info = Context::get('logged_info'); |
1495 | - if(!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list) ) return new Object(-1,'msg_invalid_request'); |
|
1495 | + if (!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list)) return new Object(-1, 'msg_invalid_request'); |
|
1496 | 1496 | |
1497 | 1497 | $args = new stdClass; |
1498 | - $args->site_srl= $site_module_info->site_srl; |
|
1498 | + $args->site_srl = $site_module_info->site_srl; |
|
1499 | 1499 | $args->member_srl = $logged_info->member_srl; |
1500 | 1500 | $output = executeQuery('member.deleteMembersGroup', $args); |
1501 | - if(!$output->toBool()) return $output; |
|
1501 | + if (!$output->toBool()) return $output; |
|
1502 | 1502 | $this->setMessage('success_deleted'); |
1503 | 1503 | $this->_clearMemberCache($args->member_srl, $site_module_info->site_srl); |
1504 | 1504 | } |
@@ -1512,25 +1512,25 @@ discard block |
||
1512 | 1512 | */ |
1513 | 1513 | function setMemberConfig($args) |
1514 | 1514 | { |
1515 | - if(!$args->skin) $args->skin = "default"; |
|
1516 | - if(!$args->colorset) $args->colorset = "white"; |
|
1517 | - if(!$args->editor_skin) $args->editor_skin= "ckeditor"; |
|
1518 | - if(!$args->editor_colorset) $args->editor_colorset = "moono"; |
|
1519 | - if($args->enable_join!='Y') $args->enable_join = 'N'; |
|
1520 | - $args->enable_openid= 'N'; |
|
1521 | - if($args->profile_image !='Y') $args->profile_image = 'N'; |
|
1522 | - if($args->image_name!='Y') $args->image_name = 'N'; |
|
1523 | - if($args->image_mark!='Y') $args->image_mark = 'N'; |
|
1524 | - if($args->group_image_mark!='Y') $args->group_image_mark = 'N'; |
|
1525 | - if(!trim(strip_tags($args->agreement))) $args->agreement = null; |
|
1526 | - $args->limit_day = (int)$args->limit_day; |
|
1515 | + if (!$args->skin) $args->skin = "default"; |
|
1516 | + if (!$args->colorset) $args->colorset = "white"; |
|
1517 | + if (!$args->editor_skin) $args->editor_skin = "ckeditor"; |
|
1518 | + if (!$args->editor_colorset) $args->editor_colorset = "moono"; |
|
1519 | + if ($args->enable_join != 'Y') $args->enable_join = 'N'; |
|
1520 | + $args->enable_openid = 'N'; |
|
1521 | + if ($args->profile_image != 'Y') $args->profile_image = 'N'; |
|
1522 | + if ($args->image_name != 'Y') $args->image_name = 'N'; |
|
1523 | + if ($args->image_mark != 'Y') $args->image_mark = 'N'; |
|
1524 | + if ($args->group_image_mark != 'Y') $args->group_image_mark = 'N'; |
|
1525 | + if (!trim(strip_tags($args->agreement))) $args->agreement = null; |
|
1526 | + $args->limit_day = (int) $args->limit_day; |
|
1527 | 1527 | |
1528 | 1528 | $agreement = trim($args->agreement); |
1529 | 1529 | unset($args->agreement); |
1530 | 1530 | |
1531 | 1531 | $oModuleController = getController('module'); |
1532 | - $output = $oModuleController->insertModuleConfig('member',$args); |
|
1533 | - if(!$output->toBool()) return $output; |
|
1532 | + $output = $oModuleController->insertModuleConfig('member', $args); |
|
1533 | + if (!$output->toBool()) return $output; |
|
1534 | 1534 | |
1535 | 1535 | $agreement_file = _XE_PATH_.'files/member_extra_info/agreement.txt'; |
1536 | 1536 | FileHandler::writeFile($agreement_file, $agreement); |
@@ -1551,11 +1551,11 @@ discard block |
||
1551 | 1551 | $signature = trim(removeHackTag($signature)); |
1552 | 1552 | $signature = preg_replace('/<(\/?)(embed|object|param)/is', '<$1$2', $signature); |
1553 | 1553 | |
1554 | - $check_signature = trim(str_replace(array(' ',"\n","\r"), '', strip_tags($signature, '<img><object>'))); |
|
1554 | + $check_signature = trim(str_replace(array(' ', "\n", "\r"), '', strip_tags($signature, '<img><object>'))); |
|
1555 | 1555 | $path = sprintf('files/member_extra_info/signature/%s/', getNumberingPath($member_srl)); |
1556 | 1556 | $filename = sprintf('%s%d.signature.php', $path, $member_srl); |
1557 | 1557 | |
1558 | - if(!$check_signature) return FileHandler::removeFile($filename); |
|
1558 | + if (!$check_signature) return FileHandler::removeFile($filename); |
|
1559 | 1559 | |
1560 | 1560 | $buff = sprintf('<?php if(!defined("__XE__")) exit();?>%s', $signature); |
1561 | 1561 | FileHandler::makeDir($path); |
@@ -1584,15 +1584,15 @@ discard block |
||
1584 | 1584 | * |
1585 | 1585 | * @return Object |
1586 | 1586 | */ |
1587 | - function addMemberToGroup($member_srl, $group_srl, $site_srl=0) |
|
1587 | + function addMemberToGroup($member_srl, $group_srl, $site_srl = 0) |
|
1588 | 1588 | { |
1589 | 1589 | $args = new stdClass(); |
1590 | 1590 | $args->member_srl = $member_srl; |
1591 | 1591 | $args->group_srl = $group_srl; |
1592 | - if($site_srl) $args->site_srl = $site_srl; |
|
1592 | + if ($site_srl) $args->site_srl = $site_srl; |
|
1593 | 1593 | |
1594 | 1594 | // Add |
1595 | - $output = executeQuery('member.addMemberToGroup',$args); |
|
1595 | + $output = executeQuery('member.addMemberToGroup', $args); |
|
1596 | 1596 | $output2 = ModuleHandler::triggerCall('member.addMemberToGroup', 'after', $args); |
1597 | 1597 | |
1598 | 1598 | $this->_clearMemberCache($member_srl, $site_srl); |
@@ -1612,18 +1612,18 @@ discard block |
||
1612 | 1612 | { |
1613 | 1613 | $obj = new stdClass; |
1614 | 1614 | $obj->site_srl = $args->site_srl; |
1615 | - $obj->member_srl = implode(',',$args->member_srl); |
|
1615 | + $obj->member_srl = implode(',', $args->member_srl); |
|
1616 | 1616 | |
1617 | 1617 | $output = executeQueryArray('member.getMembersGroup', $obj); |
1618 | - if($output->data) foreach($output->data as $key => $val) $date[$val->member_srl] = $val->regdate; |
|
1618 | + if ($output->data) foreach ($output->data as $key => $val) $date[$val->member_srl] = $val->regdate; |
|
1619 | 1619 | |
1620 | 1620 | $output = executeQuery('member.deleteMembersGroup', $obj); |
1621 | - if(!$output->toBool()) return $output; |
|
1621 | + if (!$output->toBool()) return $output; |
|
1622 | 1622 | |
1623 | 1623 | $inserted_members = array(); |
1624 | - foreach($args->member_srl as $key => $val) |
|
1624 | + foreach ($args->member_srl as $key => $val) |
|
1625 | 1625 | { |
1626 | - if($inserted_members[$val]) continue; |
|
1626 | + if ($inserted_members[$val]) continue; |
|
1627 | 1627 | $inserted_members[$val] = true; |
1628 | 1628 | |
1629 | 1629 | unset($obj); |
@@ -1633,7 +1633,7 @@ discard block |
||
1633 | 1633 | $obj->site_srl = $args->site_srl; |
1634 | 1634 | $obj->regdate = $date[$obj->member_srl]; |
1635 | 1635 | $output = executeQuery('member.addMemberToGroup', $obj); |
1636 | - if(!$output->toBool()) return $output; |
|
1636 | + if (!$output->toBool()) return $output; |
|
1637 | 1637 | |
1638 | 1638 | $this->_clearMemberCache($obj->member_srl, $args->site_srl); |
1639 | 1639 | } |
@@ -1655,9 +1655,9 @@ discard block |
||
1655 | 1655 | // Get information of the key |
1656 | 1656 | $output = executeQuery('member.getAutologin', $args); |
1657 | 1657 | // If no information exists, delete a cookie |
1658 | - if(!$output->toBool() || !$output->data) |
|
1658 | + if (!$output->toBool() || !$output->data) |
|
1659 | 1659 | { |
1660 | - setCookie('xeak',null,$_SERVER['REQUEST_TIME']+60*60*24*365); |
|
1660 | + setCookie('xeak', null, $_SERVER['REQUEST_TIME'] + 60 * 60 * 24 * 365); |
|
1661 | 1661 | return; |
1662 | 1662 | } |
1663 | 1663 | |
@@ -1667,9 +1667,9 @@ discard block |
||
1667 | 1667 | $user_id = ($config->identifier == 'user_id') ? $output->data->user_id : $output->data->email_address; |
1668 | 1668 | $password = $output->data->password; |
1669 | 1669 | |
1670 | - if(!$user_id || !$password) |
|
1670 | + if (!$user_id || !$password) |
|
1671 | 1671 | { |
1672 | - setCookie('xeak',null,$_SERVER['REQUEST_TIME']+60*60*24*365); |
|
1672 | + setCookie('xeak', null, $_SERVER['REQUEST_TIME'] + 60 * 60 * 24 * 365); |
|
1673 | 1673 | return; |
1674 | 1674 | } |
1675 | 1675 | |
@@ -1679,7 +1679,7 @@ discard block |
||
1679 | 1679 | $check_key = strtolower($user_id).$password.$_SERVER['HTTP_USER_AGENT']; |
1680 | 1680 | $check_key = substr(hash_hmac('sha256', $check_key, substr($args->autologin_key, 0, 32)), 0, 32); |
1681 | 1681 | |
1682 | - if($check_key === substr($args->autologin_key, 32)) |
|
1682 | + if ($check_key === substr($args->autologin_key, 32)) |
|
1683 | 1683 | { |
1684 | 1684 | // Check change_password_date |
1685 | 1685 | $oModuleModel = getModel('module'); |
@@ -1687,12 +1687,12 @@ discard block |
||
1687 | 1687 | $limit_date = $member_config->change_password_date; |
1688 | 1688 | |
1689 | 1689 | // Check if change_password_date is set |
1690 | - if($limit_date > 0) |
|
1690 | + if ($limit_date > 0) |
|
1691 | 1691 | { |
1692 | 1692 | $oMemberModel = getModel('member'); |
1693 | 1693 | $columnList = array('member_srl', 'change_password_date'); |
1694 | 1694 | |
1695 | - if($config->identifier == 'user_id') |
|
1695 | + if ($config->identifier == 'user_id') |
|
1696 | 1696 | { |
1697 | 1697 | $member_info = $oMemberModel->getMemberInfoByUserID($user_id, $columnList); |
1698 | 1698 | } |
@@ -1701,7 +1701,7 @@ discard block |
||
1701 | 1701 | $member_info = $oMemberModel->getMemberInfoByEmailAddress($user_id, $columnList); |
1702 | 1702 | } |
1703 | 1703 | |
1704 | - if($member_info->change_password_date >= date('YmdHis', strtotime('-'.$limit_date.' day')) ){ |
|
1704 | + if ($member_info->change_password_date >= date('YmdHis', strtotime('-'.$limit_date.' day'))) { |
|
1705 | 1705 | $do_auto_login = true; |
1706 | 1706 | } |
1707 | 1707 | |
@@ -1712,14 +1712,14 @@ discard block |
||
1712 | 1712 | } |
1713 | 1713 | } |
1714 | 1714 | |
1715 | - if($do_auto_login) |
|
1715 | + if ($do_auto_login) |
|
1716 | 1716 | { |
1717 | 1717 | $output = $this->doLogin($user_id); |
1718 | 1718 | } |
1719 | 1719 | else |
1720 | 1720 | { |
1721 | 1721 | executeQuery('member.deleteAutologin', $args); |
1722 | - setCookie('xeak',null,$_SERVER['REQUEST_TIME']+60*60*24*365); |
|
1722 | + setCookie('xeak', null, $_SERVER['REQUEST_TIME'] + 60 * 60 * 24 * 365); |
|
1723 | 1723 | } |
1724 | 1724 | } |
1725 | 1725 | |
@@ -1735,13 +1735,13 @@ discard block |
||
1735 | 1735 | function doLogin($user_id, $password = '', $keep_signed = false) |
1736 | 1736 | { |
1737 | 1737 | $user_id = strtolower($user_id); |
1738 | - if(!$user_id) return new Object(-1, 'null_user_id'); |
|
1738 | + if (!$user_id) return new Object(-1, 'null_user_id'); |
|
1739 | 1739 | // Call a trigger before log-in (before) |
1740 | 1740 | $trigger_obj = new stdClass(); |
1741 | 1741 | $trigger_obj->user_id = $user_id; |
1742 | 1742 | $trigger_obj->password = $password; |
1743 | 1743 | $trigger_output = ModuleHandler::triggerCall('member.doLogin', 'before', $trigger_obj); |
1744 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
1744 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
1745 | 1745 | // Create a member model object |
1746 | 1746 | $oMemberModel = getModel('member'); |
1747 | 1747 | |
@@ -1751,12 +1751,12 @@ discard block |
||
1751 | 1751 | $args->ipaddress = $_SERVER['REMOTE_ADDR']; |
1752 | 1752 | |
1753 | 1753 | // check identifier |
1754 | - if($config->identifier == 'email_address') |
|
1754 | + if ($config->identifier == 'email_address') |
|
1755 | 1755 | { |
1756 | 1756 | // Get user_id information |
1757 | 1757 | $this->memberInfo = $oMemberModel->getMemberInfoByEmailAddress($user_id); |
1758 | 1758 | // Set an invalid user if no value returned |
1759 | - if(!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) return $this->recordLoginError(-1, 'invalid_email_address'); |
|
1759 | + if (!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) return $this->recordLoginError(-1, 'invalid_email_address'); |
|
1760 | 1760 | |
1761 | 1761 | } |
1762 | 1762 | else |
@@ -1764,24 +1764,24 @@ discard block |
||
1764 | 1764 | // Get user_id information |
1765 | 1765 | $this->memberInfo = $oMemberModel->getMemberInfoByUserID($user_id); |
1766 | 1766 | // Set an invalid user if no value returned |
1767 | - if(!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) return $this->recordLoginError(-1, 'invalid_user_id'); |
|
1767 | + if (!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) return $this->recordLoginError(-1, 'invalid_user_id'); |
|
1768 | 1768 | } |
1769 | 1769 | |
1770 | 1770 | $output = executeQuery('member.getLoginCountByIp', $args); |
1771 | 1771 | $errorCount = $output->data->count; |
1772 | - if($errorCount >= $config->max_error_count) |
|
1772 | + if ($errorCount >= $config->max_error_count) |
|
1773 | 1773 | { |
1774 | 1774 | $last_update = strtotime($output->data->last_update); |
1775 | - $term = intval($_SERVER['REQUEST_TIME']-$last_update); |
|
1776 | - if($term < $config->max_error_count_time) |
|
1775 | + $term = intval($_SERVER['REQUEST_TIME'] - $last_update); |
|
1776 | + if ($term < $config->max_error_count_time) |
|
1777 | 1777 | { |
1778 | 1778 | $term = $config->max_error_count_time - $term; |
1779 | - if($term < 60) $term = intval($term).Context::getLang('unit_sec'); |
|
1780 | - elseif(60 <= $term && $term < 3600) $term = intval($term/60).Context::getLang('unit_min'); |
|
1781 | - elseif(3600 <= $term && $term < 86400) $term = intval($term/3600).Context::getLang('unit_hour'); |
|
1782 | - else $term = intval($term/86400).Context::getLang('unit_day'); |
|
1779 | + if ($term < 60) $term = intval($term).Context::getLang('unit_sec'); |
|
1780 | + elseif (60 <= $term && $term < 3600) $term = intval($term / 60).Context::getLang('unit_min'); |
|
1781 | + elseif (3600 <= $term && $term < 86400) $term = intval($term / 3600).Context::getLang('unit_hour'); |
|
1782 | + else $term = intval($term / 86400).Context::getLang('unit_day'); |
|
1783 | 1783 | |
1784 | - return new Object(-1, sprintf(Context::getLang('excess_ip_access_count'),$term)); |
|
1784 | + return new Object(-1, sprintf(Context::getLang('excess_ip_access_count'), $term)); |
|
1785 | 1785 | } |
1786 | 1786 | else |
1787 | 1787 | { |
@@ -1791,13 +1791,13 @@ discard block |
||
1791 | 1791 | } |
1792 | 1792 | |
1793 | 1793 | // Password Check |
1794 | - if($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password, $this->memberInfo->member_srl)) |
|
1794 | + if ($password && !$oMemberModel->isValidPassword($this->memberInfo->password, $password, $this->memberInfo->member_srl)) |
|
1795 | 1795 | { |
1796 | - return $this->recordMemberLoginError(-1, 'invalid_password',$this->memberInfo); |
|
1796 | + return $this->recordMemberLoginError(-1, 'invalid_password', $this->memberInfo); |
|
1797 | 1797 | } |
1798 | 1798 | |
1799 | 1799 | // If denied == 'Y', notify |
1800 | - if($this->memberInfo->denied == 'Y') |
|
1800 | + if ($this->memberInfo->denied == 'Y') |
|
1801 | 1801 | { |
1802 | 1802 | $args->member_srl = $this->memberInfo->member_srl; |
1803 | 1803 | $output = executeQuery('member.chkAuthMail', $args); |
@@ -1805,12 +1805,12 @@ discard block |
||
1805 | 1805 | { |
1806 | 1806 | $_SESSION['auth_member_srl'] = $this->memberInfo->member_srl; |
1807 | 1807 | $redirectUrl = getUrl('', 'act', 'dispMemberResendAuthMail'); |
1808 | - return $this->setRedirectUrl($redirectUrl, new Object(-1,'msg_user_not_confirmed')); |
|
1808 | + return $this->setRedirectUrl($redirectUrl, new Object(-1, 'msg_user_not_confirmed')); |
|
1809 | 1809 | } |
1810 | - return new Object(-1,'msg_user_denied'); |
|
1810 | + return new Object(-1, 'msg_user_denied'); |
|
1811 | 1811 | } |
1812 | 1812 | // Notify if denied_date is less than the current time |
1813 | - if($this->memberInfo->limit_date && substr($this->memberInfo->limit_date,0,8) >= date("Ymd")) return new Object(-9,sprintf(Context::getLang('msg_user_limited'),zdate($this->memberInfo->limit_date,"Y-m-d"))); |
|
1813 | + if ($this->memberInfo->limit_date && substr($this->memberInfo->limit_date, 0, 8) >= date("Ymd")) return new Object(-9, sprintf(Context::getLang('msg_user_limited'), zdate($this->memberInfo->limit_date, "Y-m-d"))); |
|
1814 | 1814 | // Update the latest login time |
1815 | 1815 | $args->member_srl = $this->memberInfo->member_srl; |
1816 | 1816 | $output = executeQuery('member.updateLastLogin', $args); |
@@ -1820,36 +1820,36 @@ discard block |
||
1820 | 1820 | |
1821 | 1821 | // Check if there is recoding table. |
1822 | 1822 | $oDB = &DB::getInstance(); |
1823 | - if($oDB->isTableExists('member_count_history') && $config->enable_login_fail_report != 'N') |
|
1823 | + if ($oDB->isTableExists('member_count_history') && $config->enable_login_fail_report != 'N') |
|
1824 | 1824 | { |
1825 | 1825 | // check if there is login fail records. |
1826 | 1826 | $output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args); |
1827 | - if($output->data && $output->data->content) |
|
1827 | + if ($output->data && $output->data->content) |
|
1828 | 1828 | { |
1829 | 1829 | $title = Context::getLang('login_fail_report'); |
1830 | 1830 | $message = '<ul>'; |
1831 | 1831 | $content = unserialize($output->data->content); |
1832 | - if(count($content) > $config->max_error_count) |
|
1832 | + if (count($content) > $config->max_error_count) |
|
1833 | 1833 | { |
1834 | - foreach($content as $val) |
|
1834 | + foreach ($content as $val) |
|
1835 | 1835 | { |
1836 | - $message .= '<li>'.Context::getLang('regdate').': '.date('Y-m-d h:i:sa',$val[2]).'<ul><li>'.Context::getLang('ipaddress').': '.$val[0].'</li><li>'.Context::getLang('message').': '.$val[1].'</li></ul></li>'; |
|
1836 | + $message .= '<li>'.Context::getLang('regdate').': '.date('Y-m-d h:i:sa', $val[2]).'<ul><li>'.Context::getLang('ipaddress').': '.$val[0].'</li><li>'.Context::getLang('message').': '.$val[1].'</li></ul></li>'; |
|
1837 | 1837 | } |
1838 | 1838 | $message .= '</ul>'; |
1839 | - $content = sprintf(Context::getLang('login_fail_report_contents'),$message,date('Y-m-d h:i:sa')); |
|
1839 | + $content = sprintf(Context::getLang('login_fail_report_contents'), $message, date('Y-m-d h:i:sa')); |
|
1840 | 1840 | |
1841 | 1841 | //send message |
1842 | 1842 | $oCommunicationController = getController('communication'); |
1843 | 1843 | $oCommunicationController->sendMessage($args->member_srl, $args->member_srl, $title, $content, true); |
1844 | 1844 | |
1845 | - if($this->memberInfo->email_address && $this->memberInfo->allow_mailing == 'Y') |
|
1845 | + if ($this->memberInfo->email_address && $this->memberInfo->allow_mailing == 'Y') |
|
1846 | 1846 | { |
1847 | 1847 | $view_url = Context::getRequestUri(); |
1848 | - $content = sprintf("%s<hr /><p>From: <a href=\"%s\" target=\"_blank\">%s</a><br />To: %s(%s)</p>",$content, $view_url, $view_url, $this->memberInfo->nick_name, $this->memberInfo->email_id); |
|
1848 | + $content = sprintf("%s<hr /><p>From: <a href=\"%s\" target=\"_blank\">%s</a><br />To: %s(%s)</p>", $content, $view_url, $view_url, $this->memberInfo->nick_name, $this->memberInfo->email_id); |
|
1849 | 1849 | $oMail = new Mail(); |
1850 | 1850 | $oMail->setTitle($title); |
1851 | 1851 | $oMail->setContent($content); |
1852 | - $oMail->setSender($config->webmaster_name?$config->webmaster_name:'webmaster', $config->webmaster_email); |
|
1852 | + $oMail->setSender($config->webmaster_name ? $config->webmaster_name : 'webmaster', $config->webmaster_email); |
|
1853 | 1853 | $oMail->setReceiptor($this->memberInfo->email_id.'('.$this->memberInfo->nick_name.')', $this->memberInfo->email_address); |
1854 | 1854 | $oMail->send(); |
1855 | 1855 | } |
@@ -1859,9 +1859,9 @@ discard block |
||
1859 | 1859 | } |
1860 | 1860 | // Call a trigger after successfully log-in (after) |
1861 | 1861 | $trigger_output = ModuleHandler::triggerCall('member.doLogin', 'after', $this->memberInfo); |
1862 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
1862 | + if (!$trigger_output->toBool()) return $trigger_output; |
|
1863 | 1863 | // When user checked to use auto-login |
1864 | - if($keep_signed) |
|
1864 | + if ($keep_signed) |
|
1865 | 1865 | { |
1866 | 1866 | // Key generate for auto login |
1867 | 1867 | $oPassword = new Password(); |
@@ -1873,12 +1873,12 @@ discard block |
||
1873 | 1873 | $autologin_args->member_srl = $this->memberInfo->member_srl; |
1874 | 1874 | executeQuery('member.deleteAutologin', $autologin_args); |
1875 | 1875 | $autologin_output = executeQuery('member.insertAutologin', $autologin_args); |
1876 | - if($autologin_output->toBool()) setCookie('xeak',$autologin_args->autologin_key, $_SERVER['REQUEST_TIME']+31536000); |
|
1876 | + if ($autologin_output->toBool()) setCookie('xeak', $autologin_args->autologin_key, $_SERVER['REQUEST_TIME'] + 31536000); |
|
1877 | 1877 | } |
1878 | - if($this->memberInfo->is_admin == 'Y') |
|
1878 | + if ($this->memberInfo->is_admin == 'Y') |
|
1879 | 1879 | { |
1880 | 1880 | $oMemberAdminModel = getAdminModel('member'); |
1881 | - if(!$oMemberAdminModel->getMemberAdminIPCheck()) |
|
1881 | + if (!$oMemberAdminModel->getMemberAdminIPCheck()) |
|
1882 | 1882 | { |
1883 | 1883 | $_SESSION['denied_admin'] = 'Y'; |
1884 | 1884 | } |
@@ -1896,18 +1896,18 @@ discard block |
||
1896 | 1896 | { |
1897 | 1897 | $oMemberModel = getModel('member'); |
1898 | 1898 | // If your information came through the current session information to extract information from the users |
1899 | - if(!$this->memberInfo && $_SESSION['member_srl'] && $oMemberModel->isLogged() ) |
|
1899 | + if (!$this->memberInfo && $_SESSION['member_srl'] && $oMemberModel->isLogged()) |
|
1900 | 1900 | { |
1901 | 1901 | $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($_SESSION['member_srl']); |
1902 | 1902 | // If you do not destroy the session Profile |
1903 | - if($this->memberInfo->member_srl != $_SESSION['member_srl']) |
|
1903 | + if ($this->memberInfo->member_srl != $_SESSION['member_srl']) |
|
1904 | 1904 | { |
1905 | 1905 | $this->destroySessionInfo(); |
1906 | 1906 | return; |
1907 | 1907 | } |
1908 | 1908 | } |
1909 | 1909 | // Stop using the session id is destroyed |
1910 | - if($this->memberInfo->denied=='Y') |
|
1910 | + if ($this->memberInfo->denied == 'Y') |
|
1911 | 1911 | { |
1912 | 1912 | $this->destroySessionInfo(); |
1913 | 1913 | return; |
@@ -1937,10 +1937,10 @@ discard block |
||
1937 | 1937 | Context::set('logged_info', $this->memberInfo); |
1938 | 1938 | |
1939 | 1939 | // Only the menu configuration of the user (such as an add-on to the menu can be changed) |
1940 | - $this->addMemberMenu( 'dispMemberInfo', 'cmd_view_member_info'); |
|
1941 | - $this->addMemberMenu( 'dispMemberScrappedDocument', 'cmd_view_scrapped_document'); |
|
1942 | - $this->addMemberMenu( 'dispMemberSavedDocument', 'cmd_view_saved_document'); |
|
1943 | - $this->addMemberMenu( 'dispMemberOwnDocument', 'cmd_view_own_document'); |
|
1940 | + $this->addMemberMenu('dispMemberInfo', 'cmd_view_member_info'); |
|
1941 | + $this->addMemberMenu('dispMemberScrappedDocument', 'cmd_view_scrapped_document'); |
|
1942 | + $this->addMemberMenu('dispMemberSavedDocument', 'cmd_view_saved_document'); |
|
1943 | + $this->addMemberMenu('dispMemberOwnDocument', 'cmd_view_own_document'); |
|
1944 | 1944 | } |
1945 | 1945 | |
1946 | 1946 | /** |
@@ -1962,7 +1962,7 @@ discard block |
||
1962 | 1962 | function addMemberPopupMenu($url, $str, $icon = '', $target = 'self') |
1963 | 1963 | { |
1964 | 1964 | $member_popup_menu_list = Context::get('member_popup_menu_list'); |
1965 | - if(!is_array($member_popup_menu_list)) $member_popup_menu_list = array(); |
|
1965 | + if (!is_array($member_popup_menu_list)) $member_popup_menu_list = array(); |
|
1966 | 1966 | |
1967 | 1967 | $obj = new stdClass; |
1968 | 1968 | $obj->url = $url; |
@@ -1981,33 +1981,33 @@ discard block |
||
1981 | 1981 | { |
1982 | 1982 | // Call a trigger (before) |
1983 | 1983 | $output = ModuleHandler::triggerCall('member.insertMember', 'before', $args); |
1984 | - if(!$output->toBool()) return $output; |
|
1984 | + if (!$output->toBool()) return $output; |
|
1985 | 1985 | // Terms and Conditions portion of the information set up by members reaffirmed |
1986 | 1986 | $oModuleModel = getModel('module'); |
1987 | 1987 | $config = $oModuleModel->getModuleConfig('member'); |
1988 | 1988 | |
1989 | 1989 | $logged_info = Context::get('logged_info'); |
1990 | 1990 | // If the date of the temporary restrictions limit further information on the date of |
1991 | - if($config->limit_day) $args->limit_date = date("YmdHis", $_SERVER['REQUEST_TIME']+$config->limit_day*60*60*24); |
|
1991 | + if ($config->limit_day) $args->limit_date = date("YmdHis", $_SERVER['REQUEST_TIME'] + $config->limit_day * 60 * 60 * 24); |
|
1992 | 1992 | |
1993 | 1993 | $args->member_srl = getNextSequence(); |
1994 | 1994 | $args->list_order = -1 * $args->member_srl; |
1995 | 1995 | |
1996 | 1996 | // Execute insert or update depending on the value of member_srl |
1997 | - if(!$args->user_id) $args->user_id = 't'.$args->member_srl; |
|
1997 | + if (!$args->user_id) $args->user_id = 't'.$args->member_srl; |
|
1998 | 1998 | // Enter the user's identity changed to lowercase |
1999 | 1999 | else $args->user_id = strtolower($args->user_id); |
2000 | - if(!$args->user_name) $args->user_name = $args->member_srl; |
|
2001 | - if(!$args->nick_name) $args->nick_name = $args->member_srl; |
|
2000 | + if (!$args->user_name) $args->user_name = $args->member_srl; |
|
2001 | + if (!$args->nick_name) $args->nick_name = $args->member_srl; |
|
2002 | 2002 | |
2003 | 2003 | // Control of essential parameters |
2004 | - if($args->allow_mailing!='Y') $args->allow_mailing = 'N'; |
|
2005 | - if($args->denied!='Y') $args->denied = 'N'; |
|
2006 | - if(!$args->allow_message || ($args->allow_message && !in_array($args->allow_message, array('Y','N','F')))) $args->allow_message = 'Y'; |
|
2004 | + if ($args->allow_mailing != 'Y') $args->allow_mailing = 'N'; |
|
2005 | + if ($args->denied != 'Y') $args->denied = 'N'; |
|
2006 | + if (!$args->allow_message || ($args->allow_message && !in_array($args->allow_message, array('Y', 'N', 'F')))) $args->allow_message = 'Y'; |
|
2007 | 2007 | |
2008 | - if($logged_info->is_admin == 'Y') |
|
2008 | + if ($logged_info->is_admin == 'Y') |
|
2009 | 2009 | { |
2010 | - if($args->is_admin!='Y') $args->is_admin = 'N'; |
|
2010 | + if ($args->is_admin != 'Y') $args->is_admin = 'N'; |
|
2011 | 2011 | } |
2012 | 2012 | else |
2013 | 2013 | { |
@@ -2022,97 +2022,97 @@ discard block |
||
2022 | 2022 | $args->nick_name = htmlspecialchars($args->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2023 | 2023 | $args->homepage = htmlspecialchars($args->homepage, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2024 | 2024 | $args->blog = htmlspecialchars($args->blog, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2025 | - if($args->homepage && !preg_match("/^[a-z]+:\/\//i",$args->homepage)) $args->homepage = 'http://'.$args->homepage; |
|
2026 | - if($args->blog && !preg_match("/^[a-z]+:\/\//i",$args->blog)) $args->blog = 'http://'.$args->blog; |
|
2025 | + if ($args->homepage && !preg_match("/^[a-z]+:\/\//i", $args->homepage)) $args->homepage = 'http://'.$args->homepage; |
|
2026 | + if ($args->blog && !preg_match("/^[a-z]+:\/\//i", $args->blog)) $args->blog = 'http://'.$args->blog; |
|
2027 | 2027 | |
2028 | 2028 | // Create a model object |
2029 | 2029 | $oMemberModel = getModel('member'); |
2030 | 2030 | |
2031 | 2031 | // Check password strength |
2032 | - if($args->password && !$password_is_hashed) |
|
2032 | + if ($args->password && !$password_is_hashed) |
|
2033 | 2033 | { |
2034 | - if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
2034 | + if (!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
2035 | 2035 | { |
2036 | 2036 | $message = Context::getLang('about_password_strength'); |
2037 | 2037 | return new Object(-1, $message[$config->password_strength]); |
2038 | 2038 | } |
2039 | 2039 | $args->password = $oMemberModel->hashPassword($args->password); |
2040 | 2040 | } |
2041 | - elseif(!$args->password) |
|
2041 | + elseif (!$args->password) |
|
2042 | 2042 | { |
2043 | 2043 | unset($args->password); |
2044 | 2044 | } |
2045 | 2045 | |
2046 | - if($args->find_account_answer && !$password_is_hashed) |
|
2046 | + if ($args->find_account_answer && !$password_is_hashed) |
|
2047 | 2047 | { |
2048 | 2048 | $args->find_account_answer = $oMemberModel->hashPassword($args->find_account_answer); |
2049 | 2049 | } |
2050 | - elseif(!$args->find_account_answer) |
|
2050 | + elseif (!$args->find_account_answer) |
|
2051 | 2051 | { |
2052 | 2052 | unset($args->find_account_answer); |
2053 | 2053 | } |
2054 | 2054 | |
2055 | 2055 | // Check if ID is prohibited |
2056 | - if($oMemberModel->isDeniedID($args->user_id)) |
|
2056 | + if ($oMemberModel->isDeniedID($args->user_id)) |
|
2057 | 2057 | { |
2058 | - return new Object(-1,'denied_user_id'); |
|
2058 | + return new Object(-1, 'denied_user_id'); |
|
2059 | 2059 | } |
2060 | 2060 | |
2061 | 2061 | // Check if ID is duplicate |
2062 | 2062 | $member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id); |
2063 | - if($member_srl) |
|
2063 | + if ($member_srl) |
|
2064 | 2064 | { |
2065 | - return new Object(-1,'msg_exists_user_id'); |
|
2065 | + return new Object(-1, 'msg_exists_user_id'); |
|
2066 | 2066 | } |
2067 | 2067 | |
2068 | 2068 | // Check if nickname is prohibited |
2069 | - if($oMemberModel->isDeniedNickName($args->nick_name)) |
|
2069 | + if ($oMemberModel->isDeniedNickName($args->nick_name)) |
|
2070 | 2070 | { |
2071 | - return new Object(-1,'denied_nick_name'); |
|
2071 | + return new Object(-1, 'denied_nick_name'); |
|
2072 | 2072 | } |
2073 | 2073 | |
2074 | 2074 | // Check if nickname is duplicate |
2075 | 2075 | $member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name); |
2076 | - if($member_srl) |
|
2076 | + if ($member_srl) |
|
2077 | 2077 | { |
2078 | - return new Object(-1,'msg_exists_nick_name'); |
|
2078 | + return new Object(-1, 'msg_exists_nick_name'); |
|
2079 | 2079 | } |
2080 | 2080 | |
2081 | 2081 | // Check if email address is duplicate |
2082 | 2082 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address); |
2083 | - if($member_srl) |
|
2083 | + if ($member_srl) |
|
2084 | 2084 | { |
2085 | - return new Object(-1,'msg_exists_email_address'); |
|
2085 | + return new Object(-1, 'msg_exists_email_address'); |
|
2086 | 2086 | } |
2087 | 2087 | |
2088 | 2088 | // Insert data into the DB |
2089 | 2089 | $args->list_order = -1 * $args->member_srl; |
2090 | 2090 | |
2091 | - if(!$args->user_id) $args->user_id = 't'.$args->member_srl; |
|
2092 | - if(!$args->user_name) $args->user_name = $args->member_srl; |
|
2091 | + if (!$args->user_id) $args->user_id = 't'.$args->member_srl; |
|
2092 | + if (!$args->user_name) $args->user_name = $args->member_srl; |
|
2093 | 2093 | |
2094 | 2094 | $oDB = &DB::getInstance(); |
2095 | 2095 | $oDB->begin(); |
2096 | 2096 | |
2097 | 2097 | $output = executeQuery('member.insertMember', $args); |
2098 | - if(!$output->toBool()) |
|
2098 | + if (!$output->toBool()) |
|
2099 | 2099 | { |
2100 | 2100 | $oDB->rollback(); |
2101 | 2101 | return $output; |
2102 | 2102 | } |
2103 | 2103 | |
2104 | - if(is_array($args->group_srl_list)) $group_srl_list = $args->group_srl_list; |
|
2104 | + if (is_array($args->group_srl_list)) $group_srl_list = $args->group_srl_list; |
|
2105 | 2105 | else $group_srl_list = explode('|@|', $args->group_srl_list); |
2106 | 2106 | // If no value is entered the default group, the value of group registration |
2107 | - if(!$args->group_srl_list) |
|
2107 | + if (!$args->group_srl_list) |
|
2108 | 2108 | { |
2109 | 2109 | $columnList = array('site_srl', 'group_srl'); |
2110 | 2110 | $default_group = $oMemberModel->getDefaultGroup(0, $columnList); |
2111 | - if($default_group) |
|
2111 | + if ($default_group) |
|
2112 | 2112 | { |
2113 | 2113 | // Add to the default group |
2114 | - $output = $this->addMemberToGroup($args->member_srl,$default_group->group_srl); |
|
2115 | - if(!$output->toBool()) |
|
2114 | + $output = $this->addMemberToGroup($args->member_srl, $default_group->group_srl); |
|
2115 | + if (!$output->toBool()) |
|
2116 | 2116 | { |
2117 | 2117 | $oDB->rollback(); |
2118 | 2118 | return $output; |
@@ -2122,11 +2122,11 @@ discard block |
||
2122 | 2122 | } |
2123 | 2123 | else |
2124 | 2124 | { |
2125 | - for($i=0;$i<count($group_srl_list);$i++) |
|
2125 | + for ($i = 0; $i < count($group_srl_list); $i++) |
|
2126 | 2126 | { |
2127 | - $output = $this->addMemberToGroup($args->member_srl,$group_srl_list[$i]); |
|
2127 | + $output = $this->addMemberToGroup($args->member_srl, $group_srl_list[$i]); |
|
2128 | 2128 | |
2129 | - if(!$output->toBool()) |
|
2129 | + if (!$output->toBool()) |
|
2130 | 2130 | { |
2131 | 2131 | $oDB->rollback(); |
2132 | 2132 | return $output; |
@@ -2136,7 +2136,7 @@ discard block |
||
2136 | 2136 | |
2137 | 2137 | $member_config = $oModuleModel->getModuleConfig('member'); |
2138 | 2138 | // When using email authentication mode (when you subscribed members denied a) certified mail sent |
2139 | - if($args->denied == 'Y') |
|
2139 | + if ($args->denied == 'Y') |
|
2140 | 2140 | { |
2141 | 2141 | // Insert data into the authentication DB |
2142 | 2142 | $oPassword = new Password(); |
@@ -2148,7 +2148,7 @@ discard block |
||
2148 | 2148 | $auth_args->is_register = 'Y'; |
2149 | 2149 | |
2150 | 2150 | $output = executeQuery('member.insertAuthMail', $auth_args); |
2151 | - if(!$output->toBool()) |
|
2151 | + if (!$output->toBool()) |
|
2152 | 2152 | { |
2153 | 2153 | $oDB->rollback(); |
2154 | 2154 | return $output; |
@@ -2156,10 +2156,10 @@ discard block |
||
2156 | 2156 | $this->_sendAuthMail($auth_args, $args); |
2157 | 2157 | } |
2158 | 2158 | // Call a trigger (after) |
2159 | - if($output->toBool()) |
|
2159 | + if ($output->toBool()) |
|
2160 | 2160 | { |
2161 | 2161 | $trigger_output = ModuleHandler::triggerCall('member.insertMember', 'after', $args); |
2162 | - if(!$trigger_output->toBool()) |
|
2162 | + if (!$trigger_output->toBool()) |
|
2163 | 2163 | { |
2164 | 2164 | $oDB->rollback(); |
2165 | 2165 | return $trigger_output; |
@@ -2181,41 +2181,41 @@ discard block |
||
2181 | 2181 | { |
2182 | 2182 | // Call a trigger (before) |
2183 | 2183 | $output = ModuleHandler::triggerCall('member.updateMember', 'before', $args); |
2184 | - if(!$output->toBool()) return $output; |
|
2184 | + if (!$output->toBool()) return $output; |
|
2185 | 2185 | // Create a model object |
2186 | 2186 | $oMemberModel = getModel('member'); |
2187 | 2187 | |
2188 | 2188 | $logged_info = Context::get('logged_info'); |
2189 | 2189 | // Get what you want to modify the original information |
2190 | - if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2190 | + if (!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2191 | 2191 | // Control of essential parameters |
2192 | - if($args->allow_mailing!='Y') $args->allow_mailing = 'N'; |
|
2193 | - if($args->allow_message && !in_array($args->allow_message, array('Y','N','F'))) $args->allow_message = 'Y'; |
|
2192 | + if ($args->allow_mailing != 'Y') $args->allow_mailing = 'N'; |
|
2193 | + if ($args->allow_message && !in_array($args->allow_message, array('Y', 'N', 'F'))) $args->allow_message = 'Y'; |
|
2194 | 2194 | |
2195 | - if($logged_info->is_admin == 'Y') |
|
2195 | + if ($logged_info->is_admin == 'Y') |
|
2196 | 2196 | { |
2197 | - if($args->denied!='Y') $args->denied = 'N'; |
|
2198 | - if($args->is_admin!='Y' && $logged_info->member_srl != $args->member_srl) $args->is_admin = 'N'; |
|
2197 | + if ($args->denied != 'Y') $args->denied = 'N'; |
|
2198 | + if ($args->is_admin != 'Y' && $logged_info->member_srl != $args->member_srl) $args->is_admin = 'N'; |
|
2199 | 2199 | } |
2200 | 2200 | else |
2201 | 2201 | { |
2202 | 2202 | unset($args->is_admin); |
2203 | - if($is_admin == false) |
|
2203 | + if ($is_admin == false) |
|
2204 | 2204 | unset($args->denied); |
2205 | - if($logged_info->member_srl != $args->member_srl && $is_admin == false) |
|
2205 | + if ($logged_info->member_srl != $args->member_srl && $is_admin == false) |
|
2206 | 2206 | { |
2207 | 2207 | return $this->stop('msg_invalid_request'); |
2208 | 2208 | } |
2209 | 2209 | } |
2210 | 2210 | |
2211 | 2211 | // Sanitize user ID, username, nickname, homepage, blog |
2212 | - if($args->user_id) $args->user_id = htmlspecialchars($args->user_id, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
|
2212 | + if ($args->user_id) $args->user_id = htmlspecialchars($args->user_id, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
|
2213 | 2213 | $args->user_name = htmlspecialchars($args->user_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2214 | 2214 | $args->nick_name = htmlspecialchars($args->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2215 | 2215 | $args->homepage = htmlspecialchars($args->homepage, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2216 | 2216 | $args->blog = htmlspecialchars($args->blog, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2217 | - if($args->homepage && !preg_match("/^[a-z]+:\/\//is",$args->homepage)) $args->homepage = 'http://'.$args->homepage; |
|
2218 | - if($args->blog && !preg_match("/^[a-z]+:\/\//is",$args->blog)) $args->blog = 'http://'.$args->blog; |
|
2217 | + if ($args->homepage && !preg_match("/^[a-z]+:\/\//is", $args->homepage)) $args->homepage = 'http://'.$args->homepage; |
|
2218 | + if ($args->blog && !preg_match("/^[a-z]+:\/\//is", $args->blog)) $args->blog = 'http://'.$args->blog; |
|
2219 | 2219 | |
2220 | 2220 | // check member identifier form |
2221 | 2221 | $config = $oMemberModel->getMemberConfig(); |
@@ -2224,56 +2224,56 @@ discard block |
||
2224 | 2224 | $orgMemberInfo = $output->data; |
2225 | 2225 | |
2226 | 2226 | // Check if email address or user ID is duplicate |
2227 | - if($config->identifier == 'email_address') |
|
2227 | + if ($config->identifier == 'email_address') |
|
2228 | 2228 | { |
2229 | 2229 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($args->email_address); |
2230 | - if($member_srl && $args->member_srl != $member_srl) |
|
2230 | + if ($member_srl && $args->member_srl != $member_srl) |
|
2231 | 2231 | { |
2232 | - return new Object(-1,'msg_exists_email_address'); |
|
2232 | + return new Object(-1, 'msg_exists_email_address'); |
|
2233 | 2233 | } |
2234 | 2234 | $args->email_address = $orgMemberInfo->email_address; |
2235 | 2235 | } |
2236 | 2236 | else |
2237 | 2237 | { |
2238 | 2238 | $member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id); |
2239 | - if($member_srl && $args->member_srl != $member_srl) |
|
2239 | + if ($member_srl && $args->member_srl != $member_srl) |
|
2240 | 2240 | { |
2241 | - return new Object(-1,'msg_exists_user_id'); |
|
2241 | + return new Object(-1, 'msg_exists_user_id'); |
|
2242 | 2242 | } |
2243 | 2243 | |
2244 | 2244 | $args->user_id = $orgMemberInfo->user_id; |
2245 | 2245 | } |
2246 | 2246 | |
2247 | - if($logged_info->is_admin !== 'Y') |
|
2247 | + if ($logged_info->is_admin !== 'Y') |
|
2248 | 2248 | { |
2249 | 2249 | // Check if ID is prohibited |
2250 | - if($args->user_id && $oMemberModel->isDeniedID($args->user_id)) |
|
2250 | + if ($args->user_id && $oMemberModel->isDeniedID($args->user_id)) |
|
2251 | 2251 | { |
2252 | - return new Object(-1,'denied_user_id'); |
|
2252 | + return new Object(-1, 'denied_user_id'); |
|
2253 | 2253 | } |
2254 | 2254 | |
2255 | 2255 | // Check if nickname is prohibited |
2256 | - if($args->nick_name && $oMemberModel->isDeniedNickName($args->nick_name)) |
|
2256 | + if ($args->nick_name && $oMemberModel->isDeniedNickName($args->nick_name)) |
|
2257 | 2257 | { |
2258 | 2258 | return new Object(-1, 'denied_nick_name'); |
2259 | 2259 | } |
2260 | 2260 | } |
2261 | 2261 | |
2262 | 2262 | // Check if ID is duplicate |
2263 | - if($args->user_id) |
|
2263 | + if ($args->user_id) |
|
2264 | 2264 | { |
2265 | 2265 | $member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id); |
2266 | - if($member_srl && $args->member_srl != $member_srl) |
|
2266 | + if ($member_srl && $args->member_srl != $member_srl) |
|
2267 | 2267 | { |
2268 | - return new Object(-1,'msg_exists_user_id'); |
|
2268 | + return new Object(-1, 'msg_exists_user_id'); |
|
2269 | 2269 | } |
2270 | 2270 | } |
2271 | 2271 | |
2272 | 2272 | // Check if nickname is duplicate |
2273 | 2273 | $member_srl = $oMemberModel->getMemberSrlByNickName($args->nick_name); |
2274 | - if($member_srl && $args->member_srl != $member_srl) |
|
2274 | + if ($member_srl && $args->member_srl != $member_srl) |
|
2275 | 2275 | { |
2276 | - return new Object(-1,'msg_exists_nick_name'); |
|
2276 | + return new Object(-1, 'msg_exists_nick_name'); |
|
2277 | 2277 | } |
2278 | 2278 | |
2279 | 2279 | list($args->email_id, $args->email_host) = explode('@', $args->email_address); |
@@ -2282,9 +2282,9 @@ discard block |
||
2282 | 2282 | $oDB->begin(); |
2283 | 2283 | |
2284 | 2284 | // Check password strength |
2285 | - if($args->password) |
|
2285 | + if ($args->password) |
|
2286 | 2286 | { |
2287 | - if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
2287 | + if (!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
2288 | 2288 | { |
2289 | 2289 | $message = Context::getLang('about_password_strength'); |
2290 | 2290 | return new Object(-1, $message[$config->password_strength]); |
@@ -2296,55 +2296,55 @@ discard block |
||
2296 | 2296 | $args->password = $orgMemberInfo->password; |
2297 | 2297 | } |
2298 | 2298 | |
2299 | - if($args->find_account_answer) { |
|
2299 | + if ($args->find_account_answer) { |
|
2300 | 2300 | $args->find_account_answer = $oMemberModel->hashPassword($args->find_account_answer); |
2301 | 2301 | } |
2302 | 2302 | else |
2303 | 2303 | { |
2304 | - $oPassword = new Password(); |
|
2304 | + $oPassword = new Password(); |
|
2305 | 2305 | $hashed = $oPassword->checkAlgorithm($orgMemberInfo->find_account_answer); |
2306 | 2306 | |
2307 | - if($hashed) { |
|
2307 | + if ($hashed) { |
|
2308 | 2308 | $args->find_account_answer = $orgMemberInfo->find_account_answer; |
2309 | 2309 | } else { |
2310 | 2310 | $args->find_account_answer = $oPassword->createHash($orgMemberInfo->find_account_answer); |
2311 | 2311 | } |
2312 | 2312 | } |
2313 | 2313 | |
2314 | - if(!$args->user_name) $args->user_name = $orgMemberInfo->user_name; |
|
2315 | - if(!$args->user_id) $args->user_id = $orgMemberInfo->user_id; |
|
2316 | - if(!$args->nick_name) $args->nick_name = $orgMemberInfo->nick_name; |
|
2317 | - if(!$args->description) $args->description = $orgMemberInfo->description; |
|
2318 | - if(!$args->birthday) $args->birthday = ''; |
|
2314 | + if (!$args->user_name) $args->user_name = $orgMemberInfo->user_name; |
|
2315 | + if (!$args->user_id) $args->user_id = $orgMemberInfo->user_id; |
|
2316 | + if (!$args->nick_name) $args->nick_name = $orgMemberInfo->nick_name; |
|
2317 | + if (!$args->description) $args->description = $orgMemberInfo->description; |
|
2318 | + if (!$args->birthday) $args->birthday = ''; |
|
2319 | 2319 | |
2320 | 2320 | $output = executeQuery('member.updateMember', $args); |
2321 | 2321 | |
2322 | - if(!$output->toBool()) |
|
2322 | + if (!$output->toBool()) |
|
2323 | 2323 | { |
2324 | 2324 | $oDB->rollback(); |
2325 | 2325 | return $output; |
2326 | 2326 | } |
2327 | 2327 | |
2328 | - if($args->group_srl_list) |
|
2328 | + if ($args->group_srl_list) |
|
2329 | 2329 | { |
2330 | - if(is_array($args->group_srl_list)) $group_srl_list = $args->group_srl_list; |
|
2330 | + if (is_array($args->group_srl_list)) $group_srl_list = $args->group_srl_list; |
|
2331 | 2331 | else $group_srl_list = explode('|@|', $args->group_srl_list); |
2332 | 2332 | // If the group information, group information changes |
2333 | - if(count($group_srl_list) > 0) |
|
2333 | + if (count($group_srl_list) > 0) |
|
2334 | 2334 | { |
2335 | 2335 | $args->site_srl = 0; |
2336 | 2336 | // One of its members to delete all the group |
2337 | 2337 | $output = executeQuery('member.deleteMemberGroupMember', $args); |
2338 | - if(!$output->toBool()) |
|
2338 | + if (!$output->toBool()) |
|
2339 | 2339 | { |
2340 | 2340 | $oDB->rollback(); |
2341 | 2341 | return $output; |
2342 | 2342 | } |
2343 | 2343 | // Enter one of the loop a |
2344 | - for($i=0;$i<count($group_srl_list);$i++) |
|
2344 | + for ($i = 0; $i < count($group_srl_list); $i++) |
|
2345 | 2345 | { |
2346 | - $output = $this->addMemberToGroup($args->member_srl,$group_srl_list[$i]); |
|
2347 | - if(!$output->toBool()) |
|
2346 | + $output = $this->addMemberToGroup($args->member_srl, $group_srl_list[$i]); |
|
2347 | + if (!$output->toBool()) |
|
2348 | 2348 | { |
2349 | 2349 | $oDB->rollback(); |
2350 | 2350 | return $output; |
@@ -2356,9 +2356,9 @@ discard block |
||
2356 | 2356 | } |
2357 | 2357 | } |
2358 | 2358 | // Call a trigger (after) |
2359 | - if($output->toBool()) { |
|
2359 | + if ($output->toBool()) { |
|
2360 | 2360 | $trigger_output = ModuleHandler::triggerCall('member.updateMember', 'after', $args); |
2361 | - if(!$trigger_output->toBool()) |
|
2361 | + if (!$trigger_output->toBool()) |
|
2362 | 2362 | { |
2363 | 2363 | $oDB->rollback(); |
2364 | 2364 | return $trigger_output; |
@@ -2371,7 +2371,7 @@ discard block |
||
2371 | 2371 | $this->_clearMemberCache($args->member_srl, $args->site_srl); |
2372 | 2372 | |
2373 | 2373 | // Save Session |
2374 | - if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2374 | + if (!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2375 | 2375 | $logged_info = Context::get('logged_info'); |
2376 | 2376 | |
2377 | 2377 | $output->add('member_srl', $args->member_srl); |
@@ -2383,14 +2383,14 @@ discard block |
||
2383 | 2383 | */ |
2384 | 2384 | function updateMemberPassword($args) |
2385 | 2385 | { |
2386 | - if($args->password) |
|
2386 | + if ($args->password) |
|
2387 | 2387 | { |
2388 | 2388 | |
2389 | 2389 | // check password strength |
2390 | 2390 | $oMemberModel = getModel('member'); |
2391 | 2391 | $config = $oMemberModel->getMemberConfig(); |
2392 | 2392 | |
2393 | - if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
2393 | + if (!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
|
2394 | 2394 | { |
2395 | 2395 | $message = Context::getLang('about_password_strength'); |
2396 | 2396 | return new Object(-1, $message[$config->password_strength]); |
@@ -2398,13 +2398,13 @@ discard block |
||
2398 | 2398 | |
2399 | 2399 | $args->password = $oMemberModel->hashPassword($args->password); |
2400 | 2400 | } |
2401 | - else if($args->hashed_password) |
|
2401 | + else if ($args->hashed_password) |
|
2402 | 2402 | { |
2403 | 2403 | $args->password = $args->hashed_password; |
2404 | 2404 | } |
2405 | 2405 | |
2406 | 2406 | $output = executeQuery('member.updateMemberPassword', $args); |
2407 | - if($output->toBool()) |
|
2407 | + if ($output->toBool()) |
|
2408 | 2408 | { |
2409 | 2409 | $result = executeQuery('member.updateChangePasswordDate', $args); |
2410 | 2410 | } |
@@ -2416,7 +2416,7 @@ discard block |
||
2416 | 2416 | |
2417 | 2417 | function updateFindAccountAnswer($member_srl, $answer) |
2418 | 2418 | { |
2419 | - $oPassword = new Password(); |
|
2419 | + $oPassword = new Password(); |
|
2420 | 2420 | |
2421 | 2421 | $args = new stdClass(); |
2422 | 2422 | $args->member_srl = $member_srl; |
@@ -2433,18 +2433,18 @@ discard block |
||
2433 | 2433 | $trigger_obj = new stdClass(); |
2434 | 2434 | $trigger_obj->member_srl = $member_srl; |
2435 | 2435 | $output = ModuleHandler::triggerCall('member.deleteMember', 'before', $trigger_obj); |
2436 | - if(!$output->toBool()) return $output; |
|
2436 | + if (!$output->toBool()) return $output; |
|
2437 | 2437 | // Create a model object |
2438 | 2438 | $oMemberModel = getModel('member'); |
2439 | 2439 | // Bringing the user's information |
2440 | - if(!$this->memberInfo || $this->memberInfo->member_srl != $member_srl || !isset($this->memberInfo->is_admin)) |
|
2440 | + if (!$this->memberInfo || $this->memberInfo->member_srl != $member_srl || !isset($this->memberInfo->is_admin)) |
|
2441 | 2441 | { |
2442 | 2442 | $columnList = array('member_srl', 'is_admin'); |
2443 | 2443 | $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
2444 | 2444 | } |
2445 | - if(!$this->memberInfo) return new Object(-1, 'msg_not_exists_member'); |
|
2445 | + if (!$this->memberInfo) return new Object(-1, 'msg_not_exists_member'); |
|
2446 | 2446 | // If managers can not be deleted |
2447 | - if($this->memberInfo->is_admin == 'Y') return new Object(-1, 'msg_cannot_delete_admin'); |
|
2447 | + if ($this->memberInfo->is_admin == 'Y') return new Object(-1, 'msg_cannot_delete_admin'); |
|
2448 | 2448 | |
2449 | 2449 | $oDB = &DB::getInstance(); |
2450 | 2450 | $oDB->begin(); |
@@ -2453,7 +2453,7 @@ discard block |
||
2453 | 2453 | $args->member_srl = $member_srl; |
2454 | 2454 | // Delete the entries in member_auth_mail |
2455 | 2455 | $output = executeQuery('member.deleteAuthMail', $args); |
2456 | - if(!$output->toBool()) |
|
2456 | + if (!$output->toBool()) |
|
2457 | 2457 | { |
2458 | 2458 | $oDB->rollback(); |
2459 | 2459 | return $output; |
@@ -2468,23 +2468,23 @@ discard block |
||
2468 | 2468 | */ |
2469 | 2469 | // Delete the entries in member_group_member |
2470 | 2470 | $output = executeQuery('member.deleteMemberGroupMember', $args); |
2471 | - if(!$output->toBool()) |
|
2471 | + if (!$output->toBool()) |
|
2472 | 2472 | { |
2473 | 2473 | $oDB->rollback(); |
2474 | 2474 | return $output; |
2475 | 2475 | } |
2476 | 2476 | // member removed from the table |
2477 | 2477 | $output = executeQuery('member.deleteMember', $args); |
2478 | - if(!$output->toBool()) |
|
2478 | + if (!$output->toBool()) |
|
2479 | 2479 | { |
2480 | 2480 | $oDB->rollback(); |
2481 | 2481 | return $output; |
2482 | 2482 | } |
2483 | 2483 | // Call a trigger (after) |
2484 | - if($output->toBool()) |
|
2484 | + if ($output->toBool()) |
|
2485 | 2485 | { |
2486 | 2486 | $trigger_output = ModuleHandler::triggerCall('member.deleteMember', 'after', $trigger_obj); |
2487 | - if(!$trigger_output->toBool()) |
|
2487 | + if (!$trigger_output->toBool()) |
|
2488 | 2488 | { |
2489 | 2489 | $oDB->rollback(); |
2490 | 2490 | return $trigger_output; |
@@ -2508,23 +2508,23 @@ discard block |
||
2508 | 2508 | */ |
2509 | 2509 | function destroySessionInfo() |
2510 | 2510 | { |
2511 | - if(!$_SESSION || !is_array($_SESSION)) return; |
|
2511 | + if (!$_SESSION || !is_array($_SESSION)) return; |
|
2512 | 2512 | |
2513 | 2513 | $memberInfo = Context::get('logged_info'); |
2514 | 2514 | $memberSrl = $memberInfo->member_srl; |
2515 | 2515 | |
2516 | - foreach($_SESSION as $key => $val) |
|
2516 | + foreach ($_SESSION as $key => $val) |
|
2517 | 2517 | { |
2518 | 2518 | $_SESSION[$key] = ''; |
2519 | 2519 | } |
2520 | 2520 | |
2521 | 2521 | session_destroy(); |
2522 | - setcookie(session_name(), '', $_SERVER['REQUEST_TIME']-42000); |
|
2523 | - setcookie('sso','',$_SERVER['REQUEST_TIME']-42000); |
|
2524 | - setcookie('xeak','',$_SERVER['REQUEST_TIME']-42000); |
|
2522 | + setcookie(session_name(), '', $_SERVER['REQUEST_TIME'] - 42000); |
|
2523 | + setcookie('sso', '', $_SERVER['REQUEST_TIME'] - 42000); |
|
2524 | + setcookie('xeak', '', $_SERVER['REQUEST_TIME'] - 42000); |
|
2525 | 2525 | setcookie('xe_logged', 'false', $_SERVER['REQUEST_TIME'] - 42000); |
2526 | 2526 | |
2527 | - if($memberSrl || $_COOKIE['xeak']) |
|
2527 | + if ($memberSrl || $_COOKIE['xeak']) |
|
2528 | 2528 | { |
2529 | 2529 | $args = new stdClass(); |
2530 | 2530 | $args->member_srl = $memberSrl; |
@@ -2540,22 +2540,22 @@ discard block |
||
2540 | 2540 | $pointGroup = $pointModuleConfig->point_group; |
2541 | 2541 | |
2542 | 2542 | $levelGroup = array(); |
2543 | - if(is_array($pointGroup) && count($pointGroup)>0) |
|
2543 | + if (is_array($pointGroup) && count($pointGroup) > 0) |
|
2544 | 2544 | { |
2545 | 2545 | $levelGroup = array_flip($pointGroup); |
2546 | 2546 | ksort($levelGroup); |
2547 | 2547 | } |
2548 | 2548 | $maxLevel = 0; |
2549 | 2549 | $resultGroup = array_intersect($levelGroup, $groupSrlList); |
2550 | - if(count($resultGroup) > 0) |
|
2550 | + if (count($resultGroup) > 0) |
|
2551 | 2551 | $maxLevel = max(array_flip($resultGroup)); |
2552 | 2552 | |
2553 | - if($maxLevel > 0) |
|
2553 | + if ($maxLevel > 0) |
|
2554 | 2554 | { |
2555 | 2555 | $oPointModel = getModel('point'); |
2556 | 2556 | $originPoint = $oPointModel->getPoint($memberSrl); |
2557 | 2557 | |
2558 | - if($pointModuleConfig->level_step[$maxLevel] > $originPoint) |
|
2558 | + if ($pointModuleConfig->level_step[$maxLevel] > $originPoint) |
|
2559 | 2559 | { |
2560 | 2560 | $oPointController = getController('point'); |
2561 | 2561 | $oPointController->setPoint($memberSrl, $pointModuleConfig->level_step[$maxLevel], 'update'); |
@@ -2565,18 +2565,18 @@ discard block |
||
2565 | 2565 | |
2566 | 2566 | function procMemberModifyEmailAddress() |
2567 | 2567 | { |
2568 | - if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
2568 | + if (!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
2569 | 2569 | |
2570 | 2570 | $member_info = Context::get('logged_info'); |
2571 | 2571 | $newEmail = Context::get('email_address'); |
2572 | 2572 | |
2573 | - if(!$newEmail) return $this->stop('msg_invalid_request'); |
|
2573 | + if (!$newEmail) return $this->stop('msg_invalid_request'); |
|
2574 | 2574 | |
2575 | 2575 | $oMemberModel = getModel('member'); |
2576 | 2576 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail); |
2577 | - if($member_srl) return new Object(-1,'msg_exists_email_address'); |
|
2577 | + if ($member_srl) return new Object(-1, 'msg_exists_email_address'); |
|
2578 | 2578 | |
2579 | - if($_SESSION['rechecked_password_step'] != 'INPUT_DATA') |
|
2579 | + if ($_SESSION['rechecked_password_step'] != 'INPUT_DATA') |
|
2580 | 2580 | { |
2581 | 2581 | return $this->stop('msg_invalid_request'); |
2582 | 2582 | } |
@@ -2592,7 +2592,7 @@ discard block |
||
2592 | 2592 | $oDB = &DB::getInstance(); |
2593 | 2593 | $oDB->begin(); |
2594 | 2594 | $output = executeQuery('member.insertAuthMail', $auth_args); |
2595 | - if(!$output->toBool()) |
|
2595 | + if (!$output->toBool()) |
|
2596 | 2596 | { |
2597 | 2597 | $oDB->rollback(); |
2598 | 2598 | return $output; |
@@ -2602,7 +2602,7 @@ discard block |
||
2602 | 2602 | $member_config = $oModuleModel->getModuleConfig('member'); |
2603 | 2603 | |
2604 | 2604 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
2605 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
2605 | + if (!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
2606 | 2606 | |
2607 | 2607 | global $lang; |
2608 | 2608 | |
@@ -2614,17 +2614,17 @@ discard block |
||
2614 | 2614 | |
2615 | 2615 | Context::set('newEmail', $newEmail); |
2616 | 2616 | |
2617 | - $auth_url = getFullUrl('','module','member','act','procMemberAuthEmailAddress','member_srl',$member_info->member_srl, 'auth_key',$auth_args->auth_key); |
|
2617 | + $auth_url = getFullUrl('', 'module', 'member', 'act', 'procMemberAuthEmailAddress', 'member_srl', $member_info->member_srl, 'auth_key', $auth_args->auth_key); |
|
2618 | 2618 | Context::set('auth_url', $auth_url); |
2619 | 2619 | |
2620 | 2620 | $oTemplate = &TemplateHandler::getInstance(); |
2621 | 2621 | $content = $oTemplate->compile($tpl_path, 'confirm_member_new_email'); |
2622 | 2622 | |
2623 | 2623 | $oMail = new Mail(); |
2624 | - $oMail->setTitle( Context::getLang('title_modify_email_address') ); |
|
2624 | + $oMail->setTitle(Context::getLang('title_modify_email_address')); |
|
2625 | 2625 | $oMail->setContent($content); |
2626 | - $oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email); |
|
2627 | - $oMail->setReceiptor( $member_info->nick_name, $newEmail ); |
|
2626 | + $oMail->setSender($member_config->webmaster_name ? $member_config->webmaster_name : 'webmaster', $member_config->webmaster_email); |
|
2627 | + $oMail->setReceiptor($member_info->nick_name, $newEmail); |
|
2628 | 2628 | $result = $oMail->send(); |
2629 | 2629 | |
2630 | 2630 | $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $newEmail); |
@@ -2638,16 +2638,16 @@ discard block |
||
2638 | 2638 | { |
2639 | 2639 | $member_srl = Context::get('member_srl'); |
2640 | 2640 | $auth_key = Context::get('auth_key'); |
2641 | - if(!$member_srl || !$auth_key) return $this->stop('msg_invalid_request'); |
|
2641 | + if (!$member_srl || !$auth_key) return $this->stop('msg_invalid_request'); |
|
2642 | 2642 | |
2643 | 2643 | // Test logs for finding password by user_id and authkey |
2644 | 2644 | $args = new stdClass; |
2645 | 2645 | $args->member_srl = $member_srl; |
2646 | 2646 | $args->auth_key = $auth_key; |
2647 | 2647 | $output = executeQuery('member.getAuthMail', $args); |
2648 | - if(!$output->toBool() || $output->data->auth_key != $auth_key) |
|
2648 | + if (!$output->toBool() || $output->data->auth_key != $auth_key) |
|
2649 | 2649 | { |
2650 | - if(strlen($output->data->auth_key) !== strlen($auth_key)) executeQuery('member.deleteAuthChangeEmailAddress', $args); |
|
2650 | + if (strlen($output->data->auth_key) !== strlen($auth_key)) executeQuery('member.deleteAuthChangeEmailAddress', $args); |
|
2651 | 2651 | return $this->stop('msg_invalid_modify_email_auth_key'); |
2652 | 2652 | } |
2653 | 2653 | |
@@ -2656,10 +2656,10 @@ discard block |
||
2656 | 2656 | list($args->email_id, $args->email_host) = explode('@', $newEmail); |
2657 | 2657 | |
2658 | 2658 | $output = executeQuery('member.updateMemberEmailAddress', $args); |
2659 | - if(!$output->toBool()) return $this->stop($output->getMessage()); |
|
2659 | + if (!$output->toBool()) return $this->stop($output->getMessage()); |
|
2660 | 2660 | |
2661 | 2661 | // Remove all values having the member_srl and new_password equal to 'XE_change_emaill_address' from authentication table |
2662 | - executeQuery('member.deleteAuthChangeEmailAddress',$args); |
|
2662 | + executeQuery('member.deleteAuthChangeEmailAddress', $args); |
|
2663 | 2663 | |
2664 | 2664 | $this->_clearMemberCache($args->member_srl); |
2665 | 2665 | |
@@ -2677,7 +2677,7 @@ discard block |
||
2677 | 2677 | **/ |
2678 | 2678 | function triggerGetDocumentMenu(&$menu_list) |
2679 | 2679 | { |
2680 | - if(!Context::get('is_logged')) return new Object(); |
|
2680 | + if (!Context::get('is_logged')) return new Object(); |
|
2681 | 2681 | |
2682 | 2682 | $logged_info = Context::get('logged_info'); |
2683 | 2683 | $document_srl = Context::get('target_srl'); |
@@ -2688,12 +2688,12 @@ discard block |
||
2688 | 2688 | $member_srl = $oDocument->get('member_srl'); |
2689 | 2689 | $module_srl = $oDocument->get('module_srl'); |
2690 | 2690 | |
2691 | - if(!$member_srl) return new Object(); |
|
2692 | - if($oDocumentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new Object(); |
|
2691 | + if (!$member_srl) return new Object(); |
|
2692 | + if ($oDocumentModel->grant->manager != 1 || $member_srl == $logged_info->member_srl) return new Object(); |
|
2693 | 2693 | |
2694 | 2694 | $oDocumentController = getController('document'); |
2695 | - $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
|
2696 | - $oDocumentController->addDocumentPopupMenu($url,'cmd_spammer','','popup'); |
|
2695 | + $url = getUrl('', 'module', 'member', 'act', 'dispMemberSpammer', 'member_srl', $member_srl, 'module_srl', $module_srl); |
|
2696 | + $oDocumentController->addDocumentPopupMenu($url, 'cmd_spammer', '', 'popup'); |
|
2697 | 2697 | |
2698 | 2698 | return new Object(); |
2699 | 2699 | } |
@@ -2707,7 +2707,7 @@ discard block |
||
2707 | 2707 | **/ |
2708 | 2708 | function triggerGetCommentMenu(&$menu_list) |
2709 | 2709 | { |
2710 | - if(!Context::get('is_logged')) return new Object(); |
|
2710 | + if (!Context::get('is_logged')) return new Object(); |
|
2711 | 2711 | |
2712 | 2712 | $logged_info = Context::get('logged_info'); |
2713 | 2713 | $comment_srl = Context::get('target_srl'); |
@@ -2718,12 +2718,12 @@ discard block |
||
2718 | 2718 | $module_srl = $oComment->get('module_srl'); |
2719 | 2719 | $member_srl = $oComment->get('member_srl'); |
2720 | 2720 | |
2721 | - if(!$member_srl) return new Object(); |
|
2722 | - if($oCommentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new Object(); |
|
2721 | + if (!$member_srl) return new Object(); |
|
2722 | + if ($oCommentModel->grant->manager != 1 || $member_srl == $logged_info->member_srl) return new Object(); |
|
2723 | 2723 | |
2724 | 2724 | $oCommentController = getController('comment'); |
2725 | - $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
|
2726 | - $oCommentController->addCommentPopupMenu($url,'cmd_spammer','','popup'); |
|
2725 | + $url = getUrl('', 'module', 'member', 'act', 'dispMemberSpammer', 'member_srl', $member_srl, 'module_srl', $module_srl); |
|
2726 | + $oCommentController->addCommentPopupMenu($url, 'cmd_spammer', '', 'popup'); |
|
2727 | 2727 | |
2728 | 2728 | return new Object(); |
2729 | 2729 | } |
@@ -2735,7 +2735,7 @@ discard block |
||
2735 | 2735 | **/ |
2736 | 2736 | function procMemberSpammerManage() |
2737 | 2737 | { |
2738 | - if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted'); |
|
2738 | + if (!Context::get('is_logged')) return new Object(-1, 'msg_not_permitted'); |
|
2739 | 2739 | |
2740 | 2740 | $logged_info = Context::get('logged_info'); |
2741 | 2741 | $member_srl = Context::get('member_srl'); |
@@ -2743,7 +2743,7 @@ discard block |
||
2743 | 2743 | $cnt_loop = Context::get('cnt_loop'); |
2744 | 2744 | $proc_type = Context::get('proc_type'); |
2745 | 2745 | $isMoveToTrash = true; |
2746 | - if($proc_type == "delete") |
|
2746 | + if ($proc_type == "delete") |
|
2747 | 2747 | $isMoveToTrash = false; |
2748 | 2748 | |
2749 | 2749 | // check grant |
@@ -2752,7 +2752,7 @@ discard block |
||
2752 | 2752 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList); |
2753 | 2753 | $grant = $oModuleModel->getGrant($module_info, $logged_info); |
2754 | 2754 | |
2755 | - if(!$grant->manager) return new Object(-1,'msg_not_permitted'); |
|
2755 | + if (!$grant->manager) return new Object(-1, 'msg_not_permitted'); |
|
2756 | 2756 | |
2757 | 2757 | $proc_msg = ""; |
2758 | 2758 | |
@@ -2761,10 +2761,10 @@ discard block |
||
2761 | 2761 | |
2762 | 2762 | // delete or trash destination |
2763 | 2763 | // proc member |
2764 | - if($cnt_loop == 1) |
|
2764 | + if ($cnt_loop == 1) |
|
2765 | 2765 | $this->_spammerMember($member_srl); |
2766 | 2766 | // proc document and comment |
2767 | - elseif($cnt_loop>1) |
|
2767 | + elseif ($cnt_loop > 1) |
|
2768 | 2768 | $this->_spammerDocuments($member_srl, $isMoveToTrash); |
2769 | 2769 | |
2770 | 2770 | // get destination count |
@@ -2773,11 +2773,11 @@ discard block |
||
2773 | 2773 | |
2774 | 2774 | $total_count = Context::get('total_count'); |
2775 | 2775 | $remain_count = $cnt_document + $cnt_comment; |
2776 | - if($cnt_loop == 1) $total_count = $remain_count; |
|
2776 | + if ($cnt_loop == 1) $total_count = $remain_count; |
|
2777 | 2777 | |
2778 | 2778 | // get progress percent |
2779 | - if($total_count > 0) |
|
2780 | - $progress = intval( ( ( $total_count - $remain_count ) / $total_count ) * 100 ); |
|
2779 | + if ($total_count > 0) |
|
2780 | + $progress = intval((($total_count - $remain_count) / $total_count) * 100); |
|
2781 | 2781 | else |
2782 | 2782 | $progress = 100; |
2783 | 2783 | |
@@ -2801,7 +2801,7 @@ discard block |
||
2801 | 2801 | **/ |
2802 | 2802 | private function _spammerMember($member_srl) { |
2803 | 2803 | $logged_info = Context::get('logged_info'); |
2804 | - $spam_description = trim( Context::get('spam_description') ); |
|
2804 | + $spam_description = trim(Context::get('spam_description')); |
|
2805 | 2805 | |
2806 | 2806 | $oMemberModel = getModel('member'); |
2807 | 2807 | $columnList = array('member_srl', 'email_address', 'user_id', 'nick_name', 'description'); |
@@ -2820,10 +2820,10 @@ discard block |
||
2820 | 2820 | $args->user_id = $member_info->user_id; |
2821 | 2821 | $args->nick_name = $member_info->nick_name; |
2822 | 2822 | $args->denied = "Y"; |
2823 | - $args->description = trim( $member_info->description ); |
|
2824 | - if( $args->description != "" ) $args->description .= "\n"; // add new line |
|
2823 | + $args->description = trim($member_info->description); |
|
2824 | + if ($args->description != "") $args->description .= "\n"; // add new line |
|
2825 | 2825 | |
2826 | - $args->description .= Context::getLang('cmd_spammer') . "[" . date("Y-m-d H:i:s") . " from:" . $logged_info->user_id . " info:" . $spam_description . " docuemnts count:" . $total_count . "]"; |
|
2826 | + $args->description .= Context::getLang('cmd_spammer')."[".date("Y-m-d H:i:s")." from:".$logged_info->user_id." info:".$spam_description." docuemnts count:".$total_count."]"; |
|
2827 | 2827 | |
2828 | 2828 | $output = $this->updateMember($args, true); |
2829 | 2829 | |
@@ -2852,21 +2852,21 @@ discard block |
||
2852 | 2852 | // 1. proc comment, 2. proc document |
2853 | 2853 | $cnt_comment = $oCommentModel->getCommentCountByMemberSrl($member_srl); |
2854 | 2854 | $cnt_document = $oDocumentModel->getDocumentCountByMemberSrl($member_srl); |
2855 | - if($cnt_comment > 0) |
|
2855 | + if ($cnt_comment > 0) |
|
2856 | 2856 | { |
2857 | 2857 | $columnList = array(); |
2858 | 2858 | $commentList = $oCommentModel->getCommentListByMemberSrl($member_srl, $columnList, 0, false, $getContentsCount); |
2859 | - if($commentList) { |
|
2860 | - foreach($commentList as $v) { |
|
2859 | + if ($commentList) { |
|
2860 | + foreach ($commentList as $v) { |
|
2861 | 2861 | $oCommentController->deleteComment($v->comment_srl, true, $isMoveToTrash); |
2862 | 2862 | } |
2863 | 2863 | } |
2864 | - } elseif($cnt_document > 0) { |
|
2864 | + } elseif ($cnt_document > 0) { |
|
2865 | 2865 | $columnList = array(); |
2866 | 2866 | $documentList = $oDocumentModel->getDocumentListByMemberSrl($member_srl, $columnList, 0, false, $getContentsCount); |
2867 | - if($documentList) { |
|
2868 | - foreach($documentList as $v) { |
|
2869 | - if($isMoveToTrash) $oDocumentController->moveDocumentToTrash($v); |
|
2867 | + if ($documentList) { |
|
2868 | + foreach ($documentList as $v) { |
|
2869 | + if ($isMoveToTrash) $oDocumentController->moveDocumentToTrash($v); |
|
2870 | 2870 | else $oDocumentController->deleteDocument($v->document_srl); |
2871 | 2871 | } |
2872 | 2872 | } |
@@ -2878,24 +2878,24 @@ discard block |
||
2878 | 2878 | function _clearMemberCache($member_srl, $site_srl = 0) |
2879 | 2879 | { |
2880 | 2880 | $oCacheHandler = CacheHandler::getInstance('object', NULL, TRUE); |
2881 | - if($oCacheHandler->isSupport()) |
|
2881 | + if ($oCacheHandler->isSupport()) |
|
2882 | 2882 | { |
2883 | - $object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_' . $site_srl; |
|
2883 | + $object_key = 'member_groups:'.getNumberingPath($member_srl).$member_srl.'_'.$site_srl; |
|
2884 | 2884 | $cache_key = $oCacheHandler->getGroupKey('member', $object_key); |
2885 | 2885 | $oCacheHandler->delete($cache_key); |
2886 | 2886 | |
2887 | - if($site_srl !== 0) |
|
2887 | + if ($site_srl !== 0) |
|
2888 | 2888 | { |
2889 | - $object_key = 'member_groups:' . getNumberingPath($member_srl) . $member_srl . '_0'; |
|
2889 | + $object_key = 'member_groups:'.getNumberingPath($member_srl).$member_srl.'_0'; |
|
2890 | 2890 | $cache_key = $oCacheHandler->getGroupKey('member', $object_key); |
2891 | 2891 | $oCacheHandler->delete($cache_key); |
2892 | 2892 | } |
2893 | 2893 | } |
2894 | 2894 | |
2895 | 2895 | $oCacheHandler = CacheHandler::getInstance('object'); |
2896 | - if($oCacheHandler->isSupport()) |
|
2896 | + if ($oCacheHandler->isSupport()) |
|
2897 | 2897 | { |
2898 | - $object_key = 'member_info:' . getNumberingPath($member_srl) . $member_srl; |
|
2898 | + $object_key = 'member_info:'.getNumberingPath($member_srl).$member_srl; |
|
2899 | 2899 | $cache_key = $oCacheHandler->getGroupKey('member', $object_key); |
2900 | 2900 | $oCacheHandler->delete($cache_key); |
2901 | 2901 | } |
@@ -41,19 +41,31 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | // Variables |
44 | - if(!$user_id) $user_id = Context::get('user_id'); |
|
44 | + if(!$user_id) { |
|
45 | + $user_id = Context::get('user_id'); |
|
46 | + } |
|
45 | 47 | $user_id = trim($user_id); |
46 | 48 | |
47 | - if(!$password) $password = Context::get('password'); |
|
49 | + if(!$password) { |
|
50 | + $password = Context::get('password'); |
|
51 | + } |
|
48 | 52 | $password = trim($password); |
49 | 53 | |
50 | - if(!$keep_signed) $keep_signed = Context::get('keep_signed'); |
|
54 | + if(!$keep_signed) { |
|
55 | + $keep_signed = Context::get('keep_signed'); |
|
56 | + } |
|
51 | 57 | // Return an error when id and password doesn't exist |
52 | - if(!$user_id) return new Object(-1,'null_user_id'); |
|
53 | - if(!$password) return new Object(-1,'null_password'); |
|
58 | + if(!$user_id) { |
|
59 | + return new Object(-1,'null_user_id'); |
|
60 | + } |
|
61 | + if(!$password) { |
|
62 | + return new Object(-1,'null_password'); |
|
63 | + } |
|
54 | 64 | |
55 | 65 | $output = $this->doLogin($user_id, $password, $keep_signed=='Y'?true:false); |
56 | - if (!$output->toBool()) return $output; |
|
66 | + if (!$output->toBool()) { |
|
67 | + return $output; |
|
68 | + } |
|
57 | 69 | |
58 | 70 | $oModuleModel = getModel('module'); |
59 | 71 | $config = $oModuleModel->getModuleConfig('member'); |
@@ -80,8 +92,7 @@ discard block |
||
80 | 92 | if(!$config->after_login_url) |
81 | 93 | { |
82 | 94 | $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', ''); |
83 | - } |
|
84 | - else |
|
95 | + } else |
|
85 | 96 | { |
86 | 97 | $returnUrl = $config->after_login_url; |
87 | 98 | } |
@@ -98,19 +109,24 @@ discard block |
||
98 | 109 | // Call a trigger before log-out (before) |
99 | 110 | $logged_info = Context::get('logged_info'); |
100 | 111 | $trigger_output = ModuleHandler::triggerCall('member.doLogout', 'before', $logged_info); |
101 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
112 | + if(!$trigger_output->toBool()) { |
|
113 | + return $trigger_output; |
|
114 | + } |
|
102 | 115 | // Destroy session information |
103 | 116 | $this->destroySessionInfo(); |
104 | 117 | // Call a trigger after log-out (after) |
105 | 118 | $trigger_output = ModuleHandler::triggerCall('member.doLogout', 'after', $logged_info); |
106 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
119 | + if(!$trigger_output->toBool()) { |
|
120 | + return $trigger_output; |
|
121 | + } |
|
107 | 122 | |
108 | 123 | $output = new Object(); |
109 | 124 | |
110 | 125 | $oModuleModel = getModel('module'); |
111 | 126 | $config = $oModuleModel->getModuleConfig('member'); |
112 | - if($config->after_logout_url) |
|
113 | - $output->redirect_url = $config->after_logout_url; |
|
127 | + if($config->after_logout_url) { |
|
128 | + $output->redirect_url = $config->after_logout_url; |
|
129 | + } |
|
114 | 130 | |
115 | 131 | $this->_clearMemberCache($logged_info->member_srl); |
116 | 132 | |
@@ -127,12 +143,18 @@ discard block |
||
127 | 143 | $oModuleModel = &getModel('module'); |
128 | 144 | |
129 | 145 | // Check login information |
130 | - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
146 | + if(!Context::get('is_logged')) { |
|
147 | + return new Object(-1, 'msg_not_logged'); |
|
148 | + } |
|
131 | 149 | $logged_info = Context::get('logged_info'); |
132 | 150 | |
133 | 151 | $document_srl = (int)Context::get('document_srl'); |
134 | - if(!$document_srl) $document_srl = (int)Context::get('target_srl'); |
|
135 | - if(!$document_srl) return new Object(-1,'msg_invalid_request'); |
|
152 | + if(!$document_srl) { |
|
153 | + $document_srl = (int)Context::get('target_srl'); |
|
154 | + } |
|
155 | + if(!$document_srl) { |
|
156 | + return new Object(-1,'msg_invalid_request'); |
|
157 | + } |
|
136 | 158 | |
137 | 159 | // Get document |
138 | 160 | $oDocumentModel = getModel('document'); |
@@ -180,11 +202,15 @@ discard block |
||
180 | 202 | |
181 | 203 | // Check if already scrapped |
182 | 204 | $output = executeQuery('member.getScrapDocument', $args); |
183 | - if($output->data->count) return new Object(-1, 'msg_alreay_scrapped'); |
|
205 | + if($output->data->count) { |
|
206 | + return new Object(-1, 'msg_alreay_scrapped'); |
|
207 | + } |
|
184 | 208 | |
185 | 209 | // Insert |
186 | 210 | $output = executeQuery('member.addScrapDocument', $args); |
187 | - if(!$output->toBool()) return $output; |
|
211 | + if(!$output->toBool()) { |
|
212 | + return $output; |
|
213 | + } |
|
188 | 214 | |
189 | 215 | $this->setError(-1); |
190 | 216 | $this->setMessage('success_registed'); |
@@ -198,11 +224,15 @@ discard block |
||
198 | 224 | function procMemberDeleteScrap() |
199 | 225 | { |
200 | 226 | // Check login information |
201 | - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
227 | + if(!Context::get('is_logged')) { |
|
228 | + return new Object(-1, 'msg_not_logged'); |
|
229 | + } |
|
202 | 230 | $logged_info = Context::get('logged_info'); |
203 | 231 | |
204 | 232 | $document_srl = (int)Context::get('document_srl'); |
205 | - if(!$document_srl) return new Object(-1,'msg_invalid_request'); |
|
233 | + if(!$document_srl) { |
|
234 | + return new Object(-1,'msg_invalid_request'); |
|
235 | + } |
|
206 | 236 | // Variables |
207 | 237 | $args = new stdClass; |
208 | 238 | $args->member_srl = $logged_info->member_srl; |
@@ -228,11 +258,15 @@ discard block |
||
228 | 258 | function procMemberDeleteSavedDocument() |
229 | 259 | { |
230 | 260 | // Check login information |
231 | - if(!Context::get('is_logged')) return new Object(-1, 'msg_not_logged'); |
|
261 | + if(!Context::get('is_logged')) { |
|
262 | + return new Object(-1, 'msg_not_logged'); |
|
263 | + } |
|
232 | 264 | $logged_info = Context::get('logged_info'); |
233 | 265 | |
234 | 266 | $document_srl = (int)Context::get('document_srl'); |
235 | - if(!$document_srl) return new Object(-1,'msg_invalid_request'); |
|
267 | + if(!$document_srl) { |
|
268 | + return new Object(-1,'msg_invalid_request'); |
|
269 | + } |
|
236 | 270 | |
237 | 271 | $oDocumentModel = getModel('document'); |
238 | 272 | $oDocument = $oDocumentModel->getDocument($document_srl); |
@@ -260,7 +294,9 @@ discard block |
||
260 | 294 | { |
261 | 295 | $name = Context::get('name'); |
262 | 296 | $value = Context::get('value'); |
263 | - if(!$value) return; |
|
297 | + if(!$value) { |
|
298 | + return; |
|
299 | + } |
|
264 | 300 | |
265 | 301 | $oMemberModel = getModel('member'); |
266 | 302 | // Check if logged-in |
@@ -271,10 +307,14 @@ discard block |
||
271 | 307 | { |
272 | 308 | case 'user_id' : |
273 | 309 | // Check denied ID |
274 | - if($oMemberModel->isDeniedID($value)) return new Object(0,'denied_user_id'); |
|
310 | + if($oMemberModel->isDeniedID($value)) { |
|
311 | + return new Object(0,'denied_user_id'); |
|
312 | + } |
|
275 | 313 | // Check if duplicated |
276 | 314 | $member_srl = $oMemberModel->getMemberSrlByUserID($value); |
277 | - if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_user_id'); |
|
315 | + if($member_srl && $logged_info->member_srl != $member_srl ) { |
|
316 | + return new Object(0,'msg_exists_user_id'); |
|
317 | + } |
|
278 | 318 | break; |
279 | 319 | case 'nick_name' : |
280 | 320 | // Check denied ID |
@@ -284,13 +324,17 @@ discard block |
||
284 | 324 | } |
285 | 325 | // Check if duplicated |
286 | 326 | $member_srl = $oMemberModel->getMemberSrlByNickName($value); |
287 | - if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_nick_name'); |
|
327 | + if($member_srl && $logged_info->member_srl != $member_srl ) { |
|
328 | + return new Object(0,'msg_exists_nick_name'); |
|
329 | + } |
|
288 | 330 | |
289 | 331 | break; |
290 | 332 | case 'email_address' : |
291 | 333 | // Check if duplicated |
292 | 334 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($value); |
293 | - if($member_srl && $logged_info->member_srl != $member_srl ) return new Object(0,'msg_exists_email_address'); |
|
335 | + if($member_srl && $logged_info->member_srl != $member_srl ) { |
|
336 | + return new Object(0,'msg_exists_email_address'); |
|
337 | + } |
|
294 | 338 | break; |
295 | 339 | } |
296 | 340 | } |
@@ -302,17 +346,25 @@ discard block |
||
302 | 346 | */ |
303 | 347 | function procMemberInsert() |
304 | 348 | { |
305 | - if (Context::getRequestMethod () == "GET") return new Object (-1, "msg_invalid_request"); |
|
349 | + if (Context::getRequestMethod () == "GET") { |
|
350 | + return new Object (-1, "msg_invalid_request"); |
|
351 | + } |
|
306 | 352 | $oMemberModel = &getModel ('member'); |
307 | 353 | $config = $oMemberModel->getMemberConfig(); |
308 | 354 | |
309 | 355 | // call a trigger (before) |
310 | 356 | $trigger_output = ModuleHandler::triggerCall ('member.procMemberInsert', 'before', $config); |
311 | - if(!$trigger_output->toBool ()) return $trigger_output; |
|
357 | + if(!$trigger_output->toBool ()) { |
|
358 | + return $trigger_output; |
|
359 | + } |
|
312 | 360 | // Check if an administrator allows a membership |
313 | - if($config->enable_join != 'Y') return $this->stop ('msg_signup_disabled'); |
|
361 | + if($config->enable_join != 'Y') { |
|
362 | + return $this->stop ('msg_signup_disabled'); |
|
363 | + } |
|
314 | 364 | // Check if the user accept the license terms (only if terms exist) |
315 | - if($config->agreement && Context::get('accept_agreement')!='Y') return $this->stop('msg_accept_agreement'); |
|
365 | + if($config->agreement && Context::get('accept_agreement')!='Y') { |
|
366 | + return $this->stop('msg_accept_agreement'); |
|
367 | + } |
|
316 | 368 | |
317 | 369 | // Extract the necessary information in advance |
318 | 370 | $getVars = array(); |
@@ -331,16 +383,22 @@ discard block |
||
331 | 383 | foreach($getVars as $val) |
332 | 384 | { |
333 | 385 | $args->{$val} = Context::get($val); |
334 | - if($val == 'birthday') $args->birthday_ui = Context::get('birthday_ui'); |
|
386 | + if($val == 'birthday') { |
|
387 | + $args->birthday_ui = Context::get('birthday_ui'); |
|
388 | + } |
|
335 | 389 | } |
336 | 390 | $args->birthday = intval(strtr($args->birthday, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
337 | - if(!$args->birthday && $args->birthday_ui) $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
391 | + if(!$args->birthday && $args->birthday_ui) { |
|
392 | + $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
393 | + } |
|
338 | 394 | |
339 | 395 | $args->find_account_answer = Context::get('find_account_answer'); |
340 | 396 | $args->allow_mailing = Context::get('allow_mailing'); |
341 | 397 | $args->allow_message = Context::get('allow_message'); |
342 | 398 | |
343 | - if($args->password1) $args->password = $args->password1; |
|
399 | + if($args->password1) { |
|
400 | + $args->password = $args->password1; |
|
401 | + } |
|
344 | 402 | |
345 | 403 | // check password strength |
346 | 404 | if(!$oMemberModel->checkPasswordStrength($args->password, $config->password_strength)) |
@@ -369,7 +427,9 @@ discard block |
||
369 | 427 | unset($all_args->secret_text); |
370 | 428 | |
371 | 429 | // Set the user state as "denied" when using mail authentication |
372 | - if($config->enable_confirm == 'Y') $args->denied = 'Y'; |
|
430 | + if($config->enable_confirm == 'Y') { |
|
431 | + $args->denied = 'Y'; |
|
432 | + } |
|
373 | 433 | // Add extra vars after excluding necessary information from all the requested arguments |
374 | 434 | $extra_vars = delObjectVars($all_args, $args); |
375 | 435 | $args->extra_vars = serialize($extra_vars); |
@@ -384,7 +444,9 @@ discard block |
||
384 | 444 | } |
385 | 445 | } |
386 | 446 | $output = $this->insertMember($args); |
387 | - if(!$output->toBool()) return $output; |
|
447 | + if(!$output->toBool()) { |
|
448 | + return $output; |
|
449 | + } |
|
388 | 450 | |
389 | 451 | // insert ProfileImage, ImageName, ImageMark |
390 | 452 | $profile_image = $_FILES['profile_image']; |
@@ -423,43 +485,46 @@ discard block |
||
423 | 485 | if($config->identifier == 'email_address') |
424 | 486 | { |
425 | 487 | $output = $this->doLogin($args->email_address); |
426 | - } |
|
427 | - else |
|
488 | + } else |
|
428 | 489 | { |
429 | 490 | $output = $this->doLogin($args->user_id); |
430 | 491 | } |
431 | 492 | if(!$output->toBool()) { |
432 | - if($output->error == -9) |
|
433 | - $output->error = -11; |
|
493 | + if($output->error == -9) { |
|
494 | + $output->error = -11; |
|
495 | + } |
|
434 | 496 | return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), $output); |
435 | 497 | } |
436 | 498 | } |
437 | 499 | |
438 | 500 | // Results |
439 | 501 | $this->add('member_srl', $args->member_srl); |
440 | - if($config->redirect_url) $this->add('redirect_url', $config->redirect_url); |
|
502 | + if($config->redirect_url) { |
|
503 | + $this->add('redirect_url', $config->redirect_url); |
|
504 | + } |
|
441 | 505 | if($config->enable_confirm == 'Y') |
442 | 506 | { |
443 | 507 | $msg = sprintf(Context::getLang('msg_confirm_mail_sent'), $args->email_address); |
444 | 508 | $this->setMessage($msg); |
445 | 509 | return $this->setRedirectUrl(getUrl('', 'act', 'dispMemberLoginForm'), new Object(-12, $msg)); |
510 | + } else { |
|
511 | + $this->setMessage('success_registed'); |
|
446 | 512 | } |
447 | - else $this->setMessage('success_registed'); |
|
448 | 513 | // Call a trigger (after) |
449 | 514 | $trigger_output = ModuleHandler::triggerCall('member.procMemberInsert', 'after', $config); |
450 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
515 | + if(!$trigger_output->toBool()) { |
|
516 | + return $trigger_output; |
|
517 | + } |
|
451 | 518 | |
452 | 519 | if($config->redirect_url) |
453 | 520 | { |
454 | 521 | $returnUrl = $config->redirect_url; |
455 | - } |
|
456 | - else |
|
522 | + } else |
|
457 | 523 | { |
458 | 524 | if(Context::get('success_return_url')) |
459 | 525 | { |
460 | 526 | $returnUrl = Context::get('success_return_url'); |
461 | - } |
|
462 | - else if($_COOKIE['XE_REDIRECT_URL']) |
|
527 | + } else if($_COOKIE['XE_REDIRECT_URL']) |
|
463 | 528 | { |
464 | 529 | $returnUrl = $_COOKIE['XE_REDIRECT_URL']; |
465 | 530 | setcookie("XE_REDIRECT_URL", '', 1); |
@@ -513,8 +578,7 @@ discard block |
||
513 | 578 | if(Context::get('success_return_url')) |
514 | 579 | { |
515 | 580 | $redirectUrl = Context::get('success_return_url'); |
516 | - } |
|
517 | - else |
|
581 | + } else |
|
518 | 582 | { |
519 | 583 | $redirectUrl = getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', 'dispMemberModifyInfo'); |
520 | 584 | } |
@@ -558,7 +622,9 @@ discard block |
||
558 | 622 | foreach($getVars as $val) |
559 | 623 | { |
560 | 624 | $args->{$val} = Context::get($val); |
561 | - if($val == 'birthday') $args->birthday_ui = Context::get('birthday_ui'); |
|
625 | + if($val == 'birthday') { |
|
626 | + $args->birthday_ui = Context::get('birthday_ui'); |
|
627 | + } |
|
562 | 628 | if($val == 'find_account_answer' && !Context::get($val)) { |
563 | 629 | unset($args->{$val}); |
564 | 630 | } |
@@ -568,7 +634,9 @@ discard block |
||
568 | 634 | $logged_info = Context::get('logged_info'); |
569 | 635 | $args->member_srl = $logged_info->member_srl; |
570 | 636 | $args->birthday = intval(strtr($args->birthday, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
571 | - if(!$args->birthday && $args->birthday_ui) $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
637 | + if(!$args->birthday && $args->birthday_ui) { |
|
638 | + $args->birthday = intval(strtr($args->birthday_ui, array('-'=>'', '/'=>'', '.'=>'', ' '=>''))); |
|
639 | + } |
|
572 | 640 | |
573 | 641 | // Remove some unnecessary variables from all the vars |
574 | 642 | $all_args = Context::getRequestVars(); |
@@ -603,7 +671,9 @@ discard block |
||
603 | 671 | |
604 | 672 | // Execute insert or update depending on the value of member_srl |
605 | 673 | $output = $this->updateMember($args); |
606 | - if(!$output->toBool()) return $output; |
|
674 | + if(!$output->toBool()) { |
|
675 | + return $output; |
|
676 | + } |
|
607 | 677 | |
608 | 678 | $profile_image = $_FILES['profile_image']; |
609 | 679 | if(is_uploaded_file($profile_image['tmp_name'])) |
@@ -633,7 +703,9 @@ discard block |
||
633 | 703 | |
634 | 704 | // Call a trigger after successfully log-in (after) |
635 | 705 | $trigger_output = ModuleHandler::triggerCall('member.procMemberModifyInfo', 'after', $this->memberInfo); |
636 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
706 | + if(!$trigger_output->toBool()) { |
|
707 | + return $trigger_output; |
|
708 | + } |
|
637 | 709 | |
638 | 710 | $this->setSessionInfo(); |
639 | 711 | // Return result |
@@ -654,7 +726,9 @@ discard block |
||
654 | 726 | */ |
655 | 727 | function procMemberModifyPassword() |
656 | 728 | { |
657 | - if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
729 | + if(!Context::get('is_logged')) { |
|
730 | + return $this->stop('msg_not_logged'); |
|
731 | + } |
|
658 | 732 | // Extract the necessary information in advance |
659 | 733 | $current_password = trim(Context::get('current_password')); |
660 | 734 | $password = trim(Context::get('password1')); |
@@ -668,17 +742,23 @@ discard block |
||
668 | 742 | |
669 | 743 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
670 | 744 | // Verify the cuttent password |
671 | - if(!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) return new Object(-1, 'invalid_password'); |
|
745 | + if(!$oMemberModel->isValidPassword($member_info->password, $current_password, $member_srl)) { |
|
746 | + return new Object(-1, 'invalid_password'); |
|
747 | + } |
|
672 | 748 | |
673 | 749 | // Check if a new password is as same as the previous password |
674 | - if($current_password == $password) return new Object(-1, 'invalid_new_password'); |
|
750 | + if($current_password == $password) { |
|
751 | + return new Object(-1, 'invalid_new_password'); |
|
752 | + } |
|
675 | 753 | |
676 | 754 | // Execute insert or update depending on the value of member_srl |
677 | 755 | $args = new stdClass; |
678 | 756 | $args->member_srl = $member_srl; |
679 | 757 | $args->password = $password; |
680 | 758 | $output = $this->updateMemberPassword($args); |
681 | - if(!$output->toBool()) return $output; |
|
759 | + if(!$output->toBool()) { |
|
760 | + return $output; |
|
761 | + } |
|
682 | 762 | |
683 | 763 | $this->add('member_srl', $args->member_srl); |
684 | 764 | $this->setMessage('success_updated'); |
@@ -694,7 +774,9 @@ discard block |
||
694 | 774 | */ |
695 | 775 | function procMemberLeave() |
696 | 776 | { |
697 | - if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
777 | + if(!Context::get('is_logged')) { |
|
778 | + return $this->stop('msg_not_logged'); |
|
779 | + } |
|
698 | 780 | // Extract the necessary information in advance |
699 | 781 | $password = trim(Context::get('password')); |
700 | 782 | // Get information of logged-in user |
@@ -710,10 +792,14 @@ discard block |
||
710 | 792 | $this->memberInfo->password = $memberInfo->password; |
711 | 793 | } |
712 | 794 | // Verify the cuttent password |
713 | - if(!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) return new Object(-1, 'invalid_password'); |
|
795 | + if(!$oMemberModel->isValidPassword($this->memberInfo->password, $password)) { |
|
796 | + return new Object(-1, 'invalid_password'); |
|
797 | + } |
|
714 | 798 | |
715 | 799 | $output = $this->deleteMember($member_srl); |
716 | - if(!$output->toBool()) return $output; |
|
800 | + if(!$output->toBool()) { |
|
801 | + return $output; |
|
802 | + } |
|
717 | 803 | // Destroy all session information |
718 | 804 | $this->destroySessionInfo(); |
719 | 805 | // Return success message |
@@ -732,17 +818,25 @@ discard block |
||
732 | 818 | { |
733 | 819 | // Check if the file is successfully uploaded |
734 | 820 | $file = $_FILES['profile_image']; |
735 | - if(!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_profile_image'); |
|
821 | + if(!is_uploaded_file($file['tmp_name'])) { |
|
822 | + return $this->stop('msg_not_uploaded_profile_image'); |
|
823 | + } |
|
736 | 824 | // Ignore if member_srl is invalid or doesn't exist. |
737 | 825 | $member_srl = Context::get('member_srl'); |
738 | - if(!$member_srl) return $this->stop('msg_not_uploaded_profile_image'); |
|
826 | + if(!$member_srl) { |
|
827 | + return $this->stop('msg_not_uploaded_profile_image'); |
|
828 | + } |
|
739 | 829 | |
740 | 830 | $logged_info = Context::get('logged_info'); |
741 | - if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_profile_image'); |
|
831 | + if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) { |
|
832 | + return $this->stop('msg_not_uploaded_profile_image'); |
|
833 | + } |
|
742 | 834 | // Return if member module is set not to use an image name or the user is not an administrator ; |
743 | 835 | $oModuleModel = getModel('module'); |
744 | 836 | $config = $oModuleModel->getModuleConfig('member'); |
745 | - if($logged_info->is_admin != 'Y' && $config->profile_image != 'Y') return $this->stop('msg_not_uploaded_profile_image'); |
|
837 | + if($logged_info->is_admin != 'Y' && $config->profile_image != 'Y') { |
|
838 | + return $this->stop('msg_not_uploaded_profile_image'); |
|
839 | + } |
|
746 | 840 | |
747 | 841 | $this->insertProfileImage($member_srl, $file['tmp_name']); |
748 | 842 | // Page refresh |
@@ -764,26 +858,35 @@ discard block |
||
764 | 858 | { |
765 | 859 | |
766 | 860 | // Check uploaded file |
767 | - if(!checkUploadedFile($target_file)) return; |
|
861 | + if(!checkUploadedFile($target_file)) { |
|
862 | + return; |
|
863 | + } |
|
768 | 864 | |
769 | 865 | $oMemberModel = getModel('member'); |
770 | 866 | $config = $oMemberModel->getMemberConfig(); |
771 | 867 | |
772 | 868 | // Get an image size |
773 | 869 | $max_width = $config->profile_image_max_width; |
774 | - if(!$max_width) $max_width = "90"; |
|
870 | + if(!$max_width) { |
|
871 | + $max_width = "90"; |
|
872 | + } |
|
775 | 873 | $max_height = $config->profile_image_max_height; |
776 | - if(!$max_height) $max_height = "90"; |
|
874 | + if(!$max_height) { |
|
875 | + $max_height = "90"; |
|
876 | + } |
|
777 | 877 | // Get a target path to save |
778 | 878 | $target_path = sprintf('files/member_extra_info/profile_image/%s', getNumberingPath($member_srl)); |
779 | 879 | FileHandler::makeDir($target_path); |
780 | 880 | |
781 | 881 | // Get file information |
782 | 882 | list($width, $height, $type, $attrs) = @getimagesize($target_file); |
783 | - if(IMAGETYPE_PNG == $type) $ext = 'png'; |
|
784 | - elseif(IMAGETYPE_JPEG == $type) $ext = 'jpg'; |
|
785 | - elseif(IMAGETYPE_GIF == $type) $ext = 'gif'; |
|
786 | - else |
|
883 | + if(IMAGETYPE_PNG == $type) { |
|
884 | + $ext = 'png'; |
|
885 | + } elseif(IMAGETYPE_JPEG == $type) { |
|
886 | + $ext = 'jpg'; |
|
887 | + } elseif(IMAGETYPE_GIF == $type) { |
|
888 | + $ext = 'gif'; |
|
889 | + } else |
|
787 | 890 | { |
788 | 891 | return; |
789 | 892 | } |
@@ -795,8 +898,7 @@ discard block |
||
795 | 898 | if(($width > $max_width || $height > $max_height ) && $type != 1) |
796 | 899 | { |
797 | 900 | FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, $ext); |
798 | - } |
|
799 | - else |
|
901 | + } else |
|
800 | 902 | { |
801 | 903 | @copy($target_file, $target_filename); |
802 | 904 | } |
@@ -811,17 +913,25 @@ discard block |
||
811 | 913 | { |
812 | 914 | // Check if the file is successfully uploaded |
813 | 915 | $file = $_FILES['image_name']; |
814 | - if(!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_image_name'); |
|
916 | + if(!is_uploaded_file($file['tmp_name'])) { |
|
917 | + return $this->stop('msg_not_uploaded_image_name'); |
|
918 | + } |
|
815 | 919 | // Ignore if member_srl is invalid or doesn't exist. |
816 | 920 | $member_srl = Context::get('member_srl'); |
817 | - if(!$member_srl) return $this->stop('msg_not_uploaded_image_name'); |
|
921 | + if(!$member_srl) { |
|
922 | + return $this->stop('msg_not_uploaded_image_name'); |
|
923 | + } |
|
818 | 924 | |
819 | 925 | $logged_info = Context::get('logged_info'); |
820 | - if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_image_name'); |
|
926 | + if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) { |
|
927 | + return $this->stop('msg_not_uploaded_image_name'); |
|
928 | + } |
|
821 | 929 | // Return if member module is set not to use an image name or the user is not an administrator ; |
822 | 930 | $oModuleModel = getModel('module'); |
823 | 931 | $config = $oModuleModel->getModuleConfig('member'); |
824 | - if($logged_info->is_admin != 'Y' && $config->image_name != 'Y') return $this->stop('msg_not_uploaded_image_name'); |
|
932 | + if($logged_info->is_admin != 'Y' && $config->image_name != 'Y') { |
|
933 | + return $this->stop('msg_not_uploaded_image_name'); |
|
934 | + } |
|
825 | 935 | |
826 | 936 | $this->insertImageName($member_srl, $file['tmp_name']); |
827 | 937 | // Page refresh |
@@ -842,15 +952,21 @@ discard block |
||
842 | 952 | function insertImageName($member_srl, $target_file) |
843 | 953 | { |
844 | 954 | // Check uploaded file |
845 | - if(!checkUploadedFile($target_file)) return; |
|
955 | + if(!checkUploadedFile($target_file)) { |
|
956 | + return; |
|
957 | + } |
|
846 | 958 | |
847 | 959 | $oModuleModel = getModel('module'); |
848 | 960 | $config = $oModuleModel->getModuleConfig('member'); |
849 | 961 | // Get an image size |
850 | 962 | $max_width = $config->image_name_max_width; |
851 | - if(!$max_width) $max_width = "90"; |
|
963 | + if(!$max_width) { |
|
964 | + $max_width = "90"; |
|
965 | + } |
|
852 | 966 | $max_height = $config->image_name_max_height; |
853 | - if(!$max_height) $max_height = "20"; |
|
967 | + if(!$max_height) { |
|
968 | + $max_height = "20"; |
|
969 | + } |
|
854 | 970 | // Get a target path to save |
855 | 971 | $target_path = sprintf('files/member_extra_info/image_name/%s/', getNumberingPath($member_srl)); |
856 | 972 | FileHandler::makeDir($target_path); |
@@ -859,8 +975,11 @@ discard block |
||
859 | 975 | // Get file information |
860 | 976 | list($width, $height, $type, $attrs) = @getimagesize($target_file); |
861 | 977 | // Convert if the image size is larger than a given size or if the format is not a gif |
862 | - if($width > $max_width || $height > $max_height || $type!=1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
863 | - else @copy($target_file, $target_filename); |
|
978 | + if($width > $max_width || $height > $max_height || $type!=1) { |
|
979 | + FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
980 | + } else { |
|
981 | + @copy($target_file, $target_filename); |
|
982 | + } |
|
864 | 983 | } |
865 | 984 | |
866 | 985 | /** |
@@ -920,17 +1039,25 @@ discard block |
||
920 | 1039 | { |
921 | 1040 | // Check if the file is successfully uploaded |
922 | 1041 | $file = $_FILES['image_mark']; |
923 | - if(!is_uploaded_file($file['tmp_name'])) return $this->stop('msg_not_uploaded_image_mark'); |
|
1042 | + if(!is_uploaded_file($file['tmp_name'])) { |
|
1043 | + return $this->stop('msg_not_uploaded_image_mark'); |
|
1044 | + } |
|
924 | 1045 | // Ignore if member_srl is invalid or doesn't exist. |
925 | 1046 | $member_srl = Context::get('member_srl'); |
926 | - if(!$member_srl) return $this->stop('msg_not_uploaded_image_mark'); |
|
1047 | + if(!$member_srl) { |
|
1048 | + return $this->stop('msg_not_uploaded_image_mark'); |
|
1049 | + } |
|
927 | 1050 | |
928 | 1051 | $logged_info = Context::get('logged_info'); |
929 | - if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) return $this->stop('msg_not_uploaded_image_mark'); |
|
1052 | + if($logged_info->is_admin != 'Y' && $logged_info->member_srl != $member_srl) { |
|
1053 | + return $this->stop('msg_not_uploaded_image_mark'); |
|
1054 | + } |
|
930 | 1055 | // Membership in the images mark the module using the ban was set by an administrator or return; |
931 | 1056 | $oModuleModel = getModel('module'); |
932 | 1057 | $config = $oModuleModel->getModuleConfig('member'); |
933 | - if($logged_info->is_admin != 'Y' && $config->image_mark != 'Y') return $this->stop('msg_not_uploaded_image_mark'); |
|
1058 | + if($logged_info->is_admin != 'Y' && $config->image_mark != 'Y') { |
|
1059 | + return $this->stop('msg_not_uploaded_image_mark'); |
|
1060 | + } |
|
934 | 1061 | |
935 | 1062 | $this->insertImageMark($member_srl, $file['tmp_name']); |
936 | 1063 | // Page refresh |
@@ -951,15 +1078,21 @@ discard block |
||
951 | 1078 | function insertImageMark($member_srl, $target_file) |
952 | 1079 | { |
953 | 1080 | // Check uploaded file |
954 | - if(!checkUploadedFile($target_file)) return; |
|
1081 | + if(!checkUploadedFile($target_file)) { |
|
1082 | + return; |
|
1083 | + } |
|
955 | 1084 | |
956 | 1085 | $oModuleModel = getModel('module'); |
957 | 1086 | $config = $oModuleModel->getModuleConfig('member'); |
958 | 1087 | // Get an image size |
959 | 1088 | $max_width = $config->image_mark_max_width; |
960 | - if(!$max_width) $max_width = "20"; |
|
1089 | + if(!$max_width) { |
|
1090 | + $max_width = "20"; |
|
1091 | + } |
|
961 | 1092 | $max_height = $config->image_mark_max_height; |
962 | - if(!$max_height) $max_height = "20"; |
|
1093 | + if(!$max_height) { |
|
1094 | + $max_height = "20"; |
|
1095 | + } |
|
963 | 1096 | |
964 | 1097 | $target_path = sprintf('files/member_extra_info/image_mark/%s/', getNumberingPath($member_srl)); |
965 | 1098 | FileHandler::makeDir($target_path); |
@@ -968,8 +1101,11 @@ discard block |
||
968 | 1101 | // Get file information |
969 | 1102 | list($width, $height, $type, $attrs) = @getimagesize($target_file); |
970 | 1103 | |
971 | - if($width > $max_width || $height > $max_height || $type!=1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
972 | - else @copy($target_file, $target_filename); |
|
1104 | + if($width > $max_width || $height > $max_height || $type!=1) { |
|
1105 | + FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, 'gif'); |
|
1106 | + } else { |
|
1107 | + @copy($target_file, $target_filename); |
|
1108 | + } |
|
973 | 1109 | } |
974 | 1110 | |
975 | 1111 | /** |
@@ -1004,14 +1140,18 @@ discard block |
||
1004 | 1140 | function procMemberFindAccount() |
1005 | 1141 | { |
1006 | 1142 | $email_address = Context::get('email_address'); |
1007 | - if(!$email_address) return new Object(-1, 'msg_invalid_request'); |
|
1143 | + if(!$email_address) { |
|
1144 | + return new Object(-1, 'msg_invalid_request'); |
|
1145 | + } |
|
1008 | 1146 | |
1009 | 1147 | $oMemberModel = getModel('member'); |
1010 | 1148 | $oModuleModel = getModel('module'); |
1011 | 1149 | |
1012 | 1150 | // Check if a member having the same email address exists |
1013 | 1151 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($email_address); |
1014 | - if(!$member_srl) return new Object(-1, 'msg_email_not_exists'); |
|
1152 | + if(!$member_srl) { |
|
1153 | + return new Object(-1, 'msg_email_not_exists'); |
|
1154 | + } |
|
1015 | 1155 | |
1016 | 1156 | // Get information of the member |
1017 | 1157 | $columnList = array('denied', 'member_srl', 'user_id', 'user_name', 'email_address', 'nick_name'); |
@@ -1023,7 +1163,9 @@ discard block |
||
1023 | 1163 | $chk_args = new stdClass; |
1024 | 1164 | $chk_args->member_srl = $member_info->member_srl; |
1025 | 1165 | $output = executeQuery('member.chkAuthMail', $chk_args); |
1026 | - if($output->toBool() && $output->data->count != '0') return new Object(-1, 'msg_user_not_confirmed'); |
|
1166 | + if($output->toBool() && $output->data->count != '0') { |
|
1167 | + return new Object(-1, 'msg_user_not_confirmed'); |
|
1168 | + } |
|
1027 | 1169 | } |
1028 | 1170 | |
1029 | 1171 | // Insert data into the authentication DB |
@@ -1036,7 +1178,9 @@ discard block |
||
1036 | 1178 | $args->is_register = 'N'; |
1037 | 1179 | |
1038 | 1180 | $output = executeQuery('member.insertAuthMail', $args); |
1039 | - if(!$output->toBool()) return $output; |
|
1181 | + if(!$output->toBool()) { |
|
1182 | + return $output; |
|
1183 | + } |
|
1040 | 1184 | // Get content of the email to send a member |
1041 | 1185 | Context::set('auth_args', $args); |
1042 | 1186 | |
@@ -1053,8 +1197,7 @@ discard block |
||
1053 | 1197 | $memberInfo[$lang->{$form->name}] = $member_info->{$form->name}; |
1054 | 1198 | } |
1055 | 1199 | } |
1056 | - } |
|
1057 | - else |
|
1200 | + } else |
|
1058 | 1201 | { |
1059 | 1202 | $memberInfo[$lang->user_id] = $args->user_id; |
1060 | 1203 | $memberInfo[$lang->user_name] = $args->user_name; |
@@ -1063,13 +1206,19 @@ discard block |
||
1063 | 1206 | } |
1064 | 1207 | Context::set('memberInfo', $memberInfo); |
1065 | 1208 | |
1066 | - if(!$member_config->skin) $member_config->skin = "default"; |
|
1067 | - if(!$member_config->colorset) $member_config->colorset = "white"; |
|
1209 | + if(!$member_config->skin) { |
|
1210 | + $member_config->skin = "default"; |
|
1211 | + } |
|
1212 | + if(!$member_config->colorset) { |
|
1213 | + $member_config->colorset = "white"; |
|
1214 | + } |
|
1068 | 1215 | |
1069 | 1216 | Context::set('member_config', $member_config); |
1070 | 1217 | |
1071 | 1218 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
1072 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1219 | + if(!is_dir($tpl_path)) { |
|
1220 | + $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1221 | + } |
|
1073 | 1222 | |
1074 | 1223 | $find_url = getFullUrl ('', 'module', 'member', 'act', 'procMemberAuthAccount', 'member_srl', $member_info->member_srl, 'auth_key', $args->auth_key); |
1075 | 1224 | Context::set('find_url', $find_url); |
@@ -1112,19 +1261,25 @@ discard block |
||
1112 | 1261 | $find_account_question = trim(Context::get('find_account_question')); |
1113 | 1262 | $find_account_answer = trim(Context::get('find_account_answer')); |
1114 | 1263 | |
1115 | - if(($config->identifier == 'user_id' && !$user_id) || !$email_address || !$find_account_question || !$find_account_answer) return new Object(-1, 'msg_invalid_request'); |
|
1264 | + if(($config->identifier == 'user_id' && !$user_id) || !$email_address || !$find_account_question || !$find_account_answer) { |
|
1265 | + return new Object(-1, 'msg_invalid_request'); |
|
1266 | + } |
|
1116 | 1267 | |
1117 | 1268 | $oModuleModel = getModel('module'); |
1118 | 1269 | // Check if a member having the same email address exists |
1119 | 1270 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($email_address); |
1120 | - if(!$member_srl) return new Object(-1, 'msg_email_not_exists'); |
|
1271 | + if(!$member_srl) { |
|
1272 | + return new Object(-1, 'msg_email_not_exists'); |
|
1273 | + } |
|
1121 | 1274 | |
1122 | 1275 | // Get information of the member |
1123 | 1276 | $columnList = array('member_srl', 'find_account_question', 'find_account_answer'); |
1124 | 1277 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
1125 | 1278 | |
1126 | 1279 | // Display a message if no answer is entered |
1127 | - if(!$member_info->find_account_question || !$member_info->find_account_answer) return new Object(-1, 'msg_question_not_exists'); |
|
1280 | + if(!$member_info->find_account_question || !$member_info->find_account_answer) { |
|
1281 | + return new Object(-1, 'msg_question_not_exists'); |
|
1282 | + } |
|
1128 | 1283 | |
1129 | 1284 | // 답변 확인 |
1130 | 1285 | $hashed = $oPassword->checkAlgorithm($member_info->find_account_answer); |
@@ -1133,12 +1288,10 @@ discard block |
||
1133 | 1288 | if($member_info->find_account_question != $find_account_question) |
1134 | 1289 | { |
1135 | 1290 | $authed = false; |
1136 | - } |
|
1137 | - else if($hashed && !$oPassword->checkPassword($find_account_answer, $member_info->find_account_answer)) |
|
1291 | + } else if($hashed && !$oPassword->checkPassword($find_account_answer, $member_info->find_account_answer)) |
|
1138 | 1292 | { |
1139 | 1293 | $authed = false; |
1140 | - } |
|
1141 | - else if(!$hashed && $find_account_answer != $member_info->find_account_answer) |
|
1294 | + } else if(!$hashed && $find_account_answer != $member_info->find_account_answer) |
|
1142 | 1295 | { |
1143 | 1296 | $authed = false; |
1144 | 1297 | } |
@@ -1167,7 +1320,9 @@ discard block |
||
1167 | 1320 | $args->password = $temp_password; |
1168 | 1321 | $args->change_password_date = '1'; |
1169 | 1322 | $output = $this->updateMemberPassword($args); |
1170 | - if(!$output->toBool()) return $output; |
|
1323 | + if(!$output->toBool()) { |
|
1324 | + return $output; |
|
1325 | + } |
|
1171 | 1326 | |
1172 | 1327 | $_SESSION['xe_temp_password_' . $user_id] = $temp_password; |
1173 | 1328 | |
@@ -1224,8 +1379,7 @@ discard block |
||
1224 | 1379 | if($output->data->is_register == 'Y') |
1225 | 1380 | { |
1226 | 1381 | $args->denied = 'N'; |
1227 | - } |
|
1228 | - else |
|
1382 | + } else |
|
1229 | 1383 | { |
1230 | 1384 | $args->password = $oMemberModel->hashPassword($args->password); |
1231 | 1385 | } |
@@ -1259,33 +1413,45 @@ discard block |
||
1259 | 1413 | { |
1260 | 1414 | // Get an email_address |
1261 | 1415 | $email_address = Context::get('email_address'); |
1262 | - if(!$email_address) return new Object(-1, 'msg_invalid_request'); |
|
1416 | + if(!$email_address) { |
|
1417 | + return new Object(-1, 'msg_invalid_request'); |
|
1418 | + } |
|
1263 | 1419 | // Log test by using email_address |
1264 | 1420 | $oMemberModel = getModel('member'); |
1265 | 1421 | |
1266 | 1422 | $args = new stdClass; |
1267 | 1423 | $args->email_address = $email_address; |
1268 | 1424 | $memberSrl = $oMemberModel->getMemberSrlByEmailAddress($email_address); |
1269 | - if(!$memberSrl) return new Object(-1, 'msg_not_exists_member'); |
|
1425 | + if(!$memberSrl) { |
|
1426 | + return new Object(-1, 'msg_not_exists_member'); |
|
1427 | + } |
|
1270 | 1428 | |
1271 | 1429 | $columnList = array('member_srl', 'user_id', 'user_name', 'nick_name', 'email_address'); |
1272 | 1430 | $member_info = $oMemberModel->getMemberInfoByMemberSrl($memberSrl, 0, $columnList); |
1273 | 1431 | |
1274 | 1432 | $oModuleModel = getModel('module'); |
1275 | 1433 | $member_config = $oModuleModel->getModuleConfig('member'); |
1276 | - if(!$member_config->skin) $member_config->skin = "default"; |
|
1277 | - if(!$member_config->colorset) $member_config->colorset = "white"; |
|
1434 | + if(!$member_config->skin) { |
|
1435 | + $member_config->skin = "default"; |
|
1436 | + } |
|
1437 | + if(!$member_config->colorset) { |
|
1438 | + $member_config->colorset = "white"; |
|
1439 | + } |
|
1278 | 1440 | |
1279 | 1441 | // Check if a authentication mail has been sent previously |
1280 | 1442 | $chk_args = new stdClass; |
1281 | 1443 | $chk_args->member_srl = $member_info->member_srl; |
1282 | 1444 | $output = executeQuery('member.chkAuthMail', $chk_args); |
1283 | - if($output->toBool() && $output->data->count == '0') return new Object(-1, 'msg_invalid_request'); |
|
1445 | + if($output->toBool() && $output->data->count == '0') { |
|
1446 | + return new Object(-1, 'msg_invalid_request'); |
|
1447 | + } |
|
1284 | 1448 | |
1285 | 1449 | $auth_args = new stdClass; |
1286 | 1450 | $auth_args->member_srl = $member_info->member_srl; |
1287 | 1451 | $output = executeQueryArray('member.getAuthMailInfo', $auth_args); |
1288 | - if(!$output->data || !$output->data[0]->auth_key) return new Object(-1, 'msg_invalid_request'); |
|
1452 | + if(!$output->data || !$output->data[0]->auth_key) { |
|
1453 | + return new Object(-1, 'msg_invalid_request'); |
|
1454 | + } |
|
1289 | 1455 | $auth_info = $output->data[0]; |
1290 | 1456 | |
1291 | 1457 | // Update the regdate of authmail entry |
@@ -1306,8 +1472,7 @@ discard block |
||
1306 | 1472 | $memberInfo[$lang->{$form->name}] = $member_info->{$form->name}; |
1307 | 1473 | } |
1308 | 1474 | } |
1309 | - } |
|
1310 | - else |
|
1475 | + } else |
|
1311 | 1476 | { |
1312 | 1477 | $memberInfo[$lang->user_id] = $member_info->user_id; |
1313 | 1478 | $memberInfo[$lang->user_name] = $member_info->user_name; |
@@ -1320,7 +1485,9 @@ discard block |
||
1320 | 1485 | Context::set('member_config', $member_config); |
1321 | 1486 | |
1322 | 1487 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
1323 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1488 | + if(!is_dir($tpl_path)) { |
|
1489 | + $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1490 | + } |
|
1324 | 1491 | |
1325 | 1492 | $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$auth_info->auth_key); |
1326 | 1493 | Context::set('auth_url', $auth_url); |
@@ -1398,7 +1565,9 @@ discard block |
||
1398 | 1565 | $auth_args->is_register = 'Y'; |
1399 | 1566 | |
1400 | 1567 | $output = executeQuery('member.insertAuthMail', $auth_args); |
1401 | - if(!$output->toBool()) return $output; |
|
1568 | + if(!$output->toBool()) { |
|
1569 | + return $output; |
|
1570 | + } |
|
1402 | 1571 | |
1403 | 1572 | $memberInfo->email_address = $newEmail; |
1404 | 1573 | |
@@ -1432,8 +1601,7 @@ discard block |
||
1432 | 1601 | $memberInfo[$lang->{$form->name}] = $member_info->{$form->name}; |
1433 | 1602 | } |
1434 | 1603 | } |
1435 | - } |
|
1436 | - else |
|
1604 | + } else |
|
1437 | 1605 | { |
1438 | 1606 | $memberInfo[$lang->user_id] = $member_info->user_id; |
1439 | 1607 | $memberInfo[$lang->user_name] = $member_info->user_name; |
@@ -1442,13 +1610,19 @@ discard block |
||
1442 | 1610 | } |
1443 | 1611 | Context::set('memberInfo', $memberInfo); |
1444 | 1612 | |
1445 | - if(!$member_config->skin) $member_config->skin = "default"; |
|
1446 | - if(!$member_config->colorset) $member_config->colorset = "white"; |
|
1613 | + if(!$member_config->skin) { |
|
1614 | + $member_config->skin = "default"; |
|
1615 | + } |
|
1616 | + if(!$member_config->colorset) { |
|
1617 | + $member_config->colorset = "white"; |
|
1618 | + } |
|
1447 | 1619 | |
1448 | 1620 | Context::set('member_config', $member_config); |
1449 | 1621 | |
1450 | 1622 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
1451 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1623 | + if(!is_dir($tpl_path)) { |
|
1624 | + $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
1625 | + } |
|
1452 | 1626 | |
1453 | 1627 | $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$auth_args->auth_key); |
1454 | 1628 | Context::set('auth_url', $auth_url); |
@@ -1473,7 +1647,9 @@ discard block |
||
1473 | 1647 | { |
1474 | 1648 | $site_module_info = Context::get('site_module_info'); |
1475 | 1649 | $logged_info = Context::get('logged_info'); |
1476 | - if(!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list) ) return new Object(-1,'msg_invalid_request'); |
|
1650 | + if(!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list) ) { |
|
1651 | + return new Object(-1,'msg_invalid_request'); |
|
1652 | + } |
|
1477 | 1653 | |
1478 | 1654 | $oMemberModel = getModel('member'); |
1479 | 1655 | $columnList = array('site_srl', 'group_srl', 'title'); |
@@ -1492,13 +1668,17 @@ discard block |
||
1492 | 1668 | { |
1493 | 1669 | $site_module_info = Context::get('site_module_info'); |
1494 | 1670 | $logged_info = Context::get('logged_info'); |
1495 | - if(!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list) ) return new Object(-1,'msg_invalid_request'); |
|
1671 | + if(!$site_module_info->site_srl || !Context::get('is_logged') || count($logged_info->group_srl_list) ) { |
|
1672 | + return new Object(-1,'msg_invalid_request'); |
|
1673 | + } |
|
1496 | 1674 | |
1497 | 1675 | $args = new stdClass; |
1498 | 1676 | $args->site_srl= $site_module_info->site_srl; |
1499 | 1677 | $args->member_srl = $logged_info->member_srl; |
1500 | 1678 | $output = executeQuery('member.deleteMembersGroup', $args); |
1501 | - if(!$output->toBool()) return $output; |
|
1679 | + if(!$output->toBool()) { |
|
1680 | + return $output; |
|
1681 | + } |
|
1502 | 1682 | $this->setMessage('success_deleted'); |
1503 | 1683 | $this->_clearMemberCache($args->member_srl, $site_module_info->site_srl); |
1504 | 1684 | } |
@@ -1512,17 +1692,37 @@ discard block |
||
1512 | 1692 | */ |
1513 | 1693 | function setMemberConfig($args) |
1514 | 1694 | { |
1515 | - if(!$args->skin) $args->skin = "default"; |
|
1516 | - if(!$args->colorset) $args->colorset = "white"; |
|
1517 | - if(!$args->editor_skin) $args->editor_skin= "ckeditor"; |
|
1518 | - if(!$args->editor_colorset) $args->editor_colorset = "moono"; |
|
1519 | - if($args->enable_join!='Y') $args->enable_join = 'N'; |
|
1695 | + if(!$args->skin) { |
|
1696 | + $args->skin = "default"; |
|
1697 | + } |
|
1698 | + if(!$args->colorset) { |
|
1699 | + $args->colorset = "white"; |
|
1700 | + } |
|
1701 | + if(!$args->editor_skin) { |
|
1702 | + $args->editor_skin= "ckeditor"; |
|
1703 | + } |
|
1704 | + if(!$args->editor_colorset) { |
|
1705 | + $args->editor_colorset = "moono"; |
|
1706 | + } |
|
1707 | + if($args->enable_join!='Y') { |
|
1708 | + $args->enable_join = 'N'; |
|
1709 | + } |
|
1520 | 1710 | $args->enable_openid= 'N'; |
1521 | - if($args->profile_image !='Y') $args->profile_image = 'N'; |
|
1522 | - if($args->image_name!='Y') $args->image_name = 'N'; |
|
1523 | - if($args->image_mark!='Y') $args->image_mark = 'N'; |
|
1524 | - if($args->group_image_mark!='Y') $args->group_image_mark = 'N'; |
|
1525 | - if(!trim(strip_tags($args->agreement))) $args->agreement = null; |
|
1711 | + if($args->profile_image !='Y') { |
|
1712 | + $args->profile_image = 'N'; |
|
1713 | + } |
|
1714 | + if($args->image_name!='Y') { |
|
1715 | + $args->image_name = 'N'; |
|
1716 | + } |
|
1717 | + if($args->image_mark!='Y') { |
|
1718 | + $args->image_mark = 'N'; |
|
1719 | + } |
|
1720 | + if($args->group_image_mark!='Y') { |
|
1721 | + $args->group_image_mark = 'N'; |
|
1722 | + } |
|
1723 | + if(!trim(strip_tags($args->agreement))) { |
|
1724 | + $args->agreement = null; |
|
1725 | + } |
|
1526 | 1726 | $args->limit_day = (int)$args->limit_day; |
1527 | 1727 | |
1528 | 1728 | $agreement = trim($args->agreement); |
@@ -1530,7 +1730,9 @@ discard block |
||
1530 | 1730 | |
1531 | 1731 | $oModuleController = getController('module'); |
1532 | 1732 | $output = $oModuleController->insertModuleConfig('member',$args); |
1533 | - if(!$output->toBool()) return $output; |
|
1733 | + if(!$output->toBool()) { |
|
1734 | + return $output; |
|
1735 | + } |
|
1534 | 1736 | |
1535 | 1737 | $agreement_file = _XE_PATH_.'files/member_extra_info/agreement.txt'; |
1536 | 1738 | FileHandler::writeFile($agreement_file, $agreement); |
@@ -1555,7 +1757,9 @@ discard block |
||
1555 | 1757 | $path = sprintf('files/member_extra_info/signature/%s/', getNumberingPath($member_srl)); |
1556 | 1758 | $filename = sprintf('%s%d.signature.php', $path, $member_srl); |
1557 | 1759 | |
1558 | - if(!$check_signature) return FileHandler::removeFile($filename); |
|
1760 | + if(!$check_signature) { |
|
1761 | + return FileHandler::removeFile($filename); |
|
1762 | + } |
|
1559 | 1763 | |
1560 | 1764 | $buff = sprintf('<?php if(!defined("__XE__")) exit();?>%s', $signature); |
1561 | 1765 | FileHandler::makeDir($path); |
@@ -1589,7 +1793,9 @@ discard block |
||
1589 | 1793 | $args = new stdClass(); |
1590 | 1794 | $args->member_srl = $member_srl; |
1591 | 1795 | $args->group_srl = $group_srl; |
1592 | - if($site_srl) $args->site_srl = $site_srl; |
|
1796 | + if($site_srl) { |
|
1797 | + $args->site_srl = $site_srl; |
|
1798 | + } |
|
1593 | 1799 | |
1594 | 1800 | // Add |
1595 | 1801 | $output = executeQuery('member.addMemberToGroup',$args); |
@@ -1615,15 +1821,21 @@ discard block |
||
1615 | 1821 | $obj->member_srl = implode(',',$args->member_srl); |
1616 | 1822 | |
1617 | 1823 | $output = executeQueryArray('member.getMembersGroup', $obj); |
1618 | - if($output->data) foreach($output->data as $key => $val) $date[$val->member_srl] = $val->regdate; |
|
1824 | + if($output->data) { |
|
1825 | + foreach($output->data as $key => $val) $date[$val->member_srl] = $val->regdate; |
|
1826 | + } |
|
1619 | 1827 | |
1620 | 1828 | $output = executeQuery('member.deleteMembersGroup', $obj); |
1621 | - if(!$output->toBool()) return $output; |
|
1829 | + if(!$output->toBool()) { |
|
1830 | + return $output; |
|
1831 | + } |
|
1622 | 1832 | |
1623 | 1833 | $inserted_members = array(); |
1624 | 1834 | foreach($args->member_srl as $key => $val) |
1625 | 1835 | { |
1626 | - if($inserted_members[$val]) continue; |
|
1836 | + if($inserted_members[$val]) { |
|
1837 | + continue; |
|
1838 | + } |
|
1627 | 1839 | $inserted_members[$val] = true; |
1628 | 1840 | |
1629 | 1841 | unset($obj); |
@@ -1633,7 +1845,9 @@ discard block |
||
1633 | 1845 | $obj->site_srl = $args->site_srl; |
1634 | 1846 | $obj->regdate = $date[$obj->member_srl]; |
1635 | 1847 | $output = executeQuery('member.addMemberToGroup', $obj); |
1636 | - if(!$output->toBool()) return $output; |
|
1848 | + if(!$output->toBool()) { |
|
1849 | + return $output; |
|
1850 | + } |
|
1637 | 1851 | |
1638 | 1852 | $this->_clearMemberCache($obj->member_srl, $args->site_srl); |
1639 | 1853 | } |
@@ -1695,8 +1909,7 @@ discard block |
||
1695 | 1909 | if($config->identifier == 'user_id') |
1696 | 1910 | { |
1697 | 1911 | $member_info = $oMemberModel->getMemberInfoByUserID($user_id, $columnList); |
1698 | - } |
|
1699 | - else |
|
1912 | + } else |
|
1700 | 1913 | { |
1701 | 1914 | $member_info = $oMemberModel->getMemberInfoByEmailAddress($user_id, $columnList); |
1702 | 1915 | } |
@@ -1705,8 +1918,7 @@ discard block |
||
1705 | 1918 | $do_auto_login = true; |
1706 | 1919 | } |
1707 | 1920 | |
1708 | - } |
|
1709 | - else |
|
1921 | + } else |
|
1710 | 1922 | { |
1711 | 1923 | $do_auto_login = true; |
1712 | 1924 | } |
@@ -1715,8 +1927,7 @@ discard block |
||
1715 | 1927 | if($do_auto_login) |
1716 | 1928 | { |
1717 | 1929 | $output = $this->doLogin($user_id); |
1718 | - } |
|
1719 | - else |
|
1930 | + } else |
|
1720 | 1931 | { |
1721 | 1932 | executeQuery('member.deleteAutologin', $args); |
1722 | 1933 | setCookie('xeak',null,$_SERVER['REQUEST_TIME']+60*60*24*365); |
@@ -1735,13 +1946,17 @@ discard block |
||
1735 | 1946 | function doLogin($user_id, $password = '', $keep_signed = false) |
1736 | 1947 | { |
1737 | 1948 | $user_id = strtolower($user_id); |
1738 | - if(!$user_id) return new Object(-1, 'null_user_id'); |
|
1949 | + if(!$user_id) { |
|
1950 | + return new Object(-1, 'null_user_id'); |
|
1951 | + } |
|
1739 | 1952 | // Call a trigger before log-in (before) |
1740 | 1953 | $trigger_obj = new stdClass(); |
1741 | 1954 | $trigger_obj->user_id = $user_id; |
1742 | 1955 | $trigger_obj->password = $password; |
1743 | 1956 | $trigger_output = ModuleHandler::triggerCall('member.doLogin', 'before', $trigger_obj); |
1744 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
1957 | + if(!$trigger_output->toBool()) { |
|
1958 | + return $trigger_output; |
|
1959 | + } |
|
1745 | 1960 | // Create a member model object |
1746 | 1961 | $oMemberModel = getModel('member'); |
1747 | 1962 | |
@@ -1756,15 +1971,18 @@ discard block |
||
1756 | 1971 | // Get user_id information |
1757 | 1972 | $this->memberInfo = $oMemberModel->getMemberInfoByEmailAddress($user_id); |
1758 | 1973 | // Set an invalid user if no value returned |
1759 | - if(!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) return $this->recordLoginError(-1, 'invalid_email_address'); |
|
1974 | + if(!$user_id || strtolower($this->memberInfo->email_address) != strtolower($user_id)) { |
|
1975 | + return $this->recordLoginError(-1, 'invalid_email_address'); |
|
1976 | + } |
|
1760 | 1977 | |
1761 | - } |
|
1762 | - else |
|
1978 | + } else |
|
1763 | 1979 | { |
1764 | 1980 | // Get user_id information |
1765 | 1981 | $this->memberInfo = $oMemberModel->getMemberInfoByUserID($user_id); |
1766 | 1982 | // Set an invalid user if no value returned |
1767 | - if(!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) return $this->recordLoginError(-1, 'invalid_user_id'); |
|
1983 | + if(!$user_id || strtolower($this->memberInfo->user_id) != strtolower($user_id)) { |
|
1984 | + return $this->recordLoginError(-1, 'invalid_user_id'); |
|
1985 | + } |
|
1768 | 1986 | } |
1769 | 1987 | |
1770 | 1988 | $output = executeQuery('member.getLoginCountByIp', $args); |
@@ -1776,14 +1994,18 @@ discard block |
||
1776 | 1994 | if($term < $config->max_error_count_time) |
1777 | 1995 | { |
1778 | 1996 | $term = $config->max_error_count_time - $term; |
1779 | - if($term < 60) $term = intval($term).Context::getLang('unit_sec'); |
|
1780 | - elseif(60 <= $term && $term < 3600) $term = intval($term/60).Context::getLang('unit_min'); |
|
1781 | - elseif(3600 <= $term && $term < 86400) $term = intval($term/3600).Context::getLang('unit_hour'); |
|
1782 | - else $term = intval($term/86400).Context::getLang('unit_day'); |
|
1997 | + if($term < 60) { |
|
1998 | + $term = intval($term).Context::getLang('unit_sec'); |
|
1999 | + } elseif(60 <= $term && $term < 3600) { |
|
2000 | + $term = intval($term/60).Context::getLang('unit_min'); |
|
2001 | + } elseif(3600 <= $term && $term < 86400) { |
|
2002 | + $term = intval($term/3600).Context::getLang('unit_hour'); |
|
2003 | + } else { |
|
2004 | + $term = intval($term/86400).Context::getLang('unit_day'); |
|
2005 | + } |
|
1783 | 2006 | |
1784 | 2007 | return new Object(-1, sprintf(Context::getLang('excess_ip_access_count'),$term)); |
1785 | - } |
|
1786 | - else |
|
2008 | + } else |
|
1787 | 2009 | { |
1788 | 2010 | $args->ipaddress = $_SERVER['REMOTE_ADDR']; |
1789 | 2011 | $output = executeQuery('member.deleteLoginCountByIp', $args); |
@@ -1810,7 +2032,9 @@ discard block |
||
1810 | 2032 | return new Object(-1,'msg_user_denied'); |
1811 | 2033 | } |
1812 | 2034 | // Notify if denied_date is less than the current time |
1813 | - if($this->memberInfo->limit_date && substr($this->memberInfo->limit_date,0,8) >= date("Ymd")) return new Object(-9,sprintf(Context::getLang('msg_user_limited'),zdate($this->memberInfo->limit_date,"Y-m-d"))); |
|
2035 | + if($this->memberInfo->limit_date && substr($this->memberInfo->limit_date,0,8) >= date("Ymd")) { |
|
2036 | + return new Object(-9,sprintf(Context::getLang('msg_user_limited'),zdate($this->memberInfo->limit_date,"Y-m-d"))); |
|
2037 | + } |
|
1814 | 2038 | // Update the latest login time |
1815 | 2039 | $args->member_srl = $this->memberInfo->member_srl; |
1816 | 2040 | $output = executeQuery('member.updateLastLogin', $args); |
@@ -1859,7 +2083,9 @@ discard block |
||
1859 | 2083 | } |
1860 | 2084 | // Call a trigger after successfully log-in (after) |
1861 | 2085 | $trigger_output = ModuleHandler::triggerCall('member.doLogin', 'after', $this->memberInfo); |
1862 | - if(!$trigger_output->toBool()) return $trigger_output; |
|
2086 | + if(!$trigger_output->toBool()) { |
|
2087 | + return $trigger_output; |
|
2088 | + } |
|
1863 | 2089 | // When user checked to use auto-login |
1864 | 2090 | if($keep_signed) |
1865 | 2091 | { |
@@ -1873,7 +2099,9 @@ discard block |
||
1873 | 2099 | $autologin_args->member_srl = $this->memberInfo->member_srl; |
1874 | 2100 | executeQuery('member.deleteAutologin', $autologin_args); |
1875 | 2101 | $autologin_output = executeQuery('member.insertAutologin', $autologin_args); |
1876 | - if($autologin_output->toBool()) setCookie('xeak',$autologin_args->autologin_key, $_SERVER['REQUEST_TIME']+31536000); |
|
2102 | + if($autologin_output->toBool()) { |
|
2103 | + setCookie('xeak',$autologin_args->autologin_key, $_SERVER['REQUEST_TIME']+31536000); |
|
2104 | + } |
|
1877 | 2105 | } |
1878 | 2106 | if($this->memberInfo->is_admin == 'Y') |
1879 | 2107 | { |
@@ -1962,7 +2190,9 @@ discard block |
||
1962 | 2190 | function addMemberPopupMenu($url, $str, $icon = '', $target = 'self') |
1963 | 2191 | { |
1964 | 2192 | $member_popup_menu_list = Context::get('member_popup_menu_list'); |
1965 | - if(!is_array($member_popup_menu_list)) $member_popup_menu_list = array(); |
|
2193 | + if(!is_array($member_popup_menu_list)) { |
|
2194 | + $member_popup_menu_list = array(); |
|
2195 | + } |
|
1966 | 2196 | |
1967 | 2197 | $obj = new stdClass; |
1968 | 2198 | $obj->url = $url; |
@@ -1981,35 +2211,54 @@ discard block |
||
1981 | 2211 | { |
1982 | 2212 | // Call a trigger (before) |
1983 | 2213 | $output = ModuleHandler::triggerCall('member.insertMember', 'before', $args); |
1984 | - if(!$output->toBool()) return $output; |
|
2214 | + if(!$output->toBool()) { |
|
2215 | + return $output; |
|
2216 | + } |
|
1985 | 2217 | // Terms and Conditions portion of the information set up by members reaffirmed |
1986 | 2218 | $oModuleModel = getModel('module'); |
1987 | 2219 | $config = $oModuleModel->getModuleConfig('member'); |
1988 | 2220 | |
1989 | 2221 | $logged_info = Context::get('logged_info'); |
1990 | 2222 | // If the date of the temporary restrictions limit further information on the date of |
1991 | - if($config->limit_day) $args->limit_date = date("YmdHis", $_SERVER['REQUEST_TIME']+$config->limit_day*60*60*24); |
|
2223 | + if($config->limit_day) { |
|
2224 | + $args->limit_date = date("YmdHis", $_SERVER['REQUEST_TIME']+$config->limit_day*60*60*24); |
|
2225 | + } |
|
1992 | 2226 | |
1993 | 2227 | $args->member_srl = getNextSequence(); |
1994 | 2228 | $args->list_order = -1 * $args->member_srl; |
1995 | 2229 | |
1996 | 2230 | // Execute insert or update depending on the value of member_srl |
1997 | - if(!$args->user_id) $args->user_id = 't'.$args->member_srl; |
|
2231 | + if(!$args->user_id) { |
|
2232 | + $args->user_id = 't'.$args->member_srl; |
|
2233 | + } |
|
1998 | 2234 | // Enter the user's identity changed to lowercase |
1999 | - else $args->user_id = strtolower($args->user_id); |
|
2000 | - if(!$args->user_name) $args->user_name = $args->member_srl; |
|
2001 | - if(!$args->nick_name) $args->nick_name = $args->member_srl; |
|
2235 | + else { |
|
2236 | + $args->user_id = strtolower($args->user_id); |
|
2237 | + } |
|
2238 | + if(!$args->user_name) { |
|
2239 | + $args->user_name = $args->member_srl; |
|
2240 | + } |
|
2241 | + if(!$args->nick_name) { |
|
2242 | + $args->nick_name = $args->member_srl; |
|
2243 | + } |
|
2002 | 2244 | |
2003 | 2245 | // Control of essential parameters |
2004 | - if($args->allow_mailing!='Y') $args->allow_mailing = 'N'; |
|
2005 | - if($args->denied!='Y') $args->denied = 'N'; |
|
2006 | - if(!$args->allow_message || ($args->allow_message && !in_array($args->allow_message, array('Y','N','F')))) $args->allow_message = 'Y'; |
|
2246 | + if($args->allow_mailing!='Y') { |
|
2247 | + $args->allow_mailing = 'N'; |
|
2248 | + } |
|
2249 | + if($args->denied!='Y') { |
|
2250 | + $args->denied = 'N'; |
|
2251 | + } |
|
2252 | + if(!$args->allow_message || ($args->allow_message && !in_array($args->allow_message, array('Y','N','F')))) { |
|
2253 | + $args->allow_message = 'Y'; |
|
2254 | + } |
|
2007 | 2255 | |
2008 | 2256 | if($logged_info->is_admin == 'Y') |
2009 | 2257 | { |
2010 | - if($args->is_admin!='Y') $args->is_admin = 'N'; |
|
2011 | - } |
|
2012 | - else |
|
2258 | + if($args->is_admin!='Y') { |
|
2259 | + $args->is_admin = 'N'; |
|
2260 | + } |
|
2261 | + } else |
|
2013 | 2262 | { |
2014 | 2263 | unset($args->is_admin); |
2015 | 2264 | } |
@@ -2022,8 +2271,12 @@ discard block |
||
2022 | 2271 | $args->nick_name = htmlspecialchars($args->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2023 | 2272 | $args->homepage = htmlspecialchars($args->homepage, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2024 | 2273 | $args->blog = htmlspecialchars($args->blog, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2025 | - if($args->homepage && !preg_match("/^[a-z]+:\/\//i",$args->homepage)) $args->homepage = 'http://'.$args->homepage; |
|
2026 | - if($args->blog && !preg_match("/^[a-z]+:\/\//i",$args->blog)) $args->blog = 'http://'.$args->blog; |
|
2274 | + if($args->homepage && !preg_match("/^[a-z]+:\/\//i",$args->homepage)) { |
|
2275 | + $args->homepage = 'http://'.$args->homepage; |
|
2276 | + } |
|
2277 | + if($args->blog && !preg_match("/^[a-z]+:\/\//i",$args->blog)) { |
|
2278 | + $args->blog = 'http://'.$args->blog; |
|
2279 | + } |
|
2027 | 2280 | |
2028 | 2281 | // Create a model object |
2029 | 2282 | $oMemberModel = getModel('member'); |
@@ -2037,8 +2290,7 @@ discard block |
||
2037 | 2290 | return new Object(-1, $message[$config->password_strength]); |
2038 | 2291 | } |
2039 | 2292 | $args->password = $oMemberModel->hashPassword($args->password); |
2040 | - } |
|
2041 | - elseif(!$args->password) |
|
2293 | + } elseif(!$args->password) |
|
2042 | 2294 | { |
2043 | 2295 | unset($args->password); |
2044 | 2296 | } |
@@ -2046,8 +2298,7 @@ discard block |
||
2046 | 2298 | if($args->find_account_answer && !$password_is_hashed) |
2047 | 2299 | { |
2048 | 2300 | $args->find_account_answer = $oMemberModel->hashPassword($args->find_account_answer); |
2049 | - } |
|
2050 | - elseif(!$args->find_account_answer) |
|
2301 | + } elseif(!$args->find_account_answer) |
|
2051 | 2302 | { |
2052 | 2303 | unset($args->find_account_answer); |
2053 | 2304 | } |
@@ -2088,8 +2339,12 @@ discard block |
||
2088 | 2339 | // Insert data into the DB |
2089 | 2340 | $args->list_order = -1 * $args->member_srl; |
2090 | 2341 | |
2091 | - if(!$args->user_id) $args->user_id = 't'.$args->member_srl; |
|
2092 | - if(!$args->user_name) $args->user_name = $args->member_srl; |
|
2342 | + if(!$args->user_id) { |
|
2343 | + $args->user_id = 't'.$args->member_srl; |
|
2344 | + } |
|
2345 | + if(!$args->user_name) { |
|
2346 | + $args->user_name = $args->member_srl; |
|
2347 | + } |
|
2093 | 2348 | |
2094 | 2349 | $oDB = &DB::getInstance(); |
2095 | 2350 | $oDB->begin(); |
@@ -2101,8 +2356,11 @@ discard block |
||
2101 | 2356 | return $output; |
2102 | 2357 | } |
2103 | 2358 | |
2104 | - if(is_array($args->group_srl_list)) $group_srl_list = $args->group_srl_list; |
|
2105 | - else $group_srl_list = explode('|@|', $args->group_srl_list); |
|
2359 | + if(is_array($args->group_srl_list)) { |
|
2360 | + $group_srl_list = $args->group_srl_list; |
|
2361 | + } else { |
|
2362 | + $group_srl_list = explode('|@|', $args->group_srl_list); |
|
2363 | + } |
|
2106 | 2364 | // If no value is entered the default group, the value of group registration |
2107 | 2365 | if(!$args->group_srl_list) |
2108 | 2366 | { |
@@ -2119,8 +2377,7 @@ discard block |
||
2119 | 2377 | } |
2120 | 2378 | } |
2121 | 2379 | // If the value is the value of the group entered the group registration |
2122 | - } |
|
2123 | - else |
|
2380 | + } else |
|
2124 | 2381 | { |
2125 | 2382 | for($i=0;$i<count($group_srl_list);$i++) |
2126 | 2383 | { |
@@ -2181,27 +2438,39 @@ discard block |
||
2181 | 2438 | { |
2182 | 2439 | // Call a trigger (before) |
2183 | 2440 | $output = ModuleHandler::triggerCall('member.updateMember', 'before', $args); |
2184 | - if(!$output->toBool()) return $output; |
|
2441 | + if(!$output->toBool()) { |
|
2442 | + return $output; |
|
2443 | + } |
|
2185 | 2444 | // Create a model object |
2186 | 2445 | $oMemberModel = getModel('member'); |
2187 | 2446 | |
2188 | 2447 | $logged_info = Context::get('logged_info'); |
2189 | 2448 | // Get what you want to modify the original information |
2190 | - if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2449 | + if(!$this->memberInfo) { |
|
2450 | + $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2451 | + } |
|
2191 | 2452 | // Control of essential parameters |
2192 | - if($args->allow_mailing!='Y') $args->allow_mailing = 'N'; |
|
2193 | - if($args->allow_message && !in_array($args->allow_message, array('Y','N','F'))) $args->allow_message = 'Y'; |
|
2453 | + if($args->allow_mailing!='Y') { |
|
2454 | + $args->allow_mailing = 'N'; |
|
2455 | + } |
|
2456 | + if($args->allow_message && !in_array($args->allow_message, array('Y','N','F'))) { |
|
2457 | + $args->allow_message = 'Y'; |
|
2458 | + } |
|
2194 | 2459 | |
2195 | 2460 | if($logged_info->is_admin == 'Y') |
2196 | 2461 | { |
2197 | - if($args->denied!='Y') $args->denied = 'N'; |
|
2198 | - if($args->is_admin!='Y' && $logged_info->member_srl != $args->member_srl) $args->is_admin = 'N'; |
|
2199 | - } |
|
2200 | - else |
|
2462 | + if($args->denied!='Y') { |
|
2463 | + $args->denied = 'N'; |
|
2464 | + } |
|
2465 | + if($args->is_admin!='Y' && $logged_info->member_srl != $args->member_srl) { |
|
2466 | + $args->is_admin = 'N'; |
|
2467 | + } |
|
2468 | + } else |
|
2201 | 2469 | { |
2202 | 2470 | unset($args->is_admin); |
2203 | - if($is_admin == false) |
|
2204 | - unset($args->denied); |
|
2471 | + if($is_admin == false) { |
|
2472 | + unset($args->denied); |
|
2473 | + } |
|
2205 | 2474 | if($logged_info->member_srl != $args->member_srl && $is_admin == false) |
2206 | 2475 | { |
2207 | 2476 | return $this->stop('msg_invalid_request'); |
@@ -2209,13 +2478,19 @@ discard block |
||
2209 | 2478 | } |
2210 | 2479 | |
2211 | 2480 | // Sanitize user ID, username, nickname, homepage, blog |
2212 | - if($args->user_id) $args->user_id = htmlspecialchars($args->user_id, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
|
2481 | + if($args->user_id) { |
|
2482 | + $args->user_id = htmlspecialchars($args->user_id, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
|
2483 | + } |
|
2213 | 2484 | $args->user_name = htmlspecialchars($args->user_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2214 | 2485 | $args->nick_name = htmlspecialchars($args->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2215 | 2486 | $args->homepage = htmlspecialchars($args->homepage, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2216 | 2487 | $args->blog = htmlspecialchars($args->blog, ENT_COMPAT | ENT_HTML401, 'UTF-8', false); |
2217 | - if($args->homepage && !preg_match("/^[a-z]+:\/\//is",$args->homepage)) $args->homepage = 'http://'.$args->homepage; |
|
2218 | - if($args->blog && !preg_match("/^[a-z]+:\/\//is",$args->blog)) $args->blog = 'http://'.$args->blog; |
|
2488 | + if($args->homepage && !preg_match("/^[a-z]+:\/\//is",$args->homepage)) { |
|
2489 | + $args->homepage = 'http://'.$args->homepage; |
|
2490 | + } |
|
2491 | + if($args->blog && !preg_match("/^[a-z]+:\/\//is",$args->blog)) { |
|
2492 | + $args->blog = 'http://'.$args->blog; |
|
2493 | + } |
|
2219 | 2494 | |
2220 | 2495 | // check member identifier form |
2221 | 2496 | $config = $oMemberModel->getMemberConfig(); |
@@ -2232,8 +2507,7 @@ discard block |
||
2232 | 2507 | return new Object(-1,'msg_exists_email_address'); |
2233 | 2508 | } |
2234 | 2509 | $args->email_address = $orgMemberInfo->email_address; |
2235 | - } |
|
2236 | - else |
|
2510 | + } else |
|
2237 | 2511 | { |
2238 | 2512 | $member_srl = $oMemberModel->getMemberSrlByUserID($args->user_id); |
2239 | 2513 | if($member_srl && $args->member_srl != $member_srl) |
@@ -2290,16 +2564,14 @@ discard block |
||
2290 | 2564 | return new Object(-1, $message[$config->password_strength]); |
2291 | 2565 | } |
2292 | 2566 | $args->password = $oMemberModel->hashPassword($args->password); |
2293 | - } |
|
2294 | - else |
|
2567 | + } else |
|
2295 | 2568 | { |
2296 | 2569 | $args->password = $orgMemberInfo->password; |
2297 | 2570 | } |
2298 | 2571 | |
2299 | 2572 | if($args->find_account_answer) { |
2300 | 2573 | $args->find_account_answer = $oMemberModel->hashPassword($args->find_account_answer); |
2301 | - } |
|
2302 | - else |
|
2574 | + } else |
|
2303 | 2575 | { |
2304 | 2576 | $oPassword = new Password(); |
2305 | 2577 | $hashed = $oPassword->checkAlgorithm($orgMemberInfo->find_account_answer); |
@@ -2311,11 +2583,21 @@ discard block |
||
2311 | 2583 | } |
2312 | 2584 | } |
2313 | 2585 | |
2314 | - if(!$args->user_name) $args->user_name = $orgMemberInfo->user_name; |
|
2315 | - if(!$args->user_id) $args->user_id = $orgMemberInfo->user_id; |
|
2316 | - if(!$args->nick_name) $args->nick_name = $orgMemberInfo->nick_name; |
|
2317 | - if(!$args->description) $args->description = $orgMemberInfo->description; |
|
2318 | - if(!$args->birthday) $args->birthday = ''; |
|
2586 | + if(!$args->user_name) { |
|
2587 | + $args->user_name = $orgMemberInfo->user_name; |
|
2588 | + } |
|
2589 | + if(!$args->user_id) { |
|
2590 | + $args->user_id = $orgMemberInfo->user_id; |
|
2591 | + } |
|
2592 | + if(!$args->nick_name) { |
|
2593 | + $args->nick_name = $orgMemberInfo->nick_name; |
|
2594 | + } |
|
2595 | + if(!$args->description) { |
|
2596 | + $args->description = $orgMemberInfo->description; |
|
2597 | + } |
|
2598 | + if(!$args->birthday) { |
|
2599 | + $args->birthday = ''; |
|
2600 | + } |
|
2319 | 2601 | |
2320 | 2602 | $output = executeQuery('member.updateMember', $args); |
2321 | 2603 | |
@@ -2327,8 +2609,11 @@ discard block |
||
2327 | 2609 | |
2328 | 2610 | if($args->group_srl_list) |
2329 | 2611 | { |
2330 | - if(is_array($args->group_srl_list)) $group_srl_list = $args->group_srl_list; |
|
2331 | - else $group_srl_list = explode('|@|', $args->group_srl_list); |
|
2612 | + if(is_array($args->group_srl_list)) { |
|
2613 | + $group_srl_list = $args->group_srl_list; |
|
2614 | + } else { |
|
2615 | + $group_srl_list = explode('|@|', $args->group_srl_list); |
|
2616 | + } |
|
2332 | 2617 | // If the group information, group information changes |
2333 | 2618 | if(count($group_srl_list) > 0) |
2334 | 2619 | { |
@@ -2371,7 +2656,9 @@ discard block |
||
2371 | 2656 | $this->_clearMemberCache($args->member_srl, $args->site_srl); |
2372 | 2657 | |
2373 | 2658 | // Save Session |
2374 | - if(!$this->memberInfo) $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2659 | + if(!$this->memberInfo) { |
|
2660 | + $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl); |
|
2661 | + } |
|
2375 | 2662 | $logged_info = Context::get('logged_info'); |
2376 | 2663 | |
2377 | 2664 | $output->add('member_srl', $args->member_srl); |
@@ -2397,8 +2684,7 @@ discard block |
||
2397 | 2684 | } |
2398 | 2685 | |
2399 | 2686 | $args->password = $oMemberModel->hashPassword($args->password); |
2400 | - } |
|
2401 | - else if($args->hashed_password) |
|
2687 | + } else if($args->hashed_password) |
|
2402 | 2688 | { |
2403 | 2689 | $args->password = $args->hashed_password; |
2404 | 2690 | } |
@@ -2433,7 +2719,9 @@ discard block |
||
2433 | 2719 | $trigger_obj = new stdClass(); |
2434 | 2720 | $trigger_obj->member_srl = $member_srl; |
2435 | 2721 | $output = ModuleHandler::triggerCall('member.deleteMember', 'before', $trigger_obj); |
2436 | - if(!$output->toBool()) return $output; |
|
2722 | + if(!$output->toBool()) { |
|
2723 | + return $output; |
|
2724 | + } |
|
2437 | 2725 | // Create a model object |
2438 | 2726 | $oMemberModel = getModel('member'); |
2439 | 2727 | // Bringing the user's information |
@@ -2442,9 +2730,13 @@ discard block |
||
2442 | 2730 | $columnList = array('member_srl', 'is_admin'); |
2443 | 2731 | $this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList); |
2444 | 2732 | } |
2445 | - if(!$this->memberInfo) return new Object(-1, 'msg_not_exists_member'); |
|
2733 | + if(!$this->memberInfo) { |
|
2734 | + return new Object(-1, 'msg_not_exists_member'); |
|
2735 | + } |
|
2446 | 2736 | // If managers can not be deleted |
2447 | - if($this->memberInfo->is_admin == 'Y') return new Object(-1, 'msg_cannot_delete_admin'); |
|
2737 | + if($this->memberInfo->is_admin == 'Y') { |
|
2738 | + return new Object(-1, 'msg_cannot_delete_admin'); |
|
2739 | + } |
|
2448 | 2740 | |
2449 | 2741 | $oDB = &DB::getInstance(); |
2450 | 2742 | $oDB->begin(); |
@@ -2508,7 +2800,9 @@ discard block |
||
2508 | 2800 | */ |
2509 | 2801 | function destroySessionInfo() |
2510 | 2802 | { |
2511 | - if(!$_SESSION || !is_array($_SESSION)) return; |
|
2803 | + if(!$_SESSION || !is_array($_SESSION)) { |
|
2804 | + return; |
|
2805 | + } |
|
2512 | 2806 | |
2513 | 2807 | $memberInfo = Context::get('logged_info'); |
2514 | 2808 | $memberSrl = $memberInfo->member_srl; |
@@ -2547,8 +2841,9 @@ discard block |
||
2547 | 2841 | } |
2548 | 2842 | $maxLevel = 0; |
2549 | 2843 | $resultGroup = array_intersect($levelGroup, $groupSrlList); |
2550 | - if(count($resultGroup) > 0) |
|
2551 | - $maxLevel = max(array_flip($resultGroup)); |
|
2844 | + if(count($resultGroup) > 0) { |
|
2845 | + $maxLevel = max(array_flip($resultGroup)); |
|
2846 | + } |
|
2552 | 2847 | |
2553 | 2848 | if($maxLevel > 0) |
2554 | 2849 | { |
@@ -2565,16 +2860,22 @@ discard block |
||
2565 | 2860 | |
2566 | 2861 | function procMemberModifyEmailAddress() |
2567 | 2862 | { |
2568 | - if(!Context::get('is_logged')) return $this->stop('msg_not_logged'); |
|
2863 | + if(!Context::get('is_logged')) { |
|
2864 | + return $this->stop('msg_not_logged'); |
|
2865 | + } |
|
2569 | 2866 | |
2570 | 2867 | $member_info = Context::get('logged_info'); |
2571 | 2868 | $newEmail = Context::get('email_address'); |
2572 | 2869 | |
2573 | - if(!$newEmail) return $this->stop('msg_invalid_request'); |
|
2870 | + if(!$newEmail) { |
|
2871 | + return $this->stop('msg_invalid_request'); |
|
2872 | + } |
|
2574 | 2873 | |
2575 | 2874 | $oMemberModel = getModel('member'); |
2576 | 2875 | $member_srl = $oMemberModel->getMemberSrlByEmailAddress($newEmail); |
2577 | - if($member_srl) return new Object(-1,'msg_exists_email_address'); |
|
2876 | + if($member_srl) { |
|
2877 | + return new Object(-1,'msg_exists_email_address'); |
|
2878 | + } |
|
2578 | 2879 | |
2579 | 2880 | if($_SESSION['rechecked_password_step'] != 'INPUT_DATA') |
2580 | 2881 | { |
@@ -2602,7 +2903,9 @@ discard block |
||
2602 | 2903 | $member_config = $oModuleModel->getModuleConfig('member'); |
2603 | 2904 | |
2604 | 2905 | $tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin); |
2605 | - if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
2906 | + if(!is_dir($tpl_path)) { |
|
2907 | + $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default'); |
|
2908 | + } |
|
2606 | 2909 | |
2607 | 2910 | global $lang; |
2608 | 2911 | |
@@ -2638,7 +2941,9 @@ discard block |
||
2638 | 2941 | { |
2639 | 2942 | $member_srl = Context::get('member_srl'); |
2640 | 2943 | $auth_key = Context::get('auth_key'); |
2641 | - if(!$member_srl || !$auth_key) return $this->stop('msg_invalid_request'); |
|
2944 | + if(!$member_srl || !$auth_key) { |
|
2945 | + return $this->stop('msg_invalid_request'); |
|
2946 | + } |
|
2642 | 2947 | |
2643 | 2948 | // Test logs for finding password by user_id and authkey |
2644 | 2949 | $args = new stdClass; |
@@ -2647,7 +2952,9 @@ discard block |
||
2647 | 2952 | $output = executeQuery('member.getAuthMail', $args); |
2648 | 2953 | if(!$output->toBool() || $output->data->auth_key != $auth_key) |
2649 | 2954 | { |
2650 | - if(strlen($output->data->auth_key) !== strlen($auth_key)) executeQuery('member.deleteAuthChangeEmailAddress', $args); |
|
2955 | + if(strlen($output->data->auth_key) !== strlen($auth_key)) { |
|
2956 | + executeQuery('member.deleteAuthChangeEmailAddress', $args); |
|
2957 | + } |
|
2651 | 2958 | return $this->stop('msg_invalid_modify_email_auth_key'); |
2652 | 2959 | } |
2653 | 2960 | |
@@ -2656,7 +2963,9 @@ discard block |
||
2656 | 2963 | list($args->email_id, $args->email_host) = explode('@', $newEmail); |
2657 | 2964 | |
2658 | 2965 | $output = executeQuery('member.updateMemberEmailAddress', $args); |
2659 | - if(!$output->toBool()) return $this->stop($output->getMessage()); |
|
2966 | + if(!$output->toBool()) { |
|
2967 | + return $this->stop($output->getMessage()); |
|
2968 | + } |
|
2660 | 2969 | |
2661 | 2970 | // Remove all values having the member_srl and new_password equal to 'XE_change_emaill_address' from authentication table |
2662 | 2971 | executeQuery('member.deleteAuthChangeEmailAddress',$args); |
@@ -2677,7 +2986,9 @@ discard block |
||
2677 | 2986 | **/ |
2678 | 2987 | function triggerGetDocumentMenu(&$menu_list) |
2679 | 2988 | { |
2680 | - if(!Context::get('is_logged')) return new Object(); |
|
2989 | + if(!Context::get('is_logged')) { |
|
2990 | + return new Object(); |
|
2991 | + } |
|
2681 | 2992 | |
2682 | 2993 | $logged_info = Context::get('logged_info'); |
2683 | 2994 | $document_srl = Context::get('target_srl'); |
@@ -2688,8 +2999,12 @@ discard block |
||
2688 | 2999 | $member_srl = $oDocument->get('member_srl'); |
2689 | 3000 | $module_srl = $oDocument->get('module_srl'); |
2690 | 3001 | |
2691 | - if(!$member_srl) return new Object(); |
|
2692 | - if($oDocumentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new Object(); |
|
3002 | + if(!$member_srl) { |
|
3003 | + return new Object(); |
|
3004 | + } |
|
3005 | + if($oDocumentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) { |
|
3006 | + return new Object(); |
|
3007 | + } |
|
2693 | 3008 | |
2694 | 3009 | $oDocumentController = getController('document'); |
2695 | 3010 | $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
@@ -2707,7 +3022,9 @@ discard block |
||
2707 | 3022 | **/ |
2708 | 3023 | function triggerGetCommentMenu(&$menu_list) |
2709 | 3024 | { |
2710 | - if(!Context::get('is_logged')) return new Object(); |
|
3025 | + if(!Context::get('is_logged')) { |
|
3026 | + return new Object(); |
|
3027 | + } |
|
2711 | 3028 | |
2712 | 3029 | $logged_info = Context::get('logged_info'); |
2713 | 3030 | $comment_srl = Context::get('target_srl'); |
@@ -2718,8 +3035,12 @@ discard block |
||
2718 | 3035 | $module_srl = $oComment->get('module_srl'); |
2719 | 3036 | $member_srl = $oComment->get('member_srl'); |
2720 | 3037 | |
2721 | - if(!$member_srl) return new Object(); |
|
2722 | - if($oCommentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) return new Object(); |
|
3038 | + if(!$member_srl) { |
|
3039 | + return new Object(); |
|
3040 | + } |
|
3041 | + if($oCommentModel->grant->manager != 1 || $member_srl==$logged_info->member_srl) { |
|
3042 | + return new Object(); |
|
3043 | + } |
|
2723 | 3044 | |
2724 | 3045 | $oCommentController = getController('comment'); |
2725 | 3046 | $url = getUrl('','module','member','act','dispMemberSpammer','member_srl',$member_srl,'module_srl',$module_srl); |
@@ -2735,7 +3056,9 @@ discard block |
||
2735 | 3056 | **/ |
2736 | 3057 | function procMemberSpammerManage() |
2737 | 3058 | { |
2738 | - if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted'); |
|
3059 | + if(!Context::get('is_logged')) { |
|
3060 | + return new Object(-1,'msg_not_permitted'); |
|
3061 | + } |
|
2739 | 3062 | |
2740 | 3063 | $logged_info = Context::get('logged_info'); |
2741 | 3064 | $member_srl = Context::get('member_srl'); |
@@ -2743,8 +3066,9 @@ discard block |
||
2743 | 3066 | $cnt_loop = Context::get('cnt_loop'); |
2744 | 3067 | $proc_type = Context::get('proc_type'); |
2745 | 3068 | $isMoveToTrash = true; |
2746 | - if($proc_type == "delete") |
|
2747 | - $isMoveToTrash = false; |
|
3069 | + if($proc_type == "delete") { |
|
3070 | + $isMoveToTrash = false; |
|
3071 | + } |
|
2748 | 3072 | |
2749 | 3073 | // check grant |
2750 | 3074 | $oModuleModel = getModel('module'); |
@@ -2752,7 +3076,9 @@ discard block |
||
2752 | 3076 | $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList); |
2753 | 3077 | $grant = $oModuleModel->getGrant($module_info, $logged_info); |
2754 | 3078 | |
2755 | - if(!$grant->manager) return new Object(-1,'msg_not_permitted'); |
|
3079 | + if(!$grant->manager) { |
|
3080 | + return new Object(-1,'msg_not_permitted'); |
|
3081 | + } |
|
2756 | 3082 | |
2757 | 3083 | $proc_msg = ""; |
2758 | 3084 | |
@@ -2761,11 +3087,13 @@ discard block |
||
2761 | 3087 | |
2762 | 3088 | // delete or trash destination |
2763 | 3089 | // proc member |
2764 | - if($cnt_loop == 1) |
|
2765 | - $this->_spammerMember($member_srl); |
|
3090 | + if($cnt_loop == 1) { |
|
3091 | + $this->_spammerMember($member_srl); |
|
3092 | + } |
|
2766 | 3093 | // proc document and comment |
2767 | - elseif($cnt_loop>1) |
|
2768 | - $this->_spammerDocuments($member_srl, $isMoveToTrash); |
|
3094 | + elseif($cnt_loop>1) { |
|
3095 | + $this->_spammerDocuments($member_srl, $isMoveToTrash); |
|
3096 | + } |
|
2769 | 3097 | |
2770 | 3098 | // get destination count |
2771 | 3099 | $cnt_document = $oDocumentModel->getDocumentCountByMemberSrl($member_srl); |
@@ -2773,13 +3101,16 @@ discard block |
||
2773 | 3101 | |
2774 | 3102 | $total_count = Context::get('total_count'); |
2775 | 3103 | $remain_count = $cnt_document + $cnt_comment; |
2776 | - if($cnt_loop == 1) $total_count = $remain_count; |
|
3104 | + if($cnt_loop == 1) { |
|
3105 | + $total_count = $remain_count; |
|
3106 | + } |
|
2777 | 3107 | |
2778 | 3108 | // get progress percent |
2779 | - if($total_count > 0) |
|
2780 | - $progress = intval( ( ( $total_count - $remain_count ) / $total_count ) * 100 ); |
|
2781 | - else |
|
2782 | - $progress = 100; |
|
3109 | + if($total_count > 0) { |
|
3110 | + $progress = intval( ( ( $total_count - $remain_count ) / $total_count ) * 100 ); |
|
3111 | + } else { |
|
3112 | + $progress = 100; |
|
3113 | + } |
|
2783 | 3114 | |
2784 | 3115 | $this->add('total_count', $total_count); |
2785 | 3116 | $this->add('remain_count', $remain_count); |
@@ -2821,7 +3152,10 @@ discard block |
||
2821 | 3152 | $args->nick_name = $member_info->nick_name; |
2822 | 3153 | $args->denied = "Y"; |
2823 | 3154 | $args->description = trim( $member_info->description ); |
2824 | - if( $args->description != "" ) $args->description .= "\n"; // add new line |
|
3155 | + if( $args->description != "" ) { |
|
3156 | + $args->description .= "\n"; |
|
3157 | + } |
|
3158 | + // add new line |
|
2825 | 3159 | |
2826 | 3160 | $args->description .= Context::getLang('cmd_spammer') . "[" . date("Y-m-d H:i:s") . " from:" . $logged_info->user_id . " info:" . $spam_description . " docuemnts count:" . $total_count . "]"; |
2827 | 3161 | |
@@ -2866,8 +3200,11 @@ discard block |
||
2866 | 3200 | $documentList = $oDocumentModel->getDocumentListByMemberSrl($member_srl, $columnList, 0, false, $getContentsCount); |
2867 | 3201 | if($documentList) { |
2868 | 3202 | foreach($documentList as $v) { |
2869 | - if($isMoveToTrash) $oDocumentController->moveDocumentToTrash($v); |
|
2870 | - else $oDocumentController->deleteDocument($v->document_srl); |
|
3203 | + if($isMoveToTrash) { |
|
3204 | + $oDocumentController->moveDocumentToTrash($v); |
|
3205 | + } else { |
|
3206 | + $oDocumentController->deleteDocument($v->document_srl); |
|
3207 | + } |
|
2871 | 3208 | } |
2872 | 3209 | } |
2873 | 3210 | } |
@@ -39,99 +39,99 @@ |
||
39 | 39 | */ |
40 | 40 | abstract class HTTP_Request2_Adapter |
41 | 41 | { |
42 | - /** |
|
43 | - * A list of methods that MUST NOT have a request body, per RFC 2616 |
|
44 | - * @var array |
|
45 | - */ |
|
46 | - protected static $bodyDisallowed = array('TRACE'); |
|
42 | + /** |
|
43 | + * A list of methods that MUST NOT have a request body, per RFC 2616 |
|
44 | + * @var array |
|
45 | + */ |
|
46 | + protected static $bodyDisallowed = array('TRACE'); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Methods having defined semantics for request body |
|
50 | - * |
|
51 | - * Content-Length header (indicating that the body follows, section 4.3 of |
|
52 | - * RFC 2616) will be sent for these methods even if no body was added |
|
53 | - * |
|
54 | - * @var array |
|
55 | - * @link http://pear.php.net/bugs/bug.php?id=12900 |
|
56 | - * @link http://pear.php.net/bugs/bug.php?id=14740 |
|
57 | - */ |
|
58 | - protected static $bodyRequired = array('POST', 'PUT'); |
|
48 | + /** |
|
49 | + * Methods having defined semantics for request body |
|
50 | + * |
|
51 | + * Content-Length header (indicating that the body follows, section 4.3 of |
|
52 | + * RFC 2616) will be sent for these methods even if no body was added |
|
53 | + * |
|
54 | + * @var array |
|
55 | + * @link http://pear.php.net/bugs/bug.php?id=12900 |
|
56 | + * @link http://pear.php.net/bugs/bug.php?id=14740 |
|
57 | + */ |
|
58 | + protected static $bodyRequired = array('POST', 'PUT'); |
|
59 | 59 | |
60 | - /** |
|
61 | - * Request being sent |
|
62 | - * @var HTTP_Request2 |
|
63 | - */ |
|
64 | - protected $request; |
|
60 | + /** |
|
61 | + * Request being sent |
|
62 | + * @var HTTP_Request2 |
|
63 | + */ |
|
64 | + protected $request; |
|
65 | 65 | |
66 | - /** |
|
67 | - * Request body |
|
68 | - * @var string|resource|HTTP_Request2_MultipartBody |
|
69 | - * @see HTTP_Request2::getBody() |
|
70 | - */ |
|
71 | - protected $requestBody; |
|
66 | + /** |
|
67 | + * Request body |
|
68 | + * @var string|resource|HTTP_Request2_MultipartBody |
|
69 | + * @see HTTP_Request2::getBody() |
|
70 | + */ |
|
71 | + protected $requestBody; |
|
72 | 72 | |
73 | - /** |
|
74 | - * Length of the request body |
|
75 | - * @var integer |
|
76 | - */ |
|
77 | - protected $contentLength; |
|
73 | + /** |
|
74 | + * Length of the request body |
|
75 | + * @var integer |
|
76 | + */ |
|
77 | + protected $contentLength; |
|
78 | 78 | |
79 | - /** |
|
80 | - * Sends request to the remote server and returns its response |
|
81 | - * |
|
82 | - * @param HTTP_Request2 $request HTTP request message |
|
83 | - * |
|
84 | - * @return HTTP_Request2_Response |
|
85 | - * @throws HTTP_Request2_Exception |
|
86 | - */ |
|
87 | - abstract public function sendRequest(HTTP_Request2 $request); |
|
79 | + /** |
|
80 | + * Sends request to the remote server and returns its response |
|
81 | + * |
|
82 | + * @param HTTP_Request2 $request HTTP request message |
|
83 | + * |
|
84 | + * @return HTTP_Request2_Response |
|
85 | + * @throws HTTP_Request2_Exception |
|
86 | + */ |
|
87 | + abstract public function sendRequest(HTTP_Request2 $request); |
|
88 | 88 | |
89 | - /** |
|
90 | - * Calculates length of the request body, adds proper headers |
|
91 | - * |
|
92 | - * @param array &$headers associative array of request headers, this method |
|
93 | - * will add proper 'Content-Length' and 'Content-Type' |
|
94 | - * headers to this array (or remove them if not needed) |
|
95 | - */ |
|
96 | - protected function calculateRequestLength(&$headers) |
|
97 | - { |
|
98 | - $this->requestBody = $this->request->getBody(); |
|
89 | + /** |
|
90 | + * Calculates length of the request body, adds proper headers |
|
91 | + * |
|
92 | + * @param array &$headers associative array of request headers, this method |
|
93 | + * will add proper 'Content-Length' and 'Content-Type' |
|
94 | + * headers to this array (or remove them if not needed) |
|
95 | + */ |
|
96 | + protected function calculateRequestLength(&$headers) |
|
97 | + { |
|
98 | + $this->requestBody = $this->request->getBody(); |
|
99 | 99 | |
100 | - if (is_string($this->requestBody)) { |
|
101 | - $this->contentLength = strlen($this->requestBody); |
|
102 | - } elseif (is_resource($this->requestBody)) { |
|
103 | - $stat = fstat($this->requestBody); |
|
104 | - $this->contentLength = $stat['size']; |
|
105 | - rewind($this->requestBody); |
|
106 | - } else { |
|
107 | - $this->contentLength = $this->requestBody->getLength(); |
|
108 | - $headers['content-type'] = 'multipart/form-data; boundary=' . |
|
109 | - $this->requestBody->getBoundary(); |
|
110 | - $this->requestBody->rewind(); |
|
111 | - } |
|
100 | + if (is_string($this->requestBody)) { |
|
101 | + $this->contentLength = strlen($this->requestBody); |
|
102 | + } elseif (is_resource($this->requestBody)) { |
|
103 | + $stat = fstat($this->requestBody); |
|
104 | + $this->contentLength = $stat['size']; |
|
105 | + rewind($this->requestBody); |
|
106 | + } else { |
|
107 | + $this->contentLength = $this->requestBody->getLength(); |
|
108 | + $headers['content-type'] = 'multipart/form-data; boundary=' . |
|
109 | + $this->requestBody->getBoundary(); |
|
110 | + $this->requestBody->rewind(); |
|
111 | + } |
|
112 | 112 | |
113 | - if (in_array($this->request->getMethod(), self::$bodyDisallowed) |
|
114 | - || 0 == $this->contentLength |
|
115 | - ) { |
|
116 | - // No body: send a Content-Length header nonetheless (request #12900), |
|
117 | - // but do that only for methods that require a body (bug #14740) |
|
118 | - if (in_array($this->request->getMethod(), self::$bodyRequired)) { |
|
119 | - $headers['content-length'] = 0; |
|
120 | - } else { |
|
121 | - unset($headers['content-length']); |
|
122 | - // if the method doesn't require a body and doesn't have a |
|
123 | - // body, don't send a Content-Type header. (request #16799) |
|
124 | - unset($headers['content-type']); |
|
125 | - } |
|
126 | - } else { |
|
127 | - if (empty($headers['content-type'])) { |
|
128 | - $headers['content-type'] = 'application/x-www-form-urlencoded'; |
|
129 | - } |
|
130 | - // Content-Length should not be sent for chunked Transfer-Encoding (bug #20125) |
|
131 | - if (!isset($headers['transfer-encoding'])) { |
|
132 | - $headers['content-length'] = $this->contentLength; |
|
133 | - } |
|
134 | - } |
|
135 | - } |
|
113 | + if (in_array($this->request->getMethod(), self::$bodyDisallowed) |
|
114 | + || 0 == $this->contentLength |
|
115 | + ) { |
|
116 | + // No body: send a Content-Length header nonetheless (request #12900), |
|
117 | + // but do that only for methods that require a body (bug #14740) |
|
118 | + if (in_array($this->request->getMethod(), self::$bodyRequired)) { |
|
119 | + $headers['content-length'] = 0; |
|
120 | + } else { |
|
121 | + unset($headers['content-length']); |
|
122 | + // if the method doesn't require a body and doesn't have a |
|
123 | + // body, don't send a Content-Type header. (request #16799) |
|
124 | + unset($headers['content-type']); |
|
125 | + } |
|
126 | + } else { |
|
127 | + if (empty($headers['content-type'])) { |
|
128 | + $headers['content-type'] = 'application/x-www-form-urlencoded'; |
|
129 | + } |
|
130 | + // Content-Length should not be sent for chunked Transfer-Encoding (bug #20125) |
|
131 | + if (!isset($headers['transfer-encoding'])) { |
|
132 | + $headers['content-length'] = $this->contentLength; |
|
133 | + } |
|
134 | + } |
|
135 | + } |
|
136 | 136 | } |
137 | 137 | ?> |
@@ -105,7 +105,7 @@ |
||
105 | 105 | rewind($this->requestBody); |
106 | 106 | } else { |
107 | 107 | $this->contentLength = $this->requestBody->getLength(); |
108 | - $headers['content-type'] = 'multipart/form-data; boundary=' . |
|
108 | + $headers['content-type'] = 'multipart/form-data; boundary='. |
|
109 | 109 | $this->requestBody->getBoundary(); |
110 | 110 | $this->requestBody->rewind(); |
111 | 111 | } |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $this->_checkCacheDir(); |
15 | 15 | |
16 | 16 | // purifier setting |
17 | - require_once _XE_PATH_ . 'classes/security/htmlpurifier/library/HTMLPurifier.auto.php'; |
|
17 | + require_once _XE_PATH_.'classes/security/htmlpurifier/library/HTMLPurifier.auto.php'; |
|
18 | 18 | require_once 'HTMLPurifier.func.php'; |
19 | 19 | |
20 | 20 | $this->_setConfig(); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | public function getInstance() |
24 | 24 | { |
25 | - if(!isset($GLOBALS['__PURIFIER_INSTANCE__'])) |
|
25 | + if (!isset($GLOBALS['__PURIFIER_INSTANCE__'])) |
|
26 | 26 | { |
27 | 27 | $GLOBALS['__PURIFIER_INSTANCE__'] = new Purifier(); |
28 | 28 | } |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | { |
53 | 53 | // add attribute for edit component |
54 | 54 | $editComponentAttrs = $this->_searchEditComponent($content); |
55 | - if(is_array($editComponentAttrs)) |
|
55 | + if (is_array($editComponentAttrs)) |
|
56 | 56 | { |
57 | - foreach($editComponentAttrs AS $k => $v) |
|
57 | + foreach ($editComponentAttrs AS $k => $v) |
|
58 | 58 | { |
59 | 59 | $this->_def->addAttribute('img', $v, 'CDATA'); |
60 | 60 | $this->_def->addAttribute('div', $v, 'CDATA'); |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | |
64 | 64 | // add attribute for widget component |
65 | 65 | $widgetAttrs = $this->_searchWidget($content); |
66 | - if(is_array($widgetAttrs)) |
|
66 | + if (is_array($widgetAttrs)) |
|
67 | 67 | { |
68 | - foreach($widgetAttrs AS $k => $v) |
|
68 | + foreach ($widgetAttrs AS $k => $v) |
|
69 | 69 | { |
70 | 70 | $this->_def->addAttribute('img', $v, 'CDATA'); |
71 | 71 | } |
@@ -82,19 +82,19 @@ discard block |
||
82 | 82 | preg_match_all('!<(?:(div)|img)([^>]*)editor_component=([^>]*)>(?(1)(.*?)</div>)!is', $content, $m); |
83 | 83 | |
84 | 84 | $attributeList = array(); |
85 | - if(is_array($m[2])) |
|
85 | + if (is_array($m[2])) |
|
86 | 86 | { |
87 | - foreach($m[2] as $key => $value) |
|
87 | + foreach ($m[2] as $key => $value) |
|
88 | 88 | { |
89 | 89 | unset($script, $m2); |
90 | 90 | $script = " {$m[2][$key]} editor_component={$m[3][$key]}"; |
91 | 91 | |
92 | - if(preg_match_all('/([a-z0-9_-]+)="([^"]+)"/is', $script, $m2)) |
|
92 | + if (preg_match_all('/([a-z0-9_-]+)="([^"]+)"/is', $script, $m2)) |
|
93 | 93 | { |
94 | - foreach($m2[1] as $value2) |
|
94 | + foreach ($m2[1] as $value2) |
|
95 | 95 | { |
96 | 96 | //SECISSUE check style attr |
97 | - if($value2 == 'style') |
|
97 | + if ($value2 == 'style') |
|
98 | 98 | { |
99 | 99 | continue; |
100 | 100 | } |
@@ -117,18 +117,18 @@ discard block |
||
117 | 117 | preg_match_all('!<(?:(div)|img)([^>]*)class="zbxe_widget_output"([^>]*)>(?(1)(.*?)</div>)!is', $content, $m); |
118 | 118 | |
119 | 119 | $attributeList = array(); |
120 | - if(is_array($m[3])) |
|
120 | + if (is_array($m[3])) |
|
121 | 121 | { |
122 | 122 | $content = str_replace('<img class="zbxe_widget_output"', '<img src="" class="zbxe_widget_output"', $content); |
123 | 123 | |
124 | - foreach($m[3] as $key => $value) |
|
124 | + foreach ($m[3] as $key => $value) |
|
125 | 125 | { |
126 | 126 | if (preg_match_all('/([a-z0-9_-]+)="([^"]+)"/is', $m[3][$key], $m2)) |
127 | 127 | { |
128 | - foreach($m2[1] as $value2) |
|
128 | + foreach ($m2[1] as $value2) |
|
129 | 129 | { |
130 | 130 | //SECISSUE check style attr |
131 | - if($value2 == 'style') |
|
131 | + if ($value2 == 'style') |
|
132 | 132 | { |
133 | 133 | continue; |
134 | 134 | } |
@@ -146,12 +146,12 @@ discard block |
||
146 | 146 | $whiteIframeUrlList = $oEmbedFilter->getWhiteIframeUrlList(); |
147 | 147 | |
148 | 148 | $whiteDomain = array(); |
149 | - foreach($whiteIframeUrlList as $value) |
|
149 | + foreach ($whiteIframeUrlList as $value) |
|
150 | 150 | { |
151 | 151 | $whiteDomain[] = preg_quote($value, '%'); |
152 | 152 | } |
153 | 153 | |
154 | - $whiteDomainRegex = '%^(' . implode('|', $whiteDomain) . ')%'; |
|
154 | + $whiteDomainRegex = '%^('.implode('|', $whiteDomain).')%'; |
|
155 | 155 | |
156 | 156 | return $whiteDomainRegex; |
157 | 157 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | private function _checkCacheDir() |
160 | 160 | { |
161 | 161 | // check htmlpurifier cache directory |
162 | - $this->_cacheDir = _XE_PATH_ . 'files/cache/htmlpurifier'; |
|
162 | + $this->_cacheDir = _XE_PATH_.'files/cache/htmlpurifier'; |
|
163 | 163 | FileHandler::makeDir($this->_cacheDir); |
164 | 164 | } |
165 | 165 |
@@ -12,204 +12,204 @@ |
||
12 | 12 | |
13 | 13 | $__dir = dirname(__FILE__); |
14 | 14 | |
15 | -require_once $__dir . '/HTMLPurifier.php'; |
|
16 | -require_once $__dir . '/HTMLPurifier/AttrCollections.php'; |
|
17 | -require_once $__dir . '/HTMLPurifier/AttrDef.php'; |
|
18 | -require_once $__dir . '/HTMLPurifier/AttrTransform.php'; |
|
19 | -require_once $__dir . '/HTMLPurifier/AttrTypes.php'; |
|
20 | -require_once $__dir . '/HTMLPurifier/AttrValidator.php'; |
|
21 | -require_once $__dir . '/HTMLPurifier/Bootstrap.php'; |
|
22 | -require_once $__dir . '/HTMLPurifier/Definition.php'; |
|
23 | -require_once $__dir . '/HTMLPurifier/CSSDefinition.php'; |
|
24 | -require_once $__dir . '/HTMLPurifier/ChildDef.php'; |
|
25 | -require_once $__dir . '/HTMLPurifier/Config.php'; |
|
26 | -require_once $__dir . '/HTMLPurifier/ConfigSchema.php'; |
|
27 | -require_once $__dir . '/HTMLPurifier/ContentSets.php'; |
|
28 | -require_once $__dir . '/HTMLPurifier/Context.php'; |
|
29 | -require_once $__dir . '/HTMLPurifier/DefinitionCache.php'; |
|
30 | -require_once $__dir . '/HTMLPurifier/DefinitionCacheFactory.php'; |
|
31 | -require_once $__dir . '/HTMLPurifier/Doctype.php'; |
|
32 | -require_once $__dir . '/HTMLPurifier/DoctypeRegistry.php'; |
|
33 | -require_once $__dir . '/HTMLPurifier/ElementDef.php'; |
|
34 | -require_once $__dir . '/HTMLPurifier/Encoder.php'; |
|
35 | -require_once $__dir . '/HTMLPurifier/EntityLookup.php'; |
|
36 | -require_once $__dir . '/HTMLPurifier/EntityParser.php'; |
|
37 | -require_once $__dir . '/HTMLPurifier/ErrorCollector.php'; |
|
38 | -require_once $__dir . '/HTMLPurifier/ErrorStruct.php'; |
|
39 | -require_once $__dir . '/HTMLPurifier/Exception.php'; |
|
40 | -require_once $__dir . '/HTMLPurifier/Filter.php'; |
|
41 | -require_once $__dir . '/HTMLPurifier/Generator.php'; |
|
42 | -require_once $__dir . '/HTMLPurifier/HTMLDefinition.php'; |
|
43 | -require_once $__dir . '/HTMLPurifier/HTMLModule.php'; |
|
44 | -require_once $__dir . '/HTMLPurifier/HTMLModuleManager.php'; |
|
45 | -require_once $__dir . '/HTMLPurifier/IDAccumulator.php'; |
|
46 | -require_once $__dir . '/HTMLPurifier/Injector.php'; |
|
47 | -require_once $__dir . '/HTMLPurifier/Language.php'; |
|
48 | -require_once $__dir . '/HTMLPurifier/LanguageFactory.php'; |
|
49 | -require_once $__dir . '/HTMLPurifier/Length.php'; |
|
50 | -require_once $__dir . '/HTMLPurifier/Lexer.php'; |
|
51 | -require_once $__dir . '/HTMLPurifier/PercentEncoder.php'; |
|
52 | -require_once $__dir . '/HTMLPurifier/PropertyList.php'; |
|
53 | -require_once $__dir . '/HTMLPurifier/PropertyListIterator.php'; |
|
54 | -require_once $__dir . '/HTMLPurifier/Strategy.php'; |
|
55 | -require_once $__dir . '/HTMLPurifier/StringHash.php'; |
|
56 | -require_once $__dir . '/HTMLPurifier/StringHashParser.php'; |
|
57 | -require_once $__dir . '/HTMLPurifier/TagTransform.php'; |
|
58 | -require_once $__dir . '/HTMLPurifier/Token.php'; |
|
59 | -require_once $__dir . '/HTMLPurifier/TokenFactory.php'; |
|
60 | -require_once $__dir . '/HTMLPurifier/URI.php'; |
|
61 | -require_once $__dir . '/HTMLPurifier/URIDefinition.php'; |
|
62 | -require_once $__dir . '/HTMLPurifier/URIFilter.php'; |
|
63 | -require_once $__dir . '/HTMLPurifier/URIParser.php'; |
|
64 | -require_once $__dir . '/HTMLPurifier/URIScheme.php'; |
|
65 | -require_once $__dir . '/HTMLPurifier/URISchemeRegistry.php'; |
|
66 | -require_once $__dir . '/HTMLPurifier/UnitConverter.php'; |
|
67 | -require_once $__dir . '/HTMLPurifier/VarParser.php'; |
|
68 | -require_once $__dir . '/HTMLPurifier/VarParserException.php'; |
|
69 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS.php'; |
|
70 | -require_once $__dir . '/HTMLPurifier/AttrDef/Clone.php'; |
|
71 | -require_once $__dir . '/HTMLPurifier/AttrDef/Enum.php'; |
|
72 | -require_once $__dir . '/HTMLPurifier/AttrDef/Integer.php'; |
|
73 | -require_once $__dir . '/HTMLPurifier/AttrDef/Lang.php'; |
|
74 | -require_once $__dir . '/HTMLPurifier/AttrDef/Switch.php'; |
|
75 | -require_once $__dir . '/HTMLPurifier/AttrDef/Text.php'; |
|
76 | -require_once $__dir . '/HTMLPurifier/AttrDef/URI.php'; |
|
77 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Number.php'; |
|
78 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/AlphaValue.php'; |
|
79 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Background.php'; |
|
80 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php'; |
|
81 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Border.php'; |
|
82 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Color.php'; |
|
83 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Composite.php'; |
|
84 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php'; |
|
85 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Filter.php'; |
|
86 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Font.php'; |
|
87 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/FontFamily.php'; |
|
88 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Ident.php'; |
|
89 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; |
|
90 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Length.php'; |
|
91 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/ListStyle.php'; |
|
92 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Multiple.php'; |
|
93 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/Percentage.php'; |
|
94 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/TextDecoration.php'; |
|
95 | -require_once $__dir . '/HTMLPurifier/AttrDef/CSS/URI.php'; |
|
96 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Bool.php'; |
|
97 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Nmtokens.php'; |
|
98 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Class.php'; |
|
99 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Color.php'; |
|
100 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/FrameTarget.php'; |
|
101 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/ID.php'; |
|
102 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Pixels.php'; |
|
103 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/Length.php'; |
|
104 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/LinkTypes.php'; |
|
105 | -require_once $__dir . '/HTMLPurifier/AttrDef/HTML/MultiLength.php'; |
|
106 | -require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email.php'; |
|
107 | -require_once $__dir . '/HTMLPurifier/AttrDef/URI/Host.php'; |
|
108 | -require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv4.php'; |
|
109 | -require_once $__dir . '/HTMLPurifier/AttrDef/URI/IPv6.php'; |
|
110 | -require_once $__dir . '/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php'; |
|
111 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Background.php'; |
|
112 | -require_once $__dir . '/HTMLPurifier/AttrTransform/BdoDir.php'; |
|
113 | -require_once $__dir . '/HTMLPurifier/AttrTransform/BgColor.php'; |
|
114 | -require_once $__dir . '/HTMLPurifier/AttrTransform/BoolToCSS.php'; |
|
115 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Border.php'; |
|
116 | -require_once $__dir . '/HTMLPurifier/AttrTransform/EnumToCSS.php'; |
|
117 | -require_once $__dir . '/HTMLPurifier/AttrTransform/ImgRequired.php'; |
|
118 | -require_once $__dir . '/HTMLPurifier/AttrTransform/ImgSpace.php'; |
|
119 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Input.php'; |
|
120 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Lang.php'; |
|
121 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Length.php'; |
|
122 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Name.php'; |
|
123 | -require_once $__dir . '/HTMLPurifier/AttrTransform/NameSync.php'; |
|
124 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Nofollow.php'; |
|
125 | -require_once $__dir . '/HTMLPurifier/AttrTransform/SafeEmbed.php'; |
|
126 | -require_once $__dir . '/HTMLPurifier/AttrTransform/SafeObject.php'; |
|
127 | -require_once $__dir . '/HTMLPurifier/AttrTransform/SafeParam.php'; |
|
128 | -require_once $__dir . '/HTMLPurifier/AttrTransform/ScriptRequired.php'; |
|
129 | -require_once $__dir . '/HTMLPurifier/AttrTransform/TargetBlank.php'; |
|
130 | -require_once $__dir . '/HTMLPurifier/AttrTransform/Textarea.php'; |
|
131 | -require_once $__dir . '/HTMLPurifier/ChildDef/Chameleon.php'; |
|
132 | -require_once $__dir . '/HTMLPurifier/ChildDef/Custom.php'; |
|
133 | -require_once $__dir . '/HTMLPurifier/ChildDef/Empty.php'; |
|
134 | -require_once $__dir . '/HTMLPurifier/ChildDef/List.php'; |
|
135 | -require_once $__dir . '/HTMLPurifier/ChildDef/Required.php'; |
|
136 | -require_once $__dir . '/HTMLPurifier/ChildDef/Optional.php'; |
|
137 | -require_once $__dir . '/HTMLPurifier/ChildDef/StrictBlockquote.php'; |
|
138 | -require_once $__dir . '/HTMLPurifier/ChildDef/Table.php'; |
|
139 | -require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator.php'; |
|
140 | -require_once $__dir . '/HTMLPurifier/DefinitionCache/Null.php'; |
|
141 | -require_once $__dir . '/HTMLPurifier/DefinitionCache/Serializer.php'; |
|
142 | -require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php'; |
|
143 | -require_once $__dir . '/HTMLPurifier/DefinitionCache/Decorator/Memory.php'; |
|
144 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Bdo.php'; |
|
145 | -require_once $__dir . '/HTMLPurifier/HTMLModule/CommonAttributes.php'; |
|
146 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Edit.php'; |
|
147 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Forms.php'; |
|
148 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Hypertext.php'; |
|
149 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Iframe.php'; |
|
150 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Image.php'; |
|
151 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Legacy.php'; |
|
152 | -require_once $__dir . '/HTMLPurifier/HTMLModule/List.php'; |
|
153 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Name.php'; |
|
154 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Nofollow.php'; |
|
155 | -require_once $__dir . '/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; |
|
156 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Object.php'; |
|
157 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Presentation.php'; |
|
158 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Proprietary.php'; |
|
159 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Ruby.php'; |
|
160 | -require_once $__dir . '/HTMLPurifier/HTMLModule/SafeEmbed.php'; |
|
161 | -require_once $__dir . '/HTMLPurifier/HTMLModule/SafeObject.php'; |
|
162 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Scripting.php'; |
|
163 | -require_once $__dir . '/HTMLPurifier/HTMLModule/StyleAttribute.php'; |
|
164 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tables.php'; |
|
165 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Target.php'; |
|
166 | -require_once $__dir . '/HTMLPurifier/HTMLModule/TargetBlank.php'; |
|
167 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Text.php'; |
|
168 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy.php'; |
|
169 | -require_once $__dir . '/HTMLPurifier/HTMLModule/XMLCommonAttributes.php'; |
|
170 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Name.php'; |
|
171 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Proprietary.php'; |
|
172 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php'; |
|
173 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Strict.php'; |
|
174 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/Transitional.php'; |
|
175 | -require_once $__dir . '/HTMLPurifier/HTMLModule/Tidy/XHTML.php'; |
|
176 | -require_once $__dir . '/HTMLPurifier/Injector/AutoParagraph.php'; |
|
177 | -require_once $__dir . '/HTMLPurifier/Injector/DisplayLinkURI.php'; |
|
178 | -require_once $__dir . '/HTMLPurifier/Injector/Linkify.php'; |
|
179 | -require_once $__dir . '/HTMLPurifier/Injector/PurifierLinkify.php'; |
|
180 | -require_once $__dir . '/HTMLPurifier/Injector/RemoveEmpty.php'; |
|
181 | -require_once $__dir . '/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php'; |
|
182 | -require_once $__dir . '/HTMLPurifier/Injector/SafeObject.php'; |
|
183 | -require_once $__dir . '/HTMLPurifier/Lexer/DOMLex.php'; |
|
184 | -require_once $__dir . '/HTMLPurifier/Lexer/DirectLex.php'; |
|
185 | -require_once $__dir . '/HTMLPurifier/Strategy/Composite.php'; |
|
186 | -require_once $__dir . '/HTMLPurifier/Strategy/Core.php'; |
|
187 | -require_once $__dir . '/HTMLPurifier/Strategy/FixNesting.php'; |
|
188 | -require_once $__dir . '/HTMLPurifier/Strategy/MakeWellFormed.php'; |
|
189 | -require_once $__dir . '/HTMLPurifier/Strategy/RemoveForeignElements.php'; |
|
190 | -require_once $__dir . '/HTMLPurifier/Strategy/ValidateAttributes.php'; |
|
191 | -require_once $__dir . '/HTMLPurifier/TagTransform/Font.php'; |
|
192 | -require_once $__dir . '/HTMLPurifier/TagTransform/Simple.php'; |
|
193 | -require_once $__dir . '/HTMLPurifier/Token/Comment.php'; |
|
194 | -require_once $__dir . '/HTMLPurifier/Token/Tag.php'; |
|
195 | -require_once $__dir . '/HTMLPurifier/Token/Empty.php'; |
|
196 | -require_once $__dir . '/HTMLPurifier/Token/End.php'; |
|
197 | -require_once $__dir . '/HTMLPurifier/Token/Start.php'; |
|
198 | -require_once $__dir . '/HTMLPurifier/Token/Text.php'; |
|
199 | -require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternal.php'; |
|
200 | -require_once $__dir . '/HTMLPurifier/URIFilter/DisableExternalResources.php'; |
|
201 | -require_once $__dir . '/HTMLPurifier/URIFilter/DisableResources.php'; |
|
202 | -require_once $__dir . '/HTMLPurifier/URIFilter/HostBlacklist.php'; |
|
203 | -require_once $__dir . '/HTMLPurifier/URIFilter/MakeAbsolute.php'; |
|
204 | -require_once $__dir . '/HTMLPurifier/URIFilter/Munge.php'; |
|
205 | -require_once $__dir . '/HTMLPurifier/URIFilter/SafeIframe.php'; |
|
206 | -require_once $__dir . '/HTMLPurifier/URIScheme/data.php'; |
|
207 | -require_once $__dir . '/HTMLPurifier/URIScheme/file.php'; |
|
208 | -require_once $__dir . '/HTMLPurifier/URIScheme/ftp.php'; |
|
209 | -require_once $__dir . '/HTMLPurifier/URIScheme/http.php'; |
|
210 | -require_once $__dir . '/HTMLPurifier/URIScheme/https.php'; |
|
211 | -require_once $__dir . '/HTMLPurifier/URIScheme/mailto.php'; |
|
212 | -require_once $__dir . '/HTMLPurifier/URIScheme/news.php'; |
|
213 | -require_once $__dir . '/HTMLPurifier/URIScheme/nntp.php'; |
|
214 | -require_once $__dir . '/HTMLPurifier/VarParser/Flexible.php'; |
|
215 | -require_once $__dir . '/HTMLPurifier/VarParser/Native.php'; |
|
15 | +require_once $__dir.'/HTMLPurifier.php'; |
|
16 | +require_once $__dir.'/HTMLPurifier/AttrCollections.php'; |
|
17 | +require_once $__dir.'/HTMLPurifier/AttrDef.php'; |
|
18 | +require_once $__dir.'/HTMLPurifier/AttrTransform.php'; |
|
19 | +require_once $__dir.'/HTMLPurifier/AttrTypes.php'; |
|
20 | +require_once $__dir.'/HTMLPurifier/AttrValidator.php'; |
|
21 | +require_once $__dir.'/HTMLPurifier/Bootstrap.php'; |
|
22 | +require_once $__dir.'/HTMLPurifier/Definition.php'; |
|
23 | +require_once $__dir.'/HTMLPurifier/CSSDefinition.php'; |
|
24 | +require_once $__dir.'/HTMLPurifier/ChildDef.php'; |
|
25 | +require_once $__dir.'/HTMLPurifier/Config.php'; |
|
26 | +require_once $__dir.'/HTMLPurifier/ConfigSchema.php'; |
|
27 | +require_once $__dir.'/HTMLPurifier/ContentSets.php'; |
|
28 | +require_once $__dir.'/HTMLPurifier/Context.php'; |
|
29 | +require_once $__dir.'/HTMLPurifier/DefinitionCache.php'; |
|
30 | +require_once $__dir.'/HTMLPurifier/DefinitionCacheFactory.php'; |
|
31 | +require_once $__dir.'/HTMLPurifier/Doctype.php'; |
|
32 | +require_once $__dir.'/HTMLPurifier/DoctypeRegistry.php'; |
|
33 | +require_once $__dir.'/HTMLPurifier/ElementDef.php'; |
|
34 | +require_once $__dir.'/HTMLPurifier/Encoder.php'; |
|
35 | +require_once $__dir.'/HTMLPurifier/EntityLookup.php'; |
|
36 | +require_once $__dir.'/HTMLPurifier/EntityParser.php'; |
|
37 | +require_once $__dir.'/HTMLPurifier/ErrorCollector.php'; |
|
38 | +require_once $__dir.'/HTMLPurifier/ErrorStruct.php'; |
|
39 | +require_once $__dir.'/HTMLPurifier/Exception.php'; |
|
40 | +require_once $__dir.'/HTMLPurifier/Filter.php'; |
|
41 | +require_once $__dir.'/HTMLPurifier/Generator.php'; |
|
42 | +require_once $__dir.'/HTMLPurifier/HTMLDefinition.php'; |
|
43 | +require_once $__dir.'/HTMLPurifier/HTMLModule.php'; |
|
44 | +require_once $__dir.'/HTMLPurifier/HTMLModuleManager.php'; |
|
45 | +require_once $__dir.'/HTMLPurifier/IDAccumulator.php'; |
|
46 | +require_once $__dir.'/HTMLPurifier/Injector.php'; |
|
47 | +require_once $__dir.'/HTMLPurifier/Language.php'; |
|
48 | +require_once $__dir.'/HTMLPurifier/LanguageFactory.php'; |
|
49 | +require_once $__dir.'/HTMLPurifier/Length.php'; |
|
50 | +require_once $__dir.'/HTMLPurifier/Lexer.php'; |
|
51 | +require_once $__dir.'/HTMLPurifier/PercentEncoder.php'; |
|
52 | +require_once $__dir.'/HTMLPurifier/PropertyList.php'; |
|
53 | +require_once $__dir.'/HTMLPurifier/PropertyListIterator.php'; |
|
54 | +require_once $__dir.'/HTMLPurifier/Strategy.php'; |
|
55 | +require_once $__dir.'/HTMLPurifier/StringHash.php'; |
|
56 | +require_once $__dir.'/HTMLPurifier/StringHashParser.php'; |
|
57 | +require_once $__dir.'/HTMLPurifier/TagTransform.php'; |
|
58 | +require_once $__dir.'/HTMLPurifier/Token.php'; |
|
59 | +require_once $__dir.'/HTMLPurifier/TokenFactory.php'; |
|
60 | +require_once $__dir.'/HTMLPurifier/URI.php'; |
|
61 | +require_once $__dir.'/HTMLPurifier/URIDefinition.php'; |
|
62 | +require_once $__dir.'/HTMLPurifier/URIFilter.php'; |
|
63 | +require_once $__dir.'/HTMLPurifier/URIParser.php'; |
|
64 | +require_once $__dir.'/HTMLPurifier/URIScheme.php'; |
|
65 | +require_once $__dir.'/HTMLPurifier/URISchemeRegistry.php'; |
|
66 | +require_once $__dir.'/HTMLPurifier/UnitConverter.php'; |
|
67 | +require_once $__dir.'/HTMLPurifier/VarParser.php'; |
|
68 | +require_once $__dir.'/HTMLPurifier/VarParserException.php'; |
|
69 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS.php'; |
|
70 | +require_once $__dir.'/HTMLPurifier/AttrDef/Clone.php'; |
|
71 | +require_once $__dir.'/HTMLPurifier/AttrDef/Enum.php'; |
|
72 | +require_once $__dir.'/HTMLPurifier/AttrDef/Integer.php'; |
|
73 | +require_once $__dir.'/HTMLPurifier/AttrDef/Lang.php'; |
|
74 | +require_once $__dir.'/HTMLPurifier/AttrDef/Switch.php'; |
|
75 | +require_once $__dir.'/HTMLPurifier/AttrDef/Text.php'; |
|
76 | +require_once $__dir.'/HTMLPurifier/AttrDef/URI.php'; |
|
77 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Number.php'; |
|
78 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/AlphaValue.php'; |
|
79 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Background.php'; |
|
80 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/BackgroundPosition.php'; |
|
81 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Border.php'; |
|
82 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Color.php'; |
|
83 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Composite.php'; |
|
84 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/DenyElementDecorator.php'; |
|
85 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Filter.php'; |
|
86 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Font.php'; |
|
87 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/FontFamily.php'; |
|
88 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Ident.php'; |
|
89 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/ImportantDecorator.php'; |
|
90 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Length.php'; |
|
91 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/ListStyle.php'; |
|
92 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Multiple.php'; |
|
93 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/Percentage.php'; |
|
94 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/TextDecoration.php'; |
|
95 | +require_once $__dir.'/HTMLPurifier/AttrDef/CSS/URI.php'; |
|
96 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/Bool.php'; |
|
97 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/Nmtokens.php'; |
|
98 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/Class.php'; |
|
99 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/Color.php'; |
|
100 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/FrameTarget.php'; |
|
101 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/ID.php'; |
|
102 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/Pixels.php'; |
|
103 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/Length.php'; |
|
104 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/LinkTypes.php'; |
|
105 | +require_once $__dir.'/HTMLPurifier/AttrDef/HTML/MultiLength.php'; |
|
106 | +require_once $__dir.'/HTMLPurifier/AttrDef/URI/Email.php'; |
|
107 | +require_once $__dir.'/HTMLPurifier/AttrDef/URI/Host.php'; |
|
108 | +require_once $__dir.'/HTMLPurifier/AttrDef/URI/IPv4.php'; |
|
109 | +require_once $__dir.'/HTMLPurifier/AttrDef/URI/IPv6.php'; |
|
110 | +require_once $__dir.'/HTMLPurifier/AttrDef/URI/Email/SimpleCheck.php'; |
|
111 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Background.php'; |
|
112 | +require_once $__dir.'/HTMLPurifier/AttrTransform/BdoDir.php'; |
|
113 | +require_once $__dir.'/HTMLPurifier/AttrTransform/BgColor.php'; |
|
114 | +require_once $__dir.'/HTMLPurifier/AttrTransform/BoolToCSS.php'; |
|
115 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Border.php'; |
|
116 | +require_once $__dir.'/HTMLPurifier/AttrTransform/EnumToCSS.php'; |
|
117 | +require_once $__dir.'/HTMLPurifier/AttrTransform/ImgRequired.php'; |
|
118 | +require_once $__dir.'/HTMLPurifier/AttrTransform/ImgSpace.php'; |
|
119 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Input.php'; |
|
120 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Lang.php'; |
|
121 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Length.php'; |
|
122 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Name.php'; |
|
123 | +require_once $__dir.'/HTMLPurifier/AttrTransform/NameSync.php'; |
|
124 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Nofollow.php'; |
|
125 | +require_once $__dir.'/HTMLPurifier/AttrTransform/SafeEmbed.php'; |
|
126 | +require_once $__dir.'/HTMLPurifier/AttrTransform/SafeObject.php'; |
|
127 | +require_once $__dir.'/HTMLPurifier/AttrTransform/SafeParam.php'; |
|
128 | +require_once $__dir.'/HTMLPurifier/AttrTransform/ScriptRequired.php'; |
|
129 | +require_once $__dir.'/HTMLPurifier/AttrTransform/TargetBlank.php'; |
|
130 | +require_once $__dir.'/HTMLPurifier/AttrTransform/Textarea.php'; |
|
131 | +require_once $__dir.'/HTMLPurifier/ChildDef/Chameleon.php'; |
|
132 | +require_once $__dir.'/HTMLPurifier/ChildDef/Custom.php'; |
|
133 | +require_once $__dir.'/HTMLPurifier/ChildDef/Empty.php'; |
|
134 | +require_once $__dir.'/HTMLPurifier/ChildDef/List.php'; |
|
135 | +require_once $__dir.'/HTMLPurifier/ChildDef/Required.php'; |
|
136 | +require_once $__dir.'/HTMLPurifier/ChildDef/Optional.php'; |
|
137 | +require_once $__dir.'/HTMLPurifier/ChildDef/StrictBlockquote.php'; |
|
138 | +require_once $__dir.'/HTMLPurifier/ChildDef/Table.php'; |
|
139 | +require_once $__dir.'/HTMLPurifier/DefinitionCache/Decorator.php'; |
|
140 | +require_once $__dir.'/HTMLPurifier/DefinitionCache/Null.php'; |
|
141 | +require_once $__dir.'/HTMLPurifier/DefinitionCache/Serializer.php'; |
|
142 | +require_once $__dir.'/HTMLPurifier/DefinitionCache/Decorator/Cleanup.php'; |
|
143 | +require_once $__dir.'/HTMLPurifier/DefinitionCache/Decorator/Memory.php'; |
|
144 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Bdo.php'; |
|
145 | +require_once $__dir.'/HTMLPurifier/HTMLModule/CommonAttributes.php'; |
|
146 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Edit.php'; |
|
147 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Forms.php'; |
|
148 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Hypertext.php'; |
|
149 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Iframe.php'; |
|
150 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Image.php'; |
|
151 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Legacy.php'; |
|
152 | +require_once $__dir.'/HTMLPurifier/HTMLModule/List.php'; |
|
153 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Name.php'; |
|
154 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Nofollow.php'; |
|
155 | +require_once $__dir.'/HTMLPurifier/HTMLModule/NonXMLCommonAttributes.php'; |
|
156 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Object.php'; |
|
157 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Presentation.php'; |
|
158 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Proprietary.php'; |
|
159 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Ruby.php'; |
|
160 | +require_once $__dir.'/HTMLPurifier/HTMLModule/SafeEmbed.php'; |
|
161 | +require_once $__dir.'/HTMLPurifier/HTMLModule/SafeObject.php'; |
|
162 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Scripting.php'; |
|
163 | +require_once $__dir.'/HTMLPurifier/HTMLModule/StyleAttribute.php'; |
|
164 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tables.php'; |
|
165 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Target.php'; |
|
166 | +require_once $__dir.'/HTMLPurifier/HTMLModule/TargetBlank.php'; |
|
167 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Text.php'; |
|
168 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy.php'; |
|
169 | +require_once $__dir.'/HTMLPurifier/HTMLModule/XMLCommonAttributes.php'; |
|
170 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy/Name.php'; |
|
171 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy/Proprietary.php'; |
|
172 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy/XHTMLAndHTML4.php'; |
|
173 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy/Strict.php'; |
|
174 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy/Transitional.php'; |
|
175 | +require_once $__dir.'/HTMLPurifier/HTMLModule/Tidy/XHTML.php'; |
|
176 | +require_once $__dir.'/HTMLPurifier/Injector/AutoParagraph.php'; |
|
177 | +require_once $__dir.'/HTMLPurifier/Injector/DisplayLinkURI.php'; |
|
178 | +require_once $__dir.'/HTMLPurifier/Injector/Linkify.php'; |
|
179 | +require_once $__dir.'/HTMLPurifier/Injector/PurifierLinkify.php'; |
|
180 | +require_once $__dir.'/HTMLPurifier/Injector/RemoveEmpty.php'; |
|
181 | +require_once $__dir.'/HTMLPurifier/Injector/RemoveSpansWithoutAttributes.php'; |
|
182 | +require_once $__dir.'/HTMLPurifier/Injector/SafeObject.php'; |
|
183 | +require_once $__dir.'/HTMLPurifier/Lexer/DOMLex.php'; |
|
184 | +require_once $__dir.'/HTMLPurifier/Lexer/DirectLex.php'; |
|
185 | +require_once $__dir.'/HTMLPurifier/Strategy/Composite.php'; |
|
186 | +require_once $__dir.'/HTMLPurifier/Strategy/Core.php'; |
|
187 | +require_once $__dir.'/HTMLPurifier/Strategy/FixNesting.php'; |
|
188 | +require_once $__dir.'/HTMLPurifier/Strategy/MakeWellFormed.php'; |
|
189 | +require_once $__dir.'/HTMLPurifier/Strategy/RemoveForeignElements.php'; |
|
190 | +require_once $__dir.'/HTMLPurifier/Strategy/ValidateAttributes.php'; |
|
191 | +require_once $__dir.'/HTMLPurifier/TagTransform/Font.php'; |
|
192 | +require_once $__dir.'/HTMLPurifier/TagTransform/Simple.php'; |
|
193 | +require_once $__dir.'/HTMLPurifier/Token/Comment.php'; |
|
194 | +require_once $__dir.'/HTMLPurifier/Token/Tag.php'; |
|
195 | +require_once $__dir.'/HTMLPurifier/Token/Empty.php'; |
|
196 | +require_once $__dir.'/HTMLPurifier/Token/End.php'; |
|
197 | +require_once $__dir.'/HTMLPurifier/Token/Start.php'; |
|
198 | +require_once $__dir.'/HTMLPurifier/Token/Text.php'; |
|
199 | +require_once $__dir.'/HTMLPurifier/URIFilter/DisableExternal.php'; |
|
200 | +require_once $__dir.'/HTMLPurifier/URIFilter/DisableExternalResources.php'; |
|
201 | +require_once $__dir.'/HTMLPurifier/URIFilter/DisableResources.php'; |
|
202 | +require_once $__dir.'/HTMLPurifier/URIFilter/HostBlacklist.php'; |
|
203 | +require_once $__dir.'/HTMLPurifier/URIFilter/MakeAbsolute.php'; |
|
204 | +require_once $__dir.'/HTMLPurifier/URIFilter/Munge.php'; |
|
205 | +require_once $__dir.'/HTMLPurifier/URIFilter/SafeIframe.php'; |
|
206 | +require_once $__dir.'/HTMLPurifier/URIScheme/data.php'; |
|
207 | +require_once $__dir.'/HTMLPurifier/URIScheme/file.php'; |
|
208 | +require_once $__dir.'/HTMLPurifier/URIScheme/ftp.php'; |
|
209 | +require_once $__dir.'/HTMLPurifier/URIScheme/http.php'; |
|
210 | +require_once $__dir.'/HTMLPurifier/URIScheme/https.php'; |
|
211 | +require_once $__dir.'/HTMLPurifier/URIScheme/mailto.php'; |
|
212 | +require_once $__dir.'/HTMLPurifier/URIScheme/news.php'; |
|
213 | +require_once $__dir.'/HTMLPurifier/URIScheme/nntp.php'; |
|
214 | +require_once $__dir.'/HTMLPurifier/VarParser/Flexible.php'; |
|
215 | +require_once $__dir.'/HTMLPurifier/VarParser/Native.php'; |
@@ -6,6 +6,6 @@ |
||
6 | 6 | * without any other side-effects. |
7 | 7 | */ |
8 | 8 | |
9 | -set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); |
|
9 | +set_include_path(dirname(__FILE__).PATH_SEPARATOR.get_include_path()); |
|
10 | 10 | |
11 | 11 | // vim: et sw=4 sts=4 |
@@ -4,7 +4,7 @@ |
||
4 | 4 | * This is a stub include that automatically configures the include path. |
5 | 5 | */ |
6 | 6 | |
7 | -set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() ); |
|
7 | +set_include_path(dirname(__FILE__).PATH_SEPARATOR.get_include_path()); |
|
8 | 8 | require_once 'HTMLPurifier/Bootstrap.php'; |
9 | 9 | require_once 'HTMLPurifier.autoload.php'; |
10 | 10 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | function getExpression() |
44 | 44 | { |
45 | - return sprintf("%s%s", $this->column_name, $this->column_alias ? " as " . $this->column_alias : ""); |
|
45 | + return sprintf("%s%s", $this->column_name, $this->column_alias ? " as ".$this->column_alias : ""); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | function show() |
@@ -42,16 +42,16 @@ |
||
42 | 42 | function getValue() |
43 | 43 | { |
44 | 44 | // TODO Escape value according to column type instead of variable type |
45 | - if(!is_numeric($this->value)) |
|
45 | + if (!is_numeric($this->value)) |
|
46 | 46 | { |
47 | - return "'" . $this->value . "'"; |
|
47 | + return "'".$this->value."'"; |
|
48 | 48 | } |
49 | 49 | return $this->value; |
50 | 50 | } |
51 | 51 | |
52 | 52 | function show() |
53 | 53 | { |
54 | - if(!$this->value) |
|
54 | + if (!$this->value) |
|
55 | 55 | { |
56 | 56 | return false; |
57 | 57 | } |
@@ -38,21 +38,21 @@ |
||
38 | 38 | { |
39 | 39 | // TODO Escape value according to column type instead of variable type |
40 | 40 | $value = $this->argument; |
41 | - if(!is_numeric($value)) |
|
41 | + if (!is_numeric($value)) |
|
42 | 42 | { |
43 | - return "'" . $value . "'"; |
|
43 | + return "'".$value."'"; |
|
44 | 44 | } |
45 | 45 | return $value; |
46 | 46 | } |
47 | 47 | |
48 | 48 | function show() |
49 | 49 | { |
50 | - if(!$this->argument) |
|
50 | + if (!$this->argument) |
|
51 | 51 | { |
52 | 52 | return false; |
53 | 53 | } |
54 | 54 | $value = $this->argument; |
55 | - if(!isset($value)) |
|
55 | + if (!isset($value)) |
|
56 | 56 | { |
57 | 57 | return false; |
58 | 58 | } |