GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 6d6c9c...eb5d2b )
by gyeong-won
08:55
created
modules/member/member.controller.php 3 patches
Doc Comments   +24 added lines, -13 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	{
Please login to merge, or discard this patch.
Spacing   +458 added lines, -458 removed lines patch added patch discarded remove patch
@@ -34,25 +34,25 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
1551 1551
 		$signature = trim(removeHackTag($signature));
1552 1552
 		$signature = preg_replace('/<(\/?)(embed|object|param)/is', '&lt;$1$2', $signature);
1553 1553
 
1554
-		$check_signature = trim(str_replace(array('&nbsp;',"\n","\r"), '', strip_tags($signature, '<img><object>')));
1554
+		$check_signature = trim(str_replace(array('&nbsp;', "\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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
Braces   +591 added lines, -254 removed lines patch added patch discarded remove patch
@@ -41,19 +41,31 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
classes/frontendfile/FrontEndFileHandler.class.php 2 patches
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	function isSsl()
56 56
 	{
57
-		if(!is_null(self::$isSSL))
57
+		if (!is_null(self::$isSSL))
58 58
 		{
59 59
 			return self::$isSSL;
60 60
 		}
@@ -88,30 +88,30 @@  discard block
 block discarded – undo
88 88
 	 * */
89 89
 	function loadFile($args)
90 90
 	{
91
-		if(!is_array($args))
91
+		if (!is_array($args))
92 92
 		{
93 93
 			$args = array($args);
94 94
 		}
95 95
 		$file = $this->getFileInfo($args[0], $args[2], $args[1]);
96 96
 
97 97
 		$availableExtension = array('css' => 1, 'js' => 1);
98
-		if(!isset($availableExtension[$file->fileExtension]))
98
+		if (!isset($availableExtension[$file->fileExtension]))
99 99
 		{
100 100
 			return;
101 101
 		}
102 102
 
103 103
 		$file->index = (int) $args[3];
104 104
 
105
-		if($file->fileExtension == 'css')
105
+		if ($file->fileExtension == 'css')
106 106
 		{
107 107
 			$map = &$this->cssMap;
108 108
 			$mapIndex = &$this->cssMapIndex;
109 109
 
110 110
 			$this->_arrangeCssIndex($pathInfo['dirname'], $file);
111 111
 		}
112
-		else if($file->fileExtension == 'js')
112
+		else if ($file->fileExtension == 'js')
113 113
 		{
114
-			if($args[1] == 'body')
114
+			if ($args[1] == 'body')
115 115
 			{
116 116
 				$map = &$this->jsBodyMap;
117 117
 				$mapIndex = &$this->jsBodyMapIndex;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		(is_null($file->index)) ? $file->index = 0 : $file->index = $file->index;
127
-		if(!isset($mapIndex[$file->key]) || $mapIndex[$file->key] > $file->index)
127
+		if (!isset($mapIndex[$file->key]) || $mapIndex[$file->key] > $file->index)
128 128
 		{
129 129
 			$this->unloadFile($args[0], $args[2], $args[1]);
130 130
 			$map[$file->index][$file->key] = $file;
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
 	{
145 145
 		static $existsInfo = array();
146 146
 
147
-		if(isset($existsInfo[$existsKey]))
147
+		if (isset($existsInfo[$existsKey]))
148 148
 		{
149 149
 			return $existsInfo[$existsKey];
150 150
 		}
151 151
 
152 152
 		$url_info = parse_url($fileName);
153
-		$pathInfo = pathinfo(str_replace('?' . $url_info['query'], '', $fileName));
153
+		$pathInfo = pathinfo(str_replace('?'.$url_info['query'], '', $fileName));
154 154
 
155 155
 		$file = new stdClass();
156 156
 		$file->fileName = basename($url_info['path']);
@@ -163,14 +163,14 @@  discard block
 block discarded – undo
163 163
 		$file->keyName = implode('.', array($file->fileNameNoExt, $file->fileExtension));
164 164
 		$file->cdnPath = $this->_normalizeFilePath($pathInfo['dirname']);
165 165
 
166
-		if(!$file->external)
166
+		if (!$file->external)
167 167
 		{
168
-			if(!__DEBUG__ && __XE_VERSION_STABLE__)
168
+			if (!__DEBUG__ && __XE_VERSION_STABLE__)
169 169
 			{
170 170
 				// if no debug mode, load minifed file
171 171
 				$minifiedFileName = implode('.', array($file->fileNameNoExt, 'min', $file->fileExtension));
172 172
 				$minifiedRealPath = implode('/', array($file->fileRealPath, $minifiedFileName));
173
-				if(file_exists($minifiedRealPath))
173
+				if (file_exists($minifiedRealPath))
174 174
 				{
175 175
 					$file->fileName = $minifiedFileName;
176 176
 				}
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 			else
179 179
 			{
180 180
 				// Remove .min
181
-				if(file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
181
+				if (file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
182 182
 				{
183 183
 					$file->fileName = $file->keyName;
184 184
 				}
@@ -187,18 +187,18 @@  discard block
 block discarded – undo
187 187
 
188 188
 		$file->targetIe = $targetIe;
189 189
 
190
-		if($file->fileExtension == 'css')
190
+		if ($file->fileExtension == 'css')
191 191
 		{
192 192
 			$file->media = $media;
193
-			if(!$file->media)
193
+			if (!$file->media)
194 194
 			{
195 195
 				$file->media = 'all';
196 196
 			}
197
-			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe . "\t" . $file->media;
197
+			$file->key = $file->filePath.$file->keyName."\t".$file->targetIe."\t".$file->media;
198 198
 		}
199
-		else if($file->fileExtension == 'js')
199
+		else if ($file->fileExtension == 'js')
200 200
 		{
201
-			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe;
201
+			$file->key = $file->filePath.$file->keyName."\t".$file->targetIe;
202 202
 		}
203 203
 
204 204
 		return $file;
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 	{
217 217
 		$file = $this->getFileInfo($fileName, $targetIe, $media);
218 218
 
219
-		if($file->fileExtension == 'css')
219
+		if ($file->fileExtension == 'css')
220 220
 		{
221
-			if(isset($this->cssMapIndex[$file->key]))
221
+			if (isset($this->cssMapIndex[$file->key]))
222 222
 			{
223 223
 				$index = $this->cssMapIndex[$file->key];
224 224
 				unset($this->cssMap[$index][$file->key], $this->cssMapIndex[$file->key]);
@@ -226,12 +226,12 @@  discard block
 block discarded – undo
226 226
 		}
227 227
 		else
228 228
 		{
229
-			if(isset($this->jsHeadMapIndex[$file->key]))
229
+			if (isset($this->jsHeadMapIndex[$file->key]))
230 230
 			{
231 231
 				$index = $this->jsHeadMapIndex[$file->key];
232 232
 				unset($this->jsHeadMap[$index][$file->key], $this->jsHeadMapIndex[$file->key]);
233 233
 			}
234
-			if(isset($this->jsBodyMapIndex[$file->key]))
234
+			if (isset($this->jsBodyMapIndex[$file->key]))
235 235
 			{
236 236
 				$index = $this->jsBodyMapIndex[$file->key];
237 237
 				unset($this->jsBodyMap[$index][$file->key], $this->jsBodyMapIndex[$file->key]);
@@ -247,13 +247,13 @@  discard block
 block discarded – undo
247 247
 	 */
248 248
 	function unloadAllFiles($type = 'all')
249 249
 	{
250
-		if($type == 'css' || $type == 'all')
250
+		if ($type == 'css' || $type == 'all')
251 251
 		{
252 252
 			$this->cssMap = array();
253 253
 			$this->cssMapIndex = array();
254 254
 		}
255 255
 
256
-		if($type == 'js' || $type == 'all')
256
+		if ($type == 'js' || $type == 'all')
257 257
 		{
258 258
 			$this->jsHeadMap = array();
259 259
 			$this->jsBodyMap = array();
@@ -275,23 +275,23 @@  discard block
 block discarded – undo
275 275
 		$this->_sortMap($map, $mapIndex);
276 276
 
277 277
 		$result = array();
278
-		foreach($map as $indexedMap)
278
+		foreach ($map as $indexedMap)
279 279
 		{
280
-			foreach($indexedMap as $file)
280
+			foreach ($indexedMap as $file)
281 281
 			{
282 282
 				$query = '';
283
-				if(!$file->external && is_readable($file->cdnPath . '/' . $file->fileName))
283
+				if (!$file->external && is_readable($file->cdnPath.'/'.$file->fileName))
284 284
 				{
285
-					$query = date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName));
285
+					$query = date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName));
286 286
 				}
287
-				if($file->query)
287
+				if ($file->query)
288 288
 				{
289
-					if($query) $query .= '&';
289
+					if ($query) $query .= '&';
290 290
 					$query .= $file->query;
291 291
 				}
292
-				$query = ($query) ? '?' . $query : '';
292
+				$query = ($query) ? '?'.$query : '';
293 293
 
294
-				$fullFilePath = $file->filePath . '/' . $file->fileName . $query;
294
+				$fullFilePath = $file->filePath.'/'.$file->fileName.$query;
295 295
 				$result[] = array(
296 296
 					'file' => $fullFilePath,
297 297
 					'media' => $file->media,
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	 */
312 312
 	function getJsFileList($type = 'head')
313 313
 	{
314
-		if($type == 'head')
314
+		if ($type == 'head')
315 315
 		{
316 316
 			$map = &$this->jsHeadMap;
317 317
 			$mapIndex = &$this->jsHeadMapIndex;
@@ -325,23 +325,23 @@  discard block
 block discarded – undo
325 325
 		$this->_sortMap($map, $mapIndex);
326 326
 
327 327
 		$result = array();
328
-		foreach($map as $indexedMap)
328
+		foreach ($map as $indexedMap)
329 329
 		{
330
-			foreach($indexedMap as $file)
330
+			foreach ($indexedMap as $file)
331 331
 			{
332 332
 				$query = '';
333
-				if(!$file->external && is_readable($file->cdnPath . '/' . $file->fileName))
333
+				if (!$file->external && is_readable($file->cdnPath.'/'.$file->fileName))
334 334
 				{
335
-					$query = date('YmdHis', filemtime($file->cdnPath . '/' . $file->fileName));
335
+					$query = date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName));
336 336
 				}
337
-				if($file->query)
337
+				if ($file->query)
338 338
 				{
339
-					if($query) $query .= '&';
339
+					if ($query) $query .= '&';
340 340
 					$query .= $file->query;
341 341
 				}
342
-				$query = ($query) ? '?' . $query : '';
342
+				$query = ($query) ? '?'.$query : '';
343 343
 
344
-				$fullFilePath = $file->filePath . '/' . $file->fileName . $query;
344
+				$fullFilePath = $file->filePath.'/'.$file->fileName.$query;
345 345
 				$result[] = array(
346 346
 					'file' => $fullFilePath,
347 347
 					'targetie' => $file->targetIe
@@ -372,18 +372,18 @@  discard block
 block discarded – undo
372 372
 	 */
373 373
 	function _normalizeFilePath($path)
374 374
 	{
375
-		if(strpos($path, '://') === FALSE && $path{0} != '/' && $path{0} != '.')
375
+		if (strpos($path, '://') === FALSE && $path{0} != '/' && $path{0} != '.')
376 376
 		{
377
-			$path = './' . $path;
377
+			$path = './'.$path;
378 378
 		}
379
-		elseif(!strncmp($path, '//', 2))
379
+		elseif (!strncmp($path, '//', 2))
380 380
 		{
381 381
 			return preg_replace('#^//+#', '//', $path);
382 382
 		}
383 383
 
384 384
 		$path = preg_replace('@/\./|(?<!:)\/\/@', '/', $path);
385 385
 
386
-		while(strpos($path, '/../'))
386
+		while (strpos($path, '/../'))
387 387
 		{
388 388
 			$path = preg_replace('/\/([^\/]+)\/\.\.\//s', '/', $path, 1);
389 389
 		}
@@ -402,20 +402,20 @@  discard block
 block discarded – undo
402 402
 		$path = $this->_normalizeFilePath($path);
403 403
 		$script_path = getScriptPath();
404 404
 
405
-		if(strpos($path, './') === 0)
405
+		if (strpos($path, './') === 0)
406 406
 		{
407
-			if($script_path == '/' || $script_path == '\\')
407
+			if ($script_path == '/' || $script_path == '\\')
408 408
 			{
409
-				$path = '/' . substr($path, 2);
409
+				$path = '/'.substr($path, 2);
410 410
 			}
411 411
 			else
412 412
 			{
413
-				$path = $script_path . substr($path, 2);
413
+				$path = $script_path.substr($path, 2);
414 414
 			}
415 415
 		}
416
-		else if(strpos($file, '../') === 0)
416
+		else if (strpos($file, '../') === 0)
417 417
 		{
418
-			$path = $this->_normalizeFilePath($script_path . $path);
418
+			$path = $this->_normalizeFilePath($script_path.$path);
419 419
 		}
420 420
 
421 421
 		return $path;
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 	 */
431 431
 	function _arrangeCssIndex($dirName, &$file)
432 432
 	{
433
-		if($file->index !== 0)
433
+		if ($file->index !== 0)
434 434
 		{
435 435
 			return;
436 436
 		}
Please login to merge, or discard this patch.
Braces   +15 added lines, -20 removed lines patch added patch discarded remove patch
@@ -108,15 +108,13 @@  discard block
 block discarded – undo
108 108
 			$mapIndex = &$this->cssMapIndex;
109 109
 
110 110
 			$this->_arrangeCssIndex($pathInfo['dirname'], $file);
111
-		}
112
-		else if($file->fileExtension == 'js')
111
+		} else if($file->fileExtension == 'js')
113 112
 		{
114 113
 			if($args[1] == 'body')
115 114
 			{
116 115
 				$map = &$this->jsBodyMap;
117 116
 				$mapIndex = &$this->jsBodyMapIndex;
118
-			}
119
-			else
117
+			} else
120 118
 			{
121 119
 				$map = &$this->jsHeadMap;
122 120
 				$mapIndex = &$this->jsHeadMapIndex;
@@ -174,8 +172,7 @@  discard block
 block discarded – undo
174 172
 				{
175 173
 					$file->fileName = $minifiedFileName;
176 174
 				}
177
-			}
178
-			else
175
+			} else
179 176
 			{
180 177
 				// Remove .min
181 178
 				if(file_exists(implode('/', array($file->fileRealPath, $file->keyName))))
@@ -195,8 +192,7 @@  discard block
 block discarded – undo
195 192
 				$file->media = 'all';
196 193
 			}
197 194
 			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe . "\t" . $file->media;
198
-		}
199
-		else if($file->fileExtension == 'js')
195
+		} else if($file->fileExtension == 'js')
200 196
 		{
201 197
 			$file->key = $file->filePath . $file->keyName . "\t" . $file->targetIe;
202 198
 		}
@@ -223,8 +219,7 @@  discard block
 block discarded – undo
223 219
 				$index = $this->cssMapIndex[$file->key];
224 220
 				unset($this->cssMap[$index][$file->key], $this->cssMapIndex[$file->key]);
225 221
 			}
226
-		}
227
-		else
222
+		} else
228 223
 		{
229 224
 			if(isset($this->jsHeadMapIndex[$file->key]))
230 225
 			{
@@ -286,7 +281,9 @@  discard block
 block discarded – undo
286 281
 				}
287 282
 				if($file->query)
288 283
 				{
289
-					if($query) $query .= '&';
284
+					if($query) {
285
+						$query .= '&';
286
+					}
290 287
 					$query .= $file->query;
291 288
 				}
292 289
 				$query = ($query) ? '?' . $query : '';
@@ -315,8 +312,7 @@  discard block
 block discarded – undo
315 312
 		{
316 313
 			$map = &$this->jsHeadMap;
317 314
 			$mapIndex = &$this->jsHeadMapIndex;
318
-		}
319
-		else
315
+		} else
320 316
 		{
321 317
 			$map = &$this->jsBodyMap;
322 318
 			$mapIndex = &$this->jsBodyMapIndex;
@@ -336,7 +332,9 @@  discard block
 block discarded – undo
336 332
 				}
337 333
 				if($file->query)
338 334
 				{
339
-					if($query) $query .= '&';
335
+					if($query) {
336
+						$query .= '&';
337
+					}
340 338
 					$query .= $file->query;
341 339
 				}
342 340
 				$query = ($query) ? '?' . $query : '';
@@ -375,8 +373,7 @@  discard block
 block discarded – undo
375 373
 		if(strpos($path, '://') === FALSE && $path{0} != '/' && $path{0} != '.')
376 374
 		{
377 375
 			$path = './' . $path;
378
-		}
379
-		elseif(!strncmp($path, '//', 2))
376
+		} elseif(!strncmp($path, '//', 2))
380 377
 		{
381 378
 			return preg_replace('#^//+#', '//', $path);
382 379
 		}
@@ -407,13 +404,11 @@  discard block
 block discarded – undo
407 404
 			if($script_path == '/' || $script_path == '\\')
408 405
 			{
409 406
 				$path = '/' . substr($path, 2);
410
-			}
411
-			else
407
+			} else
412 408
 			{
413 409
 				$path = $script_path . substr($path, 2);
414 410
 			}
415
-		}
416
-		else if(strpos($file, '../') === 0)
411
+		} else if(strpos($file, '../') === 0)
417 412
 		{
418 413
 			$path = $this->_normalizeFilePath($script_path . $path);
419 414
 		}
Please login to merge, or discard this patch.
classes/display/HTMLDisplayHandler.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
 
20 20
 		$template_path = $oModule->getTemplatePath();
21 21
 
22
-		if(!is_dir($template_path))
22
+		if (!is_dir($template_path))
23 23
 		{
24
-			if($oModule->module_info->module == $oModule->module)
24
+			if ($oModule->module_info->module == $oModule->module)
25 25
 			{
26 26
 				$skin = $oModule->origin_module_info->skin;
27 27
 			}
@@ -30,17 +30,17 @@  discard block
 block discarded – undo
30 30
 				$skin = $oModule->module_config->skin;
31 31
 			}
32 32
 
33
-			if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false)
33
+			if (Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') === false)
34 34
 			{
35
-				if($skin && is_string($skin))
35
+				if ($skin && is_string($skin))
36 36
 				{
37 37
 					$theme_skin = explode('|@|', $skin);
38 38
 					$template_path = $oModule->getTemplatePath();
39
-					if(count($theme_skin) == 2)
39
+					if (count($theme_skin) == 2)
40 40
 					{
41 41
 						$theme_path = sprintf('./themes/%s', $theme_skin[0]);
42 42
 						// FIXME $theme_path $theme_path $theme_path ??
43
-						if(substr($theme_path, 0, strlen($theme_path)) != $theme_path)
43
+						if (substr($theme_path, 0, strlen($theme_path)) != $theme_path)
44 44
 						{
45 45
 							$template_path = sprintf('%s/modules/%s/', $theme_path, $theme_skin[1]);
46 46
 						}
@@ -61,16 +61,16 @@  discard block
 block discarded – undo
61 61
 		$output = $oTemplate->compile($template_path, $tpl_file);
62 62
 
63 63
 		// add .x div for adminitration pages
64
-		if(Context::getResponseMethod() == 'HTML')
64
+		if (Context::getResponseMethod() == 'HTML')
65 65
 		{
66
-			if(Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify')
66
+			if (Context::get('module') != 'admin' && strpos(Context::get('act'), 'Admin') > 0 && Context::get('act') != 'dispPageAdminContentModify' && Context::get('act') != 'dispPageAdminMobileContentModify')
67 67
 			{
68
-				$output = '<div class="x">' . $output . '</div>';
68
+				$output = '<div class="x">'.$output.'</div>';
69 69
 			}
70 70
 
71
-			if(Context::get('layout') != 'none')
71
+			if (Context::get('layout') != 'none')
72 72
 			{
73
-				if(__DEBUG__ == 3)
73
+				if (__DEBUG__ == 3)
74 74
 				{
75 75
 					$start = getMicroTime();
76 76
 				}
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
 				$layout_srl = $layout_info->layout_srl;
89 89
 
90 90
 				// compile if connected to the layout
91
-				if($layout_srl > 0)
91
+				if ($layout_srl > 0)
92 92
 				{
93 93
 
94 94
 					// handle separately if the layout is faceoff
95
-					if($layout_info && $layout_info->type == 'faceoff')
95
+					if ($layout_info && $layout_info->type == 'faceoff')
96 96
 					{
97 97
 						$oLayoutModel->doActivateFaceOff($layout_info);
98 98
 						Context::set('layout_info', $layout_info);
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 					// search if the changes CSS exists in the admin layout edit window
102 102
 					$edited_layout_css = $oLayoutModel->getUserLayoutCss($layout_srl);
103 103
 
104
-					if(FileHandler::exists($edited_layout_css))
104
+					if (FileHandler::exists($edited_layout_css))
105 105
 					{
106 106
 						Context::loadFile(array($edited_layout_css, 'all', '', 100));
107 107
 					}
108 108
 				}
109
-				if(!$layout_path)
109
+				if (!$layout_path)
110 110
 				{
111 111
 					$layout_path = './common/tpl';
112 112
 				}
113
-				if(!$layout_file)
113
+				if (!$layout_file)
114 114
 				{
115 115
 					$layout_file = 'default_layout';
116 116
 				}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
 				// if popup_layout, remove admin bar.
120 120
 				$realLayoutPath = FileHandler::getRealPath($layout_path);
121
-				if(substr_compare($realLayoutPath, '/', -1) !== 0)
121
+				if (substr_compare($realLayoutPath, '/', -1) !== 0)
122 122
 				{
123 123
 					$realLayoutPath .= '/';
124 124
 				}
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 				$pathInfo = pathinfo($layout_file);
127 127
 				$onlyLayoutFile = $pathInfo['filename'];
128 128
 
129
-				if(__DEBUG__ == 3)
129
+				if (__DEBUG__ == 3)
130 130
 				{
131 131
 					$GLOBALS['__layout_compile_elapsed__'] = getMicroTime() - $start;
132 132
 				}
133 133
 
134
-				if(stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always'))
134
+				if (stripos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE && (Context::get('_use_ssl') == 'optional' || Context::get('_use_ssl') == 'always'))
135 135
 				{
136 136
 					Context::addHtmlFooter('<iframe id="xeTmpIframe" name="xeTmpIframe" style="width:1px;height:1px;position:absolute;top:-2px;left:-2px;"></iframe>');
137 137
 				}
@@ -147,12 +147,12 @@  discard block
 block discarded – undo
147 147
 	 */
148 148
 	function prepareToPrint(&$output)
149 149
 	{
150
-		if(Context::getResponseMethod() != 'HTML')
150
+		if (Context::getResponseMethod() != 'HTML')
151 151
 		{
152 152
 			return;
153 153
 		}
154 154
 
155
-		if(__DEBUG__ == 3)
155
+		if (__DEBUG__ == 3)
156 156
 		{
157 157
 			$start = getMicroTime();
158 158
 		}
@@ -170,20 +170,20 @@  discard block
 block discarded – undo
170 170
 		$output = preg_replace_callback('/<!--(#)?Meta:([a-z0-9\_\-\/\.\@\:]+)-->/is', array($this, '_transMeta'), $output);
171 171
 
172 172
 		// handles a relative path generated by using the rewrite module
173
-		if(Context::isAllowRewrite())
173
+		if (Context::isAllowRewrite())
174 174
 		{
175 175
 			$url = parse_url(Context::getRequestUri());
176 176
 			$real_path = $url['path'];
177 177
 
178 178
 			$pattern = '/src=("|\'){1}(\.\/)?(files\/attach|files\/cache|files\/faceOff|files\/member_extra_info|modules|common|widgets|widgetstyle|layouts|addons)\/([^"\']+)\.(jpg|jpeg|png|gif)("|\'){1}/s';
179
-			$output = preg_replace($pattern, 'src=$1' . $real_path . '$3/$4.$5$6', $output);
179
+			$output = preg_replace($pattern, 'src=$1'.$real_path.'$3/$4.$5$6', $output);
180 180
 
181 181
 			$pattern = '/href=("|\'){1}(\?[^"\']+)/s';
182
-			$output = preg_replace($pattern, 'href=$1' . $real_path . '$2', $output);
182
+			$output = preg_replace($pattern, 'href=$1'.$real_path.'$2', $output);
183 183
 
184
-			if(Context::get('vid'))
184
+			if (Context::get('vid'))
185 185
 			{
186
-				$pattern = '/\/' . Context::get('vid') . '\?([^=]+)=/is';
186
+				$pattern = '/\/'.Context::get('vid').'\?([^=]+)=/is';
187 187
 				$output = preg_replace($pattern, '/?$1=', $output);
188 188
 			}
189 189
 		}
@@ -191,18 +191,18 @@  discard block
 block discarded – undo
191 191
 		// prevent the 2nd request due to url(none) of the background-image
192 192
 		$output = preg_replace('/url\((["\']?)none(["\']?)\)/is', 'none', $output);
193 193
 
194
-		if(is_array(Context::get('INPUT_ERROR')))
194
+		if (is_array(Context::get('INPUT_ERROR')))
195 195
 		{
196 196
 			$INPUT_ERROR = Context::get('INPUT_ERROR');
197 197
 			$keys = array_keys($INPUT_ERROR);
198
-			$keys = '(' . implode('|', $keys) . ')';
198
+			$keys = '('.implode('|', $keys).')';
199 199
 
200
-			$output = preg_replace_callback('@(<input)([^>]*?)\sname="' . $keys . '"([^>]*?)/?>@is', array(&$this, '_preserveValue'), $output);
201
-			$output = preg_replace_callback('@<select[^>]*\sname="' . $keys . '".+</select>@isU', array(&$this, '_preserveSelectValue'), $output);
202
-			$output = preg_replace_callback('@<textarea[^>]*\sname="' . $keys . '".+</textarea>@isU', array(&$this, '_preserveTextAreaValue'), $output);
200
+			$output = preg_replace_callback('@(<input)([^>]*?)\sname="'.$keys.'"([^>]*?)/?>@is', array(&$this, '_preserveValue'), $output);
201
+			$output = preg_replace_callback('@<select[^>]*\sname="'.$keys.'".+</select>@isU', array(&$this, '_preserveSelectValue'), $output);
202
+			$output = preg_replace_callback('@<textarea[^>]*\sname="'.$keys.'".+</textarea>@isU', array(&$this, '_preserveTextAreaValue'), $output);
203 203
 		}
204 204
 
205
-		if(__DEBUG__ == 3)
205
+		if (__DEBUG__ == 3)
206 206
 		{
207 207
 			$GLOBALS['__trans_content_elapsed__'] = getMicroTime() - $start;
208 208
 		}
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		// convert the final layout
221 221
 		Context::set('content', $output);
222 222
 		$oTemplate = TemplateHandler::getInstance();
223
-		if(Mobile::isFromMobilePhone())
223
+		if (Mobile::isFromMobilePhone())
224 224
 		{
225 225
 			$this->_loadMobileJSCSS();
226 226
 			$output = $oTemplate->compile('./common/tpl', 'mobile_layout');
@@ -245,16 +245,16 @@  discard block
 block discarded – undo
245 245
 	{
246 246
 		$INPUT_ERROR = Context::get('INPUT_ERROR');
247 247
 
248
-		$str = $match[1] . $match[2] . ' name="' . $match[3] . '"' . $match[4];
248
+		$str = $match[1].$match[2].' name="'.$match[3].'"'.$match[4];
249 249
 
250 250
 		// get type
251 251
 		$type = 'text';
252
-		if(preg_match('/\stype="([a-z]+)"/i', $str, $m))
252
+		if (preg_match('/\stype="([a-z]+)"/i', $str, $m))
253 253
 		{
254 254
 			$type = strtolower($m[1]);
255 255
 		}
256 256
 
257
-		switch($type)
257
+		switch ($type)
258 258
 		{
259 259
 			case 'text':
260 260
 			case 'hidden':
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 			case 'number':
273 273
 			case 'range':
274 274
 			case 'color':
275
-				$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str) . ' value="' . htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '"';
275
+				$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str).' value="'.htmlspecialchars($INPUT_ERROR[$match[3]], ENT_COMPAT | ENT_HTML401, 'UTF-8', false).'"';
276 276
 				break;
277 277
 			case 'password':
278 278
 				$str = preg_replace('@\svalue="[^"]*?"@', ' ', $str);
@@ -280,14 +280,14 @@  discard block
 block discarded – undo
280 280
 			case 'radio':
281 281
 			case 'checkbox':
282 282
 				$str = preg_replace('@\schecked(="[^"]*?")?@', ' ', $str);
283
-				if(@preg_match('@\s(?i:value)="' . $INPUT_ERROR[$match[3]] . '"@', $str))
283
+				if (@preg_match('@\s(?i:value)="'.$INPUT_ERROR[$match[3]].'"@', $str))
284 284
 				{
285 285
 					$str .= ' checked="checked"';
286 286
 				}
287 287
 				break;
288 288
 		}
289 289
 
290
-		return $str . ' />';
290
+		return $str.' />';
291 291
 	}
292 292
 
293 293
 	/**
@@ -304,14 +304,14 @@  discard block
 block discarded – undo
304 304
 		preg_match_all('@<option[^>]*\svalue="([^"]*)".+</option>@isU', $matches[0], $m);
305 305
 
306 306
 		$key = array_search($INPUT_ERROR[$matches[1]], $m[1]);
307
-		if($key === FALSE)
307
+		if ($key === FALSE)
308 308
 		{
309 309
 			return $matches[0];
310 310
 		}
311 311
 
312 312
 		$m[0][$key] = preg_replace('@(\svalue=".*?")@is', '$1 selected="selected"', $m[0][$key]);
313 313
 
314
-		return $mm[0] . implode('', $m[0]) . '</select>';
314
+		return $mm[0].implode('', $m[0]).'</select>';
315 315
 	}
316 316
 
317 317
 	/**
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 	{
324 324
 		$INPUT_ERROR = Context::get('INPUT_ERROR');
325 325
 		preg_match('@<textarea.*?>@is', $matches[0], $mm);
326
-		return $mm[0] . $INPUT_ERROR[$matches[1]] . '</textarea>';
326
+		return $mm[0].$INPUT_ERROR[$matches[1]].'</textarea>';
327 327
 	}
328 328
 
329 329
 	/**
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 	 */
335 335
 	function _moveStyleToHeader($matches)
336 336
 	{
337
-		if(isset($matches[1]) && stristr($matches[1], 'scoped'))
337
+		if (isset($matches[1]) && stristr($matches[1], 'scoped'))
338 338
 		{
339 339
 			return $matches[0];
340 340
 		}
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 	 */
371 371
 	function _transMeta($matches)
372 372
 	{
373
-		if($matches[1])
373
+		if ($matches[1])
374 374
 		{
375 375
 			return '';
376 376
 		}
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 		$lang_type = Context::getLangType();
388 388
 
389 389
 		// add common JS/CSS files
390
-		if(__DEBUG__ || !__XE_VERSION_STABLE__)
390
+		if (__DEBUG__ || !__XE_VERSION_STABLE__)
391 391
 		{
392 392
 			$oContext->loadFile(array('./common/js/jquery-1.x.js', 'head', 'lt IE 9', -111000), true);
393 393
 			$oContext->loadFile(array('./common/js/jquery.js', 'head', 'gte IE 9', -110000), true);
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 			$oContext->loadFile(array('./common/js/xml2json.js', 'head', '', -100000), true);
399 399
 			$oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true);
400 400
 			$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
401
-			if(!__DISABLE_DEFAULT_CSS__)
401
+			if (!__DISABLE_DEFAULT_CSS__)
402 402
 			{
403 403
 				$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
404 404
 			}
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 			$oContext->loadFile(array('./common/js/jquery.min.js', 'head', 'gte IE 9', -110000), true);
414 414
 			$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
415 415
 			$oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true);
416
-			if(!__DISABLE_DEFAULT_CSS__)
416
+			if (!__DISABLE_DEFAULT_CSS__)
417 417
 			{
418 418
 				$oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true);
419 419
 			}
@@ -424,9 +424,9 @@  discard block
 block discarded – undo
424 424
 		}
425 425
 
426 426
 		// for admin page, add admin css
427
-		if(Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
427
+		if (Context::get('module') == 'admin' || strpos(Context::get('act'), 'Admin') > 0)
428 428
 		{
429
-			if(__DEBUG__ || !__XE_VERSION_STABLE__)
429
+			if (__DEBUG__ || !__XE_VERSION_STABLE__)
430 430
 			{
431 431
 				$oContext->loadFile(array('./modules/admin/tpl/css/admin.css', '', '', 10), true);
432 432
 				$oContext->loadFile(array("./modules/admin/tpl/css/admin_{$lang_type}.css", '', '', 10), true);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 		$lang_type = Context::getLangType();
459 459
 
460 460
 		// add common JS/CSS files
461
-		if(__DEBUG__ || !__XE_VERSION_STABLE__)
461
+		if (__DEBUG__ || !__XE_VERSION_STABLE__)
462 462
 		{
463 463
 			$oContext->loadFile(array('./common/js/jquery.js', 'head', '', -110000), true);
464 464
 			$oContext->loadFile(array('./common/js/modernizr.js', 'head', '', -100000), true);
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
 			$oContext->loadFile(array('./common/js/xml2json.js', 'head', '', -100000), true);
469 469
 			$oContext->loadFile(array('./common/js/xml_handler.js', 'head', '', -100000), true);
470 470
 			$oContext->loadFile(array('./common/js/xml_js_filter.js', 'head', '', -100000), true);
471
-			if(!__DISABLE_DEFAULT_CSS__)
471
+			if (!__DISABLE_DEFAULT_CSS__)
472 472
 			{
473 473
 				$oContext->loadFile(array('./common/css/xe.css', '', '', -1000000), true);
474 474
 				$oContext->loadFile(array('./common/css/mobile.css', '', '', -1000000), true);
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 			$oContext->loadFile(array('./common/js/jquery.min.js', 'head', '', -110000), true);
485 485
 			$oContext->loadFile(array('./common/js/x.min.js', 'head', '', -100000), true);
486 486
 			$oContext->loadFile(array('./common/js/xe.min.js', 'head', '', -100000), true);
487
-			if(!__DISABLE_DEFAULT_CSS__)
487
+			if (!__DISABLE_DEFAULT_CSS__)
488 488
 			{
489 489
 				$oContext->loadFile(array('./common/css/xe.min.css', '', '', -1000000), true);
490 490
 				$oContext->loadFile(array('./common/css/mobile.min.css', '', '', -1000000), true);
Please login to merge, or discard this patch.
modules/widget/widget.class.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 		$oModuleModel = getModel('module');
31 31
 		$oModuleController = getController('module');
32 32
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
33
-		if($oModuleModel->needUpdate($version_update_id))
33
+		if ($oModuleModel->needUpdate($version_update_id))
34 34
 		{
35 35
 			// widget compile display.after trigger for further (04/14/2009)
36
-			if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) return true;
36
+			if (!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) return true;
37 37
 
38 38
 			$oModuleController->insertUpdatedLog($version_update_id);
39 39
 		}
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 		$oModuleModel = getModel('module');
50 50
 		$oModuleController = getController('module');
51 51
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
52
-		if($oModuleModel->needUpdate($version_update_id))
52
+		if ($oModuleModel->needUpdate($version_update_id))
53 53
 		{
54 54
 			// widget compile display.after trigger for further (04/14/2009)
55
-			if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before'))
55
+			if (!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before'))
56 56
 			{
57 57
 				$oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
58 58
 			}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@
 block discarded – undo
33 33
 		if($oModuleModel->needUpdate($version_update_id))
34 34
 		{
35 35
 			// widget compile display.after trigger for further (04/14/2009)
36
-			if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) return true;
36
+			if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) {
37
+				return true;
38
+			}
37 39
 
38 40
 			$oModuleController->insertUpdatedLog($version_update_id);
39 41
 		}
Please login to merge, or discard this patch.
modules/message/message.class.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
 		$oModuleModel = getModel('module');
24 24
 		$oModuleController = getController('module');
25 25
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
26
-		if($oModuleModel->needUpdate($version_update_id))
26
+		if ($oModuleModel->needUpdate($version_update_id))
27 27
 		{
28 28
 			$config = $oModuleModel->getModuleConfig('message');
29 29
 
30
-			if($config->skin)
30
+			if ($config->skin)
31 31
 			{
32 32
 				$config_parse = explode('.', $config->skin);
33 33
 				if (count($config_parse) > 1)
34 34
 				{
35 35
 					$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
36
-					if(is_dir($template_path)) return true;
36
+					if (is_dir($template_path)) return true;
37 37
 				}
38 38
 			}
39 39
 
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
 		$oModuleModel = getModel('module');
52 52
 		$oModuleController = getController('module');
53 53
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
54
-		if($oModuleModel->needUpdate($version_update_id))
54
+		if ($oModuleModel->needUpdate($version_update_id))
55 55
 		{
56 56
 			$config = $oModuleModel->getModuleConfig('message');
57 57
 
58
-			if($config->skin)
58
+			if ($config->skin)
59 59
 			{
60 60
 				$config_parse = explode('.', $config->skin);
61 61
 				if (count($config_parse) > 1)
62 62
 				{
63 63
 					$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
64
-					if(is_dir($template_path))
64
+					if (is_dir($template_path))
65 65
 					{
66 66
 						$config->skin = implode('|@|', $config_parse);
67 67
 						$oModuleController = getController('module');
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@
 block discarded – undo
33 33
 				if (count($config_parse) > 1)
34 34
 				{
35 35
 					$template_path = sprintf('./themes/%s/modules/message/', $config_parse[0]);
36
-					if(is_dir($template_path)) return true;
36
+					if(is_dir($template_path)) {
37
+						return true;
38
+					}
37 39
 				}
38 40
 			}
39 41
 
Please login to merge, or discard this patch.
modules/comment/comment.class.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-require_once(_XE_PATH_ . 'modules/comment/comment.item.php');
4
+require_once(_XE_PATH_.'modules/comment/comment.item.php');
5 5
 
6 6
 /**
7 7
  * comment
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		// 2008. 02. 22 add comment setting when a new module added
37 37
 		$oModuleController->insertTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before');
38 38
 
39
-		if(!is_dir('./files/cache/tmp'))
39
+		if (!is_dir('./files/cache/tmp'))
40 40
 		{
41 41
 			FileHandler::makeDir('./files/cache/tmp');
42 42
 		}
@@ -54,63 +54,63 @@  discard block
 block discarded – undo
54 54
 		$oModuleModel = getModel('module');
55 55
 		$oModuleController = getController('module');
56 56
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
57
-		if($oModuleModel->needUpdate($version_update_id))
57
+		if ($oModuleModel->needUpdate($version_update_id))
58 58
 		{
59 59
 			// 2007. 10. 17 add a trigger to delete comments together with posting deleted
60
-			if(!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
60
+			if (!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
61 61
 			{
62 62
 				return TRUE;
63 63
 			}
64 64
 			// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
65
-			if(!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
65
+			if (!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
66 66
 			{
67 67
 				return TRUE;
68 68
 			}
69 69
 			// 2007. 10. 23 add a column for recommendation votes or notification of the comments
70
-			if(!$oDB->isColumnExists("comments", "voted_count"))
70
+			if (!$oDB->isColumnExists("comments", "voted_count"))
71 71
 			{
72 72
 				return TRUE;
73 73
 			}
74
-			if(!$oDB->isColumnExists("comments", "notify_message"))
74
+			if (!$oDB->isColumnExists("comments", "notify_message"))
75 75
 			{
76 76
 				return TRUE;
77 77
 			}
78 78
 			// 2008. 02. 22 add comment setting when a new module added
79
-			if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
79
+			if (!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
80 80
 			{
81 81
 				return TRUE;
82 82
 			}
83 83
 			// 2008. 05. 14 add a column for blamed count
84
-			if(!$oDB->isColumnExists("comments", "blamed_count"))
84
+			if (!$oDB->isColumnExists("comments", "blamed_count"))
85 85
 			{
86 86
 				return TRUE;
87 87
 			}
88
-			if(!$oDB->isColumnExists("comment_voted_log", "point"))
88
+			if (!$oDB->isColumnExists("comment_voted_log", "point"))
89 89
 			{
90 90
 				return TRUE;
91 91
 			}
92 92
 
93
-			if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
93
+			if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
94 94
 			{
95 95
 				return TRUE;
96 96
 			}
97 97
 			//2012. 02. 24 add comment published status column and index
98
-			if(!$oDB->isColumnExists("comments", "status"))
98
+			if (!$oDB->isColumnExists("comments", "status"))
99 99
 			{
100 100
 				return TRUE;
101 101
 			}
102
-			if(!$oDB->isIndexExists("comments", "idx_status"))
102
+			if (!$oDB->isIndexExists("comments", "idx_status"))
103 103
 			{
104 104
 				return TRUE;
105 105
 			}
106 106
 
107 107
 			// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied 
108
-			if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
108
+			if (!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
109 109
 			{
110 110
 				return TRUE;
111 111
 			}
112 112
 
113
-			if(!$oDB->isIndexExists("comments", "idx_parent_srl"))
113
+			if (!$oDB->isIndexExists("comments", "idx_parent_srl"))
114 114
 			{
115 115
 				return TRUE;
116 116
 			}
@@ -131,46 +131,46 @@  discard block
 block discarded – undo
131 131
 		$oModuleModel = getModel('module');
132 132
 		$oModuleController = getController('module');
133 133
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
134
-		if($oModuleModel->needUpdate($version_update_id))
134
+		if ($oModuleModel->needUpdate($version_update_id))
135 135
 		{
136 136
 			// 2007. 10. 17 add a trigger to delete comments together with posting deleted
137
-			if(!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
137
+			if (!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
138 138
 			{
139 139
 				$oModuleController->insertTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after');
140 140
 			}
141 141
 			// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
142
-			if(!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
142
+			if (!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
143 143
 			{
144 144
 				$oModuleController->insertTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after');
145 145
 			}
146 146
 			// 2007. 10. 23 add a column for recommendation votes or notification of the comments
147
-			if(!$oDB->isColumnExists("comments", "voted_count"))
147
+			if (!$oDB->isColumnExists("comments", "voted_count"))
148 148
 			{
149 149
 				$oDB->addColumn("comments", "voted_count", "number", "11");
150 150
 				$oDB->addIndex("comments", "idx_voted_count", array("voted_count"));
151 151
 			}
152 152
 
153
-			if(!$oDB->isColumnExists("comments", "notify_message"))
153
+			if (!$oDB->isColumnExists("comments", "notify_message"))
154 154
 			{
155 155
 				$oDB->addColumn("comments", "notify_message", "char", "1");
156 156
 			}
157 157
 			// 2008. 02. 22 add comment setting when a new module added
158
-			if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
158
+			if (!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
159 159
 			{
160 160
 				$oModuleController->insertTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before');
161 161
 			}
162 162
 			// 2008. 05. 14 add a column for blamed count
163
-			if(!$oDB->isColumnExists("comments", "blamed_count"))
163
+			if (!$oDB->isColumnExists("comments", "blamed_count"))
164 164
 			{
165 165
 				$oDB->addColumn('comments', 'blamed_count', 'number', 11, 0, TRUE);
166 166
 				$oDB->addIndex('comments', 'idx_blamed_count', array('blamed_count'));
167 167
 			}
168
-			if(!$oDB->isColumnExists("comment_voted_log", "point"))
168
+			if (!$oDB->isColumnExists("comment_voted_log", "point"))
169 169
 			{
170 170
 				$oDB->addColumn('comment_voted_log', 'point', 'number', 11, 0, TRUE);
171 171
 			}
172 172
 
173
-			if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
173
+			if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
174 174
 			{
175 175
 				$oDB->addIndex(
176 176
 						"comments", "idx_module_list_order", array("module_srl", "list_order"), TRUE
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 			}
179 179
 
180 180
 			//2012. 02. 24 add comment published status column and index
181
-			if(!$oDB->isColumnExists("comments", "status"))
181
+			if (!$oDB->isColumnExists("comments", "status"))
182 182
 			{
183 183
 				$oDB->addColumn("comments", "status", "number", 1, 1, TRUE);
184 184
 			}
185
-			if(!$oDB->isIndexExists("comments", "idx_status"))
185
+			if (!$oDB->isIndexExists("comments", "idx_status"))
186 186
 			{
187 187
 				$oDB->addIndex(
188 188
 						"comments", "idx_status", array("status", "comment_srl", "module_srl", "document_srl"), TRUE
@@ -190,12 +190,12 @@  discard block
 block discarded – undo
190 190
 			}
191 191
 
192 192
 			// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied 
193
-			if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
193
+			if (!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
194 194
 			{
195 195
 				$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after');
196 196
 			}
197 197
 
198
-			if(!$oDB->isIndexExists("comments", "idx_parent_srl"))
198
+			if (!$oDB->isIndexExists("comments", "idx_parent_srl"))
199 199
 			{
200 200
 				$oDB->addIndex('comments', 'idx_parent_srl', array('parent_srl'));
201 201
 			}
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	function recompileCache()
214 214
 	{
215
-		if(!is_dir('./files/cache/tmp'))
215
+		if (!is_dir('./files/cache/tmp'))
216 216
 		{
217 217
 			FileHandler::makeDir('./files/cache/tmp');
218 218
 		}
Please login to merge, or discard this patch.
modules/member/member.class.php 2 patches
Spacing   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	function member()
22 22
 	{
23
-		if(!Context::isInstalled()) return;
23
+		if (!Context::isInstalled()) return;
24 24
 
25 25
 		$oModuleModel = getModel('module');
26 26
 		$member_config = $oModuleModel->getModuleConfig('member');
27 27
 
28 28
 		// Set to use SSL upon actions related member join/information/password and so on. 2013.02.15
29
-		if(!Context::isExistsSSLAction('dispMemberModifyPassword') && Context::getSslStatus() == 'optional')
29
+		if (!Context::isExistsSSLAction('dispMemberModifyPassword') && Context::getSslStatus() == 'optional')
30 30
 		{
31 31
 			$ssl_actions = array('dispMemberModifyPassword', 'dispMemberSignUpForm', 'dispMemberModifyInfo', 'dispMemberModifyEmailAddress', 'dispMemberGetTempPassword', 'dispMemberResendAuthMail', 'dispMemberLoginForm', 'dispMemberFindAccount', 'dispMemberLeave', 'procMemberLogin', 'procMemberModifyPassword', 'procMemberInsert', 'procMemberModifyInfo', 'procMemberFindAccount', 'procMemberModifyEmailAddress', 'procMemberResendAuthMail', 'procMemberLeave'/*, 'getMemberMenu'*/, 'procMemberFindAccountByQuestion');
32 32
 			Context::addSSLActions($ssl_actions);
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 		$oModuleController = getController('module');
45 45
 
46 46
 		$oDB = &DB::getInstance();
47
-		$oDB->addIndex("member_group","idx_site_title", array("site_srl","title"),true);
47
+		$oDB->addIndex("member_group", "idx_site_title", array("site_srl", "title"), true);
48 48
 
49 49
 		$oModuleModel = getModel('module');
50 50
 		$config = $oModuleModel->getModuleConfig('member');
51 51
 
52
-		if(empty($config))
52
+		if (empty($config))
53 53
 		{
54 54
 			$isNotInstall = true;
55 55
 			$config = new stdClass;
@@ -58,29 +58,29 @@  discard block
 block discarded – undo
58 58
 		// Set the basic information
59 59
 		$config->enable_join = 'Y';
60 60
 		$config->enable_openid = 'N';
61
-		if(!$config->enable_auth_mail) $config->enable_auth_mail = 'N';
62
-		if(!$config->image_name) $config->image_name = 'Y';
63
-		if(!$config->image_mark) $config->image_mark = 'Y';
64
-		if(!$config->profile_image) $config->profile_image = 'Y';
65
-		if(!$config->image_name_max_width) $config->image_name_max_width = '90';
66
-		if(!$config->image_name_max_height) $config->image_name_max_height = '20';
67
-		if(!$config->image_mark_max_width) $config->image_mark_max_width = '20';
68
-		if(!$config->image_mark_max_height) $config->image_mark_max_height = '20';
69
-		if(!$config->profile_image_max_width) $config->profile_image_max_width = '90';
70
-		if(!$config->profile_image_max_height) $config->profile_image_max_height = '90';
71
-		if($config->group_image_mark!='Y') $config->group_image_mark = 'N';
72
-		if(!$config->password_strength) $config->password_strength = 'normal';
61
+		if (!$config->enable_auth_mail) $config->enable_auth_mail = 'N';
62
+		if (!$config->image_name) $config->image_name = 'Y';
63
+		if (!$config->image_mark) $config->image_mark = 'Y';
64
+		if (!$config->profile_image) $config->profile_image = 'Y';
65
+		if (!$config->image_name_max_width) $config->image_name_max_width = '90';
66
+		if (!$config->image_name_max_height) $config->image_name_max_height = '20';
67
+		if (!$config->image_mark_max_width) $config->image_mark_max_width = '20';
68
+		if (!$config->image_mark_max_height) $config->image_mark_max_height = '20';
69
+		if (!$config->profile_image_max_width) $config->profile_image_max_width = '90';
70
+		if (!$config->profile_image_max_height) $config->profile_image_max_height = '90';
71
+		if ($config->group_image_mark != 'Y') $config->group_image_mark = 'N';
72
+		if (!$config->password_strength) $config->password_strength = 'normal';
73 73
 		
74
-		if(!$config->password_hashing_algorithm)
74
+		if (!$config->password_hashing_algorithm)
75 75
 		{
76 76
 			$oPassword = new Password();
77 77
 			$config->password_hashing_algorithm = $oPassword->getBestAlgorithm();
78 78
 		}
79
-		if(!$config->password_hashing_work_factor)
79
+		if (!$config->password_hashing_work_factor)
80 80
 		{
81 81
 			$config->password_hashing_work_factor = 8;
82 82
 		}
83
-		if(!$config->password_hashing_auto_upgrade)
83
+		if (!$config->password_hashing_auto_upgrade)
84 84
 		{
85 85
 			$config->password_hashing_auto_upgrade = 'Y';
86 86
 		}
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		$oMemberController = getController('member');
92 92
 		$oMemberAdminController = getAdminController('member');
93 93
 
94
-		if(!$config->signupForm || !is_array($config->signupForm))
94
+		if (!$config->signupForm || !is_array($config->signupForm))
95 95
 		{
96 96
 			$identifier = $isNotInstall ? 'email_address' : 'user_id';
97 97
 
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
 			$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
107 107
 		}
108 108
 		
109
-		$oModuleController->insertModuleConfig('member',$config);
109
+		$oModuleController->insertModuleConfig('member', $config);
110 110
 
111 111
 		$groups = $oMemberModel->getGroups();
112
-		if(!count($groups))
112
+		if (!count($groups))
113 113
 		{
114 114
 			// Set an administrator, regular member(group1), and associate member(group2)
115 115
 			$group_args = new stdClass;
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 		$admin_args = new stdClass;
136 136
 		$admin_args->is_admin = 'Y';
137 137
 		$output = executeQuery('member.getMemberList', $admin_args);
138
-		if(!$output->data)
138
+		if (!$output->data)
139 139
 		{
140
-			$admin_info = Context::gets('password','nick_name','email_address', 'user_id');
141
-			if($admin_info->email_address)
140
+			$admin_info = Context::gets('password', 'nick_name', 'email_address', 'user_id');
141
+			if ($admin_info->email_address)
142 142
 			{
143 143
 				$admin_info->user_name = 'admin';
144 144
 				// Insert admin information
@@ -150,16 +150,16 @@  discard block
 block discarded – undo
150 150
 		// Register denied ID(default + module name)
151 151
 		$oModuleModel = getModel('module');
152 152
 		$module_list = $oModuleModel->getModuleList();
153
-		foreach($module_list as $key => $val)
153
+		foreach ($module_list as $key => $val)
154 154
 		{
155
-			$oMemberAdminController->insertDeniedID($val->module,'');
155
+			$oMemberAdminController->insertDeniedID($val->module, '');
156 156
 		}
157
-		$oMemberAdminController->insertDeniedID('www','');
158
-		$oMemberAdminController->insertDeniedID('root','');
159
-		$oMemberAdminController->insertDeniedID('administrator','');
160
-		$oMemberAdminController->insertDeniedID('telnet','');
161
-		$oMemberAdminController->insertDeniedID('ftp','');
162
-		$oMemberAdminController->insertDeniedID('http','');
157
+		$oMemberAdminController->insertDeniedID('www', '');
158
+		$oMemberAdminController->insertDeniedID('root', '');
159
+		$oMemberAdminController->insertDeniedID('administrator', '');
160
+		$oMemberAdminController->insertDeniedID('telnet', '');
161
+		$oMemberAdminController->insertDeniedID('ftp', '');
162
+		$oMemberAdminController->insertDeniedID('http', '');
163 163
 		// Create cache directory to use in the member module
164 164
 		FileHandler::makeDir('./files/member_extra_info/image_name');
165 165
 		FileHandler::makeDir('./files/member_extra_info/image_mark');
@@ -184,68 +184,68 @@  discard block
 block discarded – undo
184 184
 		$oModuleModel = getModel('module');
185 185
 		$oModuleController = getController('module');
186 186
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
187
-		if($oModuleModel->needUpdate($version_update_id))
187
+		if ($oModuleModel->needUpdate($version_update_id))
188 188
 		{
189 189
 			// check member directory (11/08/2007 added)
190
-			if(!is_dir("./files/member_extra_info")) return true;
190
+			if (!is_dir("./files/member_extra_info")) return true;
191 191
 			// check member directory (22/10/2007 added)
192
-			if(!is_dir("./files/member_extra_info/profile_image")) return true;
192
+			if (!is_dir("./files/member_extra_info/profile_image")) return true;
193 193
 			// Add a column(is_register) to "member_auth_mail" table (22/04/2008)
194 194
 			$act = $oDB->isColumnExists("member_auth_mail", "is_register");
195
-			if(!$act) return true;
195
+			if (!$act) return true;
196 196
 			// Add a column(site_srl) to "member_group_member" table (11/15/2008)
197
-			if(!$oDB->isColumnExists("member_group_member", "site_srl")) return true;
198
-			if(!$oDB->isColumnExists("member_group", "site_srl")) return true;
199
-			if($oDB->isIndexExists("member_group","uni_member_group_title")) return true;
197
+			if (!$oDB->isColumnExists("member_group_member", "site_srl")) return true;
198
+			if (!$oDB->isColumnExists("member_group", "site_srl")) return true;
199
+			if ($oDB->isIndexExists("member_group", "uni_member_group_title")) return true;
200 200
 
201 201
 			// Add a column for list_order (05/18/2011)
202
-			if(!$oDB->isColumnExists("member_group", "list_order")) return true;
202
+			if (!$oDB->isColumnExists("member_group", "list_order")) return true;
203 203
 
204 204
 			// image_mark 추가 (2009. 02. 14)
205
-			if(!$oDB->isColumnExists("member_group", "image_mark")) return true;
205
+			if (!$oDB->isColumnExists("member_group", "image_mark")) return true;
206 206
 			// Add c column for password expiration date
207
-			if(!$oDB->isColumnExists("member", "change_password_date")) return true;
207
+			if (!$oDB->isColumnExists("member", "change_password_date")) return true;
208 208
 
209 209
 			// Add columns of question and answer to verify a password
210
-			if(!$oDB->isColumnExists("member", "find_account_question")) return true;
211
-			if(!$oDB->isColumnExists("member", "find_account_answer")) return true;
210
+			if (!$oDB->isColumnExists("member", "find_account_question")) return true;
211
+			if (!$oDB->isColumnExists("member", "find_account_answer")) return true;
212 212
 
213
-			if(!$oDB->isColumnExists("member", "list_order")) return true;
214
-			if(!$oDB->isIndexExists("member","idx_list_order")) return true;
213
+			if (!$oDB->isColumnExists("member", "list_order")) return true;
214
+			if (!$oDB->isIndexExists("member", "idx_list_order")) return true;
215 215
 
216 216
 			$oModuleModel = getModel('module');
217 217
 			$config = $oModuleModel->getModuleConfig('member');
218 218
 			// check signup form ordering info
219
-			if(!$config->signupForm) return true;
219
+			if (!$config->signupForm) return true;
220 220
 
221 221
 			// check agreement field exist
222
-			if($config->agreement) return true;
222
+			if ($config->agreement) return true;
223 223
 
224
-			if($config->skin)
224
+			if ($config->skin)
225 225
 			{
226 226
 				$config_parse = explode('.', $config->skin);
227
-				if(count($config_parse) > 1)
227
+				if (count($config_parse) > 1)
228 228
 				{
229 229
 					$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
230
-					if(is_dir($template_path)) return true;
230
+					if (is_dir($template_path)) return true;
231 231
 				}
232 232
 			}
233 233
 
234 234
 			// supprot multilanguage agreement.
235
-			if(is_readable('./files/member_extra_info/agreement.txt')) return true;
235
+			if (is_readable('./files/member_extra_info/agreement.txt')) return true;
236 236
 
237 237
 			// 2013. 11. 22 add menu when popup document menu called
238
-			if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) return true;
239
-			if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) return true;
238
+			if (!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) return true;
239
+			if (!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) return true;
240 240
 
241 241
 			$oModuleController->insertUpdatedLog($version_update_id);
242 242
 		}
243 243
 
244
-		if(!is_readable('./files/ruleset/insertMember.xml')) return true;
245
-		if(!is_readable('./files/ruleset/login.xml')) return true;
246
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
244
+		if (!is_readable('./files/ruleset/insertMember.xml')) return true;
245
+		if (!is_readable('./files/ruleset/login.xml')) return true;
246
+		if (!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
247 247
 
248
-		if($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset')) return true;
248
+		if ($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset')) return true;
249 249
 
250 250
 		return false;
251 251
 	}
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 		$oMemberAdminController = getAdminController('member');
264 264
 		$config = $oModuleModel->getModuleConfig('member');
265 265
 		$version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
266
-		if($oModuleModel->needUpdate($version_update_id))
266
+		if ($oModuleModel->needUpdate($version_update_id))
267 267
 		{
268 268
 			// Check member directory
269 269
 			FileHandler::makeDir('./files/member_extra_info/image_name');
@@ -271,74 +271,74 @@  discard block
 block discarded – undo
271 271
 			FileHandler::makeDir('./files/member_extra_info/signature');
272 272
 			FileHandler::makeDir('./files/member_extra_info/profile_image');
273 273
 			// Add a column
274
-			if(!$oDB->isColumnExists("member_auth_mail", "is_register"))
274
+			if (!$oDB->isColumnExists("member_auth_mail", "is_register"))
275 275
 			{
276 276
 				$oDB->addColumn("member_auth_mail", "is_register", "char", 1, "N", true);
277 277
 			}
278 278
 			// Add a column(site_srl) to "member_group_member" table (11/15/2008)
279
-			if(!$oDB->isColumnExists("member_group_member", "site_srl"))
279
+			if (!$oDB->isColumnExists("member_group_member", "site_srl"))
280 280
 			{
281 281
 				$oDB->addColumn("member_group_member", "site_srl", "number", 11, 0, true);
282 282
 				$oDB->addIndex("member_group_member", "idx_site_srl", "site_srl", false);
283 283
 			}
284
-			if(!$oDB->isColumnExists("member_group", "site_srl"))
284
+			if (!$oDB->isColumnExists("member_group", "site_srl"))
285 285
 			{
286 286
 				$oDB->addColumn("member_group", "site_srl", "number", 11, 0, true);
287
-				$oDB->addIndex("member_group","idx_site_title", array("site_srl","title"),true);
287
+				$oDB->addIndex("member_group", "idx_site_title", array("site_srl", "title"), true);
288 288
 			}
289
-			if($oDB->isIndexExists("member_group","uni_member_group_title"))
289
+			if ($oDB->isIndexExists("member_group", "uni_member_group_title"))
290 290
 			{
291
-				$oDB->dropIndex("member_group","uni_member_group_title",true);
291
+				$oDB->dropIndex("member_group", "uni_member_group_title", true);
292 292
 			}
293 293
 
294 294
 			// Add a column(list_order) to "member_group" table (05/18/2011)
295
-			if(!$oDB->isColumnExists("member_group", "list_order"))
295
+			if (!$oDB->isColumnExists("member_group", "list_order"))
296 296
 			{
297 297
 				$oDB->addColumn("member_group", "list_order", "number", 11, '', true);
298
-				$oDB->addIndex("member_group","idx_list_order", "list_order",false);
298
+				$oDB->addIndex("member_group", "idx_list_order", "list_order", false);
299 299
 				$output = executeQuery('member.updateAllMemberGroupListOrder');
300 300
 			}
301 301
 			// Add a column for image_mark (02/14/2009)
302
-			if(!$oDB->isColumnExists("member_group", "image_mark"))
302
+			if (!$oDB->isColumnExists("member_group", "image_mark"))
303 303
 			{
304 304
 				$oDB->addColumn("member_group", "image_mark", "text");
305 305
 			}
306 306
 			// Add a column for password expiration date
307
-			if(!$oDB->isColumnExists("member", "change_password_date"))
307
+			if (!$oDB->isColumnExists("member", "change_password_date"))
308 308
 			{
309 309
 				$oDB->addColumn("member", "change_password_date", "date");
310 310
 				executeQuery('member.updateAllChangePasswordDate');
311 311
 			}
312 312
 
313 313
 			// Add columns of question and answer to verify a password
314
-			if(!$oDB->isColumnExists("member", "find_account_question"))
314
+			if (!$oDB->isColumnExists("member", "find_account_question"))
315 315
 			{
316 316
 				$oDB->addColumn("member", "find_account_question", "number", 11);
317 317
 			}
318
-			if(!$oDB->isColumnExists("member", "find_account_answer"))
318
+			if (!$oDB->isColumnExists("member", "find_account_answer"))
319 319
 			{
320 320
 				$oDB->addColumn("member", "find_account_answer", "varchar", 250);
321 321
 			}
322 322
 
323
-			if(!$oDB->isColumnExists("member", "list_order"))
323
+			if (!$oDB->isColumnExists("member", "list_order"))
324 324
 			{
325 325
 				$oDB->addColumn("member", "list_order", "number", 11);
326 326
 				@set_time_limit(0);
327 327
 				$args->list_order = 'member_srl';
328
-				executeQuery('member.updateMemberListOrderAll',$args);
328
+				executeQuery('member.updateMemberListOrderAll', $args);
329 329
 				executeQuery('member.updateMemberListOrderAll');
330 330
 			}
331
-			if(!$oDB->isIndexExists("member","idx_list_order"))
331
+			if (!$oDB->isIndexExists("member", "idx_list_order"))
332 332
 			{
333
-				$oDB->addIndex("member","idx_list_order", array("list_order"));
333
+				$oDB->addIndex("member", "idx_list_order", array("list_order"));
334 334
 			}
335 335
 
336 336
 			$config = $oModuleModel->getModuleConfig('member');
337 337
 
338 338
 			// check agreement value exist
339
-			if($config->agreement)
339
+			if ($config->agreement)
340 340
 			{
341
-				$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
341
+				$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt';
342 342
 				$output = FileHandler::writeFile($agreement_file, $config->agreement);
343 343
 
344 344
 				$config->agreement = NULL;
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 			}
347 347
 
348 348
 			// check signup form ordering info
349
-			if(!$config->signupForm || !is_array($config->signupForm))
349
+			if (!$config->signupForm || !is_array($config->signupForm))
350 350
 			{
351 351
 				$identifier = 'user_id';
352 352
 
@@ -356,13 +356,13 @@  discard block
 block discarded – undo
356 356
 				$output = $oModuleController->updateModuleConfig('member', $config);
357 357
 			}
358 358
 
359
-			if($config->skin)
359
+			if ($config->skin)
360 360
 			{
361 361
 				$config_parse = explode('.', $config->skin);
362 362
 				if (count($config_parse) > 1)
363 363
 				{
364 364
 					$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
365
-					if(is_dir($template_path))
365
+					if (is_dir($template_path))
366 366
 					{
367 367
 						$config->skin = implode('|@|', $config_parse);
368 368
 						$oModuleController = getController('module');
@@ -372,15 +372,15 @@  discard block
 block discarded – undo
372 372
 			}
373 373
 			
374 374
 			// 2013. 11. 22 add menu when popup document menu called
375
-			if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
375
+			if (!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
376 376
 				$oModuleController->insertTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after');
377
-			if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after'))
377
+			if (!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after'))
378 378
 				$oModuleController->insertTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after');
379 379
 
380
-			if(is_readable('./files/member_extra_info/agreement.txt'))
380
+			if (is_readable('./files/member_extra_info/agreement.txt'))
381 381
 			{
382 382
 				$source_file = _XE_PATH_.'files/member_extra_info/agreement.txt';
383
-				$target_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
383
+				$target_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt';
384 384
 
385 385
 				FileHandler::rename($source_file, $target_file);
386 386
 			}
@@ -389,14 +389,14 @@  discard block
 block discarded – undo
389 389
 		}
390 390
 
391 391
 		FileHandler::makeDir('./files/ruleset');
392
-		if(!is_readable('./files/ruleset/insertMember.xml'))
392
+		if (!is_readable('./files/ruleset/insertMember.xml'))
393 393
 			$oMemberAdminController->_createSignupRuleset($config->signupForm);
394
-		if(!is_readable('./files/ruleset/login.xml'))
394
+		if (!is_readable('./files/ruleset/login.xml'))
395 395
 			$oMemberAdminController->_createLoginRuleset($config->identifier);
396
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml'))
396
+		if (!is_readable('./files/ruleset/find_member_account_by_question.xml'))
397 397
 			$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
398 398
 
399
-		if($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset'))
399
+		if ($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset'))
400 400
 		{
401 401
 			$oMemberAdminController->_createSignupRuleset($config->signupForm);
402 402
 			$oModuleController->insertUpdatedLog('member.1.8.43.recreate_signup_ruleset');
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 	 */
420 420
 	function recordLoginError($error = 0, $message = 'success')
421 421
 	{
422
-		if($error == 0) return new Object($error, $message);
422
+		if ($error == 0) return new Object($error, $message);
423 423
 
424 424
 		// Create a member model object
425 425
 		$oMemberModel = getModel('member');
@@ -427,18 +427,18 @@  discard block
 block discarded – undo
427 427
 
428 428
 		// Check if there is recoding table.
429 429
 		$oDB = &DB::getInstance();
430
-		if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
430
+		if (!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
431 431
 
432 432
 		$args = new stdClass();
433 433
 		$args->ipaddress = $_SERVER['REMOTE_ADDR'];
434 434
 
435 435
 		$output = executeQuery('member.getLoginCountByIp', $args);
436
-		if($output->data && $output->data->count)
436
+		if ($output->data && $output->data->count)
437 437
 		{
438 438
 			$last_update = strtotime($output->data->last_update);
439
-			$term = intval($_SERVER['REQUEST_TIME']-$last_update);
439
+			$term = intval($_SERVER['REQUEST_TIME'] - $last_update);
440 440
 			//update, if IP address access in a short time, update count. If not, make count 1.
441
-			if($term < $config->max_error_count_time)
441
+			if ($term < $config->max_error_count_time)
442 442
 			{
443 443
 				$args->count = $output->data->count + 1;
444 444
 			}
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 	 */
465 465
 	function recordMemberLoginError($error = 0, $message = 'success', $args = NULL)
466 466
 	{
467
-		if($error == 0 || !$args->member_srl) return new Object($error, $message);
467
+		if ($error == 0 || !$args->member_srl) return new Object($error, $message);
468 468
 
469 469
 		// Create a member model object
470 470
 		$oMemberModel = getModel('member');
@@ -472,21 +472,21 @@  discard block
 block discarded – undo
472 472
 
473 473
 		// Check if there is recoding table.
474 474
 		$oDB = &DB::getInstance();
475
-		if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
475
+		if (!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
476 476
 
477 477
 		$output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args);
478
-		if($output->data && $output->data->content)
478
+		if ($output->data && $output->data->content)
479 479
 		{
480 480
 			//update
481 481
 			$content = unserialize($output->data->content);
482
-			$content[] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
482
+			$content[] = array($_SERVER['REMOTE_ADDR'], Context::getLang($message), $_SERVER['REQUEST_TIME']);
483 483
 			$args->content = serialize($content);
484 484
 			$output = executeQuery('member.updateLoginCountHistoryByMemberSrl', $args);
485 485
 		}
486 486
 		else
487 487
 		{
488 488
 			//insert
489
-			$content[0] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
489
+			$content[0] = array($_SERVER['REMOTE_ADDR'], Context::getLang($message), $_SERVER['REQUEST_TIME']);
490 490
 			$args->content = serialize($content);
491 491
 			$output = executeQuery('member.insertLoginCountHistoryByMemberSrl', $args);
492 492
 		}
Please login to merge, or discard this patch.
Braces   +138 added lines, -56 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	function member()
22 22
 	{
23
-		if(!Context::isInstalled()) return;
23
+		if(!Context::isInstalled()) {
24
+			return;
25
+		}
24 26
 
25 27
 		$oModuleModel = getModel('module');
26 28
 		$member_config = $oModuleModel->getModuleConfig('member');
@@ -58,18 +60,42 @@  discard block
 block discarded – undo
58 60
 		// Set the basic information
59 61
 		$config->enable_join = 'Y';
60 62
 		$config->enable_openid = 'N';
61
-		if(!$config->enable_auth_mail) $config->enable_auth_mail = 'N';
62
-		if(!$config->image_name) $config->image_name = 'Y';
63
-		if(!$config->image_mark) $config->image_mark = 'Y';
64
-		if(!$config->profile_image) $config->profile_image = 'Y';
65
-		if(!$config->image_name_max_width) $config->image_name_max_width = '90';
66
-		if(!$config->image_name_max_height) $config->image_name_max_height = '20';
67
-		if(!$config->image_mark_max_width) $config->image_mark_max_width = '20';
68
-		if(!$config->image_mark_max_height) $config->image_mark_max_height = '20';
69
-		if(!$config->profile_image_max_width) $config->profile_image_max_width = '90';
70
-		if(!$config->profile_image_max_height) $config->profile_image_max_height = '90';
71
-		if($config->group_image_mark!='Y') $config->group_image_mark = 'N';
72
-		if(!$config->password_strength) $config->password_strength = 'normal';
63
+		if(!$config->enable_auth_mail) {
64
+			$config->enable_auth_mail = 'N';
65
+		}
66
+		if(!$config->image_name) {
67
+			$config->image_name = 'Y';
68
+		}
69
+		if(!$config->image_mark) {
70
+			$config->image_mark = 'Y';
71
+		}
72
+		if(!$config->profile_image) {
73
+			$config->profile_image = 'Y';
74
+		}
75
+		if(!$config->image_name_max_width) {
76
+			$config->image_name_max_width = '90';
77
+		}
78
+		if(!$config->image_name_max_height) {
79
+			$config->image_name_max_height = '20';
80
+		}
81
+		if(!$config->image_mark_max_width) {
82
+			$config->image_mark_max_width = '20';
83
+		}
84
+		if(!$config->image_mark_max_height) {
85
+			$config->image_mark_max_height = '20';
86
+		}
87
+		if(!$config->profile_image_max_width) {
88
+			$config->profile_image_max_width = '90';
89
+		}
90
+		if(!$config->profile_image_max_height) {
91
+			$config->profile_image_max_height = '90';
92
+		}
93
+		if($config->group_image_mark!='Y') {
94
+			$config->group_image_mark = 'N';
95
+		}
96
+		if(!$config->password_strength) {
97
+			$config->password_strength = 'normal';
98
+		}
73 99
 		
74 100
 		if(!$config->password_hashing_algorithm)
75 101
 		{
@@ -187,39 +213,69 @@  discard block
 block discarded – undo
187 213
 		if($oModuleModel->needUpdate($version_update_id))
188 214
 		{
189 215
 			// check member directory (11/08/2007 added)
190
-			if(!is_dir("./files/member_extra_info")) return true;
216
+			if(!is_dir("./files/member_extra_info")) {
217
+				return true;
218
+			}
191 219
 			// check member directory (22/10/2007 added)
192
-			if(!is_dir("./files/member_extra_info/profile_image")) return true;
220
+			if(!is_dir("./files/member_extra_info/profile_image")) {
221
+				return true;
222
+			}
193 223
 			// Add a column(is_register) to "member_auth_mail" table (22/04/2008)
194 224
 			$act = $oDB->isColumnExists("member_auth_mail", "is_register");
195
-			if(!$act) return true;
225
+			if(!$act) {
226
+				return true;
227
+			}
196 228
 			// Add a column(site_srl) to "member_group_member" table (11/15/2008)
197
-			if(!$oDB->isColumnExists("member_group_member", "site_srl")) return true;
198
-			if(!$oDB->isColumnExists("member_group", "site_srl")) return true;
199
-			if($oDB->isIndexExists("member_group","uni_member_group_title")) return true;
229
+			if(!$oDB->isColumnExists("member_group_member", "site_srl")) {
230
+				return true;
231
+			}
232
+			if(!$oDB->isColumnExists("member_group", "site_srl")) {
233
+				return true;
234
+			}
235
+			if($oDB->isIndexExists("member_group","uni_member_group_title")) {
236
+				return true;
237
+			}
200 238
 
201 239
 			// Add a column for list_order (05/18/2011)
202
-			if(!$oDB->isColumnExists("member_group", "list_order")) return true;
240
+			if(!$oDB->isColumnExists("member_group", "list_order")) {
241
+				return true;
242
+			}
203 243
 
204 244
 			// image_mark 추가 (2009. 02. 14)
205
-			if(!$oDB->isColumnExists("member_group", "image_mark")) return true;
245
+			if(!$oDB->isColumnExists("member_group", "image_mark")) {
246
+				return true;
247
+			}
206 248
 			// Add c column for password expiration date
207
-			if(!$oDB->isColumnExists("member", "change_password_date")) return true;
249
+			if(!$oDB->isColumnExists("member", "change_password_date")) {
250
+				return true;
251
+			}
208 252
 
209 253
 			// Add columns of question and answer to verify a password
210
-			if(!$oDB->isColumnExists("member", "find_account_question")) return true;
211
-			if(!$oDB->isColumnExists("member", "find_account_answer")) return true;
254
+			if(!$oDB->isColumnExists("member", "find_account_question")) {
255
+				return true;
256
+			}
257
+			if(!$oDB->isColumnExists("member", "find_account_answer")) {
258
+				return true;
259
+			}
212 260
 
213
-			if(!$oDB->isColumnExists("member", "list_order")) return true;
214
-			if(!$oDB->isIndexExists("member","idx_list_order")) return true;
261
+			if(!$oDB->isColumnExists("member", "list_order")) {
262
+				return true;
263
+			}
264
+			if(!$oDB->isIndexExists("member","idx_list_order")) {
265
+				return true;
266
+			}
215 267
 
216 268
 			$oModuleModel = getModel('module');
217 269
 			$config = $oModuleModel->getModuleConfig('member');
218 270
 			// check signup form ordering info
219
-			if(!$config->signupForm) return true;
271
+			if(!$config->signupForm) {
272
+				return true;
273
+			}
220 274
 
221 275
 			// check agreement field exist
222
-			if($config->agreement) return true;
276
+			if($config->agreement) {
277
+				return true;
278
+			}
223 279
 
224 280
 			if($config->skin)
225 281
 			{
@@ -227,25 +283,41 @@  discard block
 block discarded – undo
227 283
 				if(count($config_parse) > 1)
228 284
 				{
229 285
 					$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
230
-					if(is_dir($template_path)) return true;
286
+					if(is_dir($template_path)) {
287
+						return true;
288
+					}
231 289
 				}
232 290
 			}
233 291
 
234 292
 			// supprot multilanguage agreement.
235
-			if(is_readable('./files/member_extra_info/agreement.txt')) return true;
293
+			if(is_readable('./files/member_extra_info/agreement.txt')) {
294
+				return true;
295
+			}
236 296
 
237 297
 			// 2013. 11. 22 add menu when popup document menu called
238
-			if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) return true;
239
-			if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) return true;
298
+			if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) {
299
+				return true;
300
+			}
301
+			if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) {
302
+				return true;
303
+			}
240 304
 
241 305
 			$oModuleController->insertUpdatedLog($version_update_id);
242 306
 		}
243 307
 
244
-		if(!is_readable('./files/ruleset/insertMember.xml')) return true;
245
-		if(!is_readable('./files/ruleset/login.xml')) return true;
246
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
308
+		if(!is_readable('./files/ruleset/insertMember.xml')) {
309
+			return true;
310
+		}
311
+		if(!is_readable('./files/ruleset/login.xml')) {
312
+			return true;
313
+		}
314
+		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) {
315
+			return true;
316
+		}
247 317
 
248
-		if($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset')) return true;
318
+		if($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset')) {
319
+			return true;
320
+		}
249 321
 
250 322
 		return false;
251 323
 	}
@@ -372,10 +444,12 @@  discard block
 block discarded – undo
372 444
 			}
373 445
 			
374 446
 			// 2013. 11. 22 add menu when popup document menu called
375
-			if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
376
-				$oModuleController->insertTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after');
377
-			if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after'))
378
-				$oModuleController->insertTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after');
447
+			if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) {
448
+							$oModuleController->insertTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after');
449
+			}
450
+			if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) {
451
+							$oModuleController->insertTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after');
452
+			}
379 453
 
380 454
 			if(is_readable('./files/member_extra_info/agreement.txt'))
381 455
 			{
@@ -389,12 +463,15 @@  discard block
 block discarded – undo
389 463
 		}
390 464
 
391 465
 		FileHandler::makeDir('./files/ruleset');
392
-		if(!is_readable('./files/ruleset/insertMember.xml'))
393
-			$oMemberAdminController->_createSignupRuleset($config->signupForm);
394
-		if(!is_readable('./files/ruleset/login.xml'))
395
-			$oMemberAdminController->_createLoginRuleset($config->identifier);
396
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml'))
397
-			$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
466
+		if(!is_readable('./files/ruleset/insertMember.xml')) {
467
+					$oMemberAdminController->_createSignupRuleset($config->signupForm);
468
+		}
469
+		if(!is_readable('./files/ruleset/login.xml')) {
470
+					$oMemberAdminController->_createLoginRuleset($config->identifier);
471
+		}
472
+		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) {
473
+					$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
474
+		}
398 475
 
399 476
 		if($oModuleModel->needUpdate('member.1.8.43.recreate_signup_ruleset'))
400 477
 		{
@@ -419,7 +496,9 @@  discard block
 block discarded – undo
419 496
 	 */
420 497
 	function recordLoginError($error = 0, $message = 'success')
421 498
 	{
422
-		if($error == 0) return new Object($error, $message);
499
+		if($error == 0) {
500
+			return new Object($error, $message);
501
+		}
423 502
 
424 503
 		// Create a member model object
425 504
 		$oMemberModel = getModel('member');
@@ -427,7 +506,9 @@  discard block
 block discarded – undo
427 506
 
428 507
 		// Check if there is recoding table.
429 508
 		$oDB = &DB::getInstance();
430
-		if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
509
+		if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') {
510
+			return new Object($error, $message);
511
+		}
431 512
 
432 513
 		$args = new stdClass();
433 514
 		$args->ipaddress = $_SERVER['REMOTE_ADDR'];
@@ -441,16 +522,14 @@  discard block
 block discarded – undo
441 522
 			if($term < $config->max_error_count_time)
442 523
 			{
443 524
 				$args->count = $output->data->count + 1;
444
-			}
445
-			else
525
+			} else
446 526
 			{
447 527
 				$args->count = 1;
448 528
 			}
449 529
 			unset($oMemberModel);
450 530
 			unset($config);
451 531
 			$output = executeQuery('member.updateLoginCountByIp', $args);
452
-		}
453
-		else
532
+		} else
454 533
 		{
455 534
 			//insert
456 535
 			$args->count = 1;
@@ -464,7 +543,9 @@  discard block
 block discarded – undo
464 543
 	 */
465 544
 	function recordMemberLoginError($error = 0, $message = 'success', $args = NULL)
466 545
 	{
467
-		if($error == 0 || !$args->member_srl) return new Object($error, $message);
546
+		if($error == 0 || !$args->member_srl) {
547
+			return new Object($error, $message);
548
+		}
468 549
 
469 550
 		// Create a member model object
470 551
 		$oMemberModel = getModel('member');
@@ -472,7 +553,9 @@  discard block
 block discarded – undo
472 553
 
473 554
 		// Check if there is recoding table.
474 555
 		$oDB = &DB::getInstance();
475
-		if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
556
+		if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') {
557
+			return new Object($error, $message);
558
+		}
476 559
 
477 560
 		$output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args);
478 561
 		if($output->data && $output->data->content)
@@ -482,8 +565,7 @@  discard block
 block discarded – undo
482 565
 			$content[] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
483 566
 			$args->content = serialize($content);
484 567
 			$output = executeQuery('member.updateLoginCountHistoryByMemberSrl', $args);
485
-		}
486
-		else
568
+		} else
487 569
 		{
488 570
 			//insert
489 571
 			$content[0] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
Please login to merge, or discard this patch.
modules/member/member.admin.view.php 2 patches
Spacing   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
 
44 44
 		// if member_srl exists, set memberInfo
45 45
 		$member_srl = Context::get('member_srl');
46
-		if($member_srl) 
46
+		if ($member_srl) 
47 47
 		{
48 48
 			$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
49
-			if(!$this->memberInfo)
49
+			if (!$this->memberInfo)
50 50
 			{
51
-				Context::set('member_srl','');
51
+				Context::set('member_srl', '');
52 52
 			}
53 53
 			else
54 54
 			{
55
-				Context::set('member_info',$this->memberInfo);
55
+				Context::set('member_info', $this->memberInfo);
56 56
 			}
57 57
 		}
58 58
 
@@ -79,30 +79,30 @@  discard block
 block discarded – undo
79 79
 
80 80
 		$filter = Context::get('filter_type');
81 81
 		global $lang;
82
-		switch($filter)
82
+		switch ($filter)
83 83
 		{
84
-			case 'super_admin' : Context::set('filter_type_title', $lang->cmd_show_super_admin_member);break;
85
-			case 'site_admin' : Context::set('filter_type_title', $lang->cmd_show_site_admin_member);break;
86
-			default : Context::set('filter_type_title', $lang->cmd_show_all_member);break;
84
+			case 'super_admin' : Context::set('filter_type_title', $lang->cmd_show_super_admin_member); break;
85
+			case 'site_admin' : Context::set('filter_type_title', $lang->cmd_show_site_admin_member); break;
86
+			default : Context::set('filter_type_title', $lang->cmd_show_all_member); break;
87 87
 		}
88 88
 		// retrieve list of groups for each member
89
-		if($output->data)
89
+		if ($output->data)
90 90
 		{
91
-			foreach($output->data as $key => $member)
91
+			foreach ($output->data as $key => $member)
92 92
 			{
93
-				$output->data[$key]->group_list = $oMemberModel->getMemberGroups($member->member_srl,0);
93
+				$output->data[$key]->group_list = $oMemberModel->getMemberGroups($member->member_srl, 0);
94 94
 			}
95 95
 		}
96 96
 		$config = $this->memberConfig;
97 97
 		$memberIdentifiers = array('user_id'=>'user_id', 'user_name'=>'user_name', 'nick_name'=>'nick_name');
98 98
 		$usedIdentifiers = array();	
99 99
 
100
-		if(is_array($config->signupForm))
100
+		if (is_array($config->signupForm))
101 101
 		{
102
-			foreach($config->signupForm as $signupItem)
102
+			foreach ($config->signupForm as $signupItem)
103 103
 			{
104
-				if(!count($memberIdentifiers)) break;
105
-				if(in_array($signupItem->name, $memberIdentifiers) && ($signupItem->required || $signupItem->isUse))
104
+				if (!count($memberIdentifiers)) break;
105
+				if (in_array($signupItem->name, $memberIdentifiers) && ($signupItem->required || $signupItem->isUse))
106 106
 				{
107 107
 					unset($memberIdentifiers[$signupItem->name]);
108 108
 					$usedIdentifiers[$signupItem->name] = $lang->{$signupItem->name};
@@ -140,14 +140,14 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		$config = $this->memberConfig;
142 142
 
143
-		if($config->redirect_url)
143
+		if ($config->redirect_url)
144 144
 		{
145 145
 			$mid = str_ireplace(Context::getDefaultUrl(), '', $config->redirect_url);
146 146
 
147 147
 			$siteModuleInfo = Context::get('site_module_info');
148 148
 
149 149
 			$oModuleModel = getModel('module');
150
-			$moduleInfo = $oModuleModel->getModuleInfoByMid($mid, (int)$siteModuleInfo->site_srl);
150
+			$moduleInfo = $oModuleModel->getModuleInfoByMid($mid, (int) $siteModuleInfo->site_srl);
151 151
 
152 152
 			$config->redirect_url = $moduleInfo->module_srl;
153 153
 			Context::set('config', $config);
@@ -173,9 +173,9 @@  discard block
 block discarded – undo
173 173
 		Context::set('editor', $editor);
174 174
 
175 175
 		$signupForm = $config->signupForm;
176
-		foreach($signupForm as $val)
176
+		foreach ($signupForm as $val)
177 177
 		{
178
-			if($val->name == 'user_id')
178
+			if ($val->name == 'user_id')
179 179
 			{
180 180
 				$userIdInfo = $val;
181 181
 				break;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		}
184 184
 
185 185
 		$oSecurity = new Security();
186
-		if($userIdInfo->isUse)
186
+		if ($userIdInfo->isUse)
187 187
 		{
188 188
 			// get denied ID list
189 189
 			Context::set('useUserID', 1);
@@ -274,16 +274,16 @@  discard block
 block discarded – undo
274 274
 		Context::set('editor', $editor);
275 275
 
276 276
 		$signupForm = $config->signupForm;
277
-		foreach($signupForm as $val)
277
+		foreach ($signupForm as $val)
278 278
 		{
279
-			if($val->name == 'user_id')
279
+			if ($val->name == 'user_id')
280 280
 			{
281 281
 				$userIdInfo = $val;
282 282
 				break;
283 283
 			}
284 284
 		}
285 285
 
286
-		if($userIdInfo->isUse)
286
+		if ($userIdInfo->isUse)
287 287
 		{
288 288
 			// get denied ID list
289 289
 			Context::set('useUserID', 1);
@@ -344,14 +344,14 @@  discard block
 block discarded – undo
344 344
 		$oMemberModel = getModel('member');
345 345
 
346 346
 		$memberInfo = Context::get('member_info');
347
-		if(isset($memberInfo))
347
+		if (isset($memberInfo))
348 348
 		{
349 349
 			$memberInfo->signature = $oMemberModel->getSignature($this->memberInfo->member_srl);
350 350
 		}
351 351
 		Context::set('member_info', $memberInfo);
352 352
 
353 353
 		// get an editor for the signature
354
-		if($memberInfo->member_srl)
354
+		if ($memberInfo->member_srl)
355 355
 		{
356 356
 			$oEditorModel = getModel('editor');
357 357
 			$option = new stdClass();
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 		}
406 406
 
407 407
 		$member_config = $this->memberConfig;
408
-		if(!$this->memberConfig)
408
+		if (!$this->memberConfig)
409 409
 		{
410 410
 			$member_config = $this->memberConfig = $oMemberModel->getMemberConfig();
411 411
 		}
@@ -416,25 +416,25 @@  discard block
 block discarded – undo
416 416
 		$formTags = array();
417 417
 		global $lang;
418 418
 
419
-		foreach($member_config->signupForm as $no=>$formInfo)
419
+		foreach ($member_config->signupForm as $no=>$formInfo)
420 420
 		{
421
-			if(!$formInfo->isUse)continue;
421
+			if (!$formInfo->isUse)continue;
422 422
 
423 423
 			// 회원 본인이 아닌 경우 입력 폼 제거
424
-			if($formInfo->name == 'find_account_question' && $memberInfo['member_srl'] !== $logged_info->member_srl)
424
+			if ($formInfo->name == 'find_account_question' && $memberInfo['member_srl'] !== $logged_info->member_srl)
425 425
 			{
426 426
 				unset($member_config->signupForm[$no]);
427 427
 				continue;
428 428
 			}
429 429
 
430
-			if($formInfo->name == $member_config->identifier || $formInfo->name == 'password') continue;
430
+			if ($formInfo->name == $member_config->identifier || $formInfo->name == 'password') continue;
431 431
 
432 432
 			$formTag = new stdClass();
433 433
 			$inputTag = '';
434 434
 			$formTag->title = ($formInfo->isDefaultForm) ? $lang->{$formInfo->name} : $formInfo->title;
435
-			if($isAdmin)
435
+			if ($isAdmin)
436 436
 			{
437
-				if($formInfo->mustRequired) $formTag->title = '<em style="color:red">*</em> '.$formTag->title;
437
+				if ($formInfo->mustRequired) $formTag->title = '<em style="color:red">*</em> '.$formTag->title;
438 438
 			}
439 439
 			else
440 440
 			{
@@ -442,28 +442,28 @@  discard block
 block discarded – undo
442 442
 			}
443 443
 			$formTag->name = $formInfo->name;
444 444
 
445
-			if($formInfo->isDefaultForm)
445
+			if ($formInfo->isDefaultForm)
446 446
 			{
447
-				if($formInfo->imageType)
447
+				if ($formInfo->imageType)
448 448
 				{
449 449
 					$formTag->type = 'image';
450
-					if($formInfo->name == 'profile_image')
450
+					if ($formInfo->name == 'profile_image')
451 451
 					{
452 452
 						$target = $memberInfo['profile_image'];
453 453
 						$functionName = 'doDeleteProfileImage';
454 454
 					}
455
-					else if($formInfo->name == 'image_name')
455
+					else if ($formInfo->name == 'image_name')
456 456
 					{
457 457
 						$target = $memberInfo['image_name'];
458 458
 						$functionName = 'doDeleteImageName';
459 459
 					}
460
-					else if($formInfo->name == 'image_mark')
460
+					else if ($formInfo->name == 'image_mark')
461 461
 					{
462 462
 						$target = $memberInfo['image_mark'];
463 463
 						$functionName = 'doDeleteImageMark';
464 464
 					}
465 465
 
466
-					if($target->src)
466
+					if ($target->src)
467 467
 					{
468 468
 						$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="true" /><span id="%s"><img src="%s" alt="%s" /> <button type="button" onclick="%s(%d);return false;">%s</button></span>',
469 469
 							$formInfo->name,
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 						$lang->{$formInfo->name.'_max_height'},
487 487
 						$member_config->{$formInfo->name.'_max_height'});
488 488
 					}//end imageType
489
-					else if($formInfo->name == 'birthday')
489
+					else if ($formInfo->name == 'birthday')
490 490
 					{
491 491
 						$formTag->type = 'date';
492 492
 						$inputTag = sprintf('<input type="hidden" name="birthday" id="date_birthday" value="%s" /><input type="text" placeholder="YYYY-MM-DD" name="birthday_ui" class="inputDate" id="birthday" value="%s" readonly="readonly" /> <input type="button" value="%s" class="btn dateRemover" />',
@@ -494,16 +494,16 @@  discard block
 block discarded – undo
494 494
 							zdate($memberInfo['birthday'], 'Y-m-d', false),
495 495
 							$lang->cmd_delete);
496 496
 					}
497
-					else if($formInfo->name == 'find_account_question')
497
+					else if ($formInfo->name == 'find_account_question')
498 498
 					{
499 499
 						$disabled = (!!$memberInfo['member_srl']) ? 'disabled="disabled"' : '';
500 500
 
501 501
 						$formTag->type = 'select';
502 502
 						$inputTag = '<select name="find_account_question" id="find_account_question" style="display:block;margin:0 0 8px 0" %s>%s</select>';
503 503
 						$optionTag = array();
504
-						foreach($lang->find_account_question_items as $key=>$val)
504
+						foreach ($lang->find_account_question_items as $key=>$val)
505 505
 						{
506
-							if($key == $memberInfo['find_account_question']) $selected = 'selected="selected"';
506
+							if ($key == $memberInfo['find_account_question']) $selected = 'selected="selected"';
507 507
 							else $selected = '';
508 508
 							$optionTag[] = sprintf('<option value="%s" %s >%s</option>',
509 509
 								$key,
@@ -511,24 +511,24 @@  discard block
 block discarded – undo
511 511
 								$val);
512 512
 						}
513 513
 						$inputTag = sprintf($inputTag, $disabled, implode('', $optionTag));
514
-						$inputTag .= '<input type="text" name="find_account_answer" id="find_account_answer" title="'.Context::getLang('find_account_answer').'" value="" ' . $disabled . ' />';
514
+						$inputTag .= '<input type="text" name="find_account_answer" id="find_account_answer" title="'.Context::getLang('find_account_answer').'" value="" '.$disabled.' />';
515 515
 
516
-						if($disabled) {
517
-							$inputTag .= ' <label><input type="checkbox" name="modify_find_account_answer" value="Y" /> ' . Context::getLang('cmd_modify') . '</label>';
516
+						if ($disabled) {
517
+							$inputTag .= ' <label><input type="checkbox" name="modify_find_account_answer" value="Y" /> '.Context::getLang('cmd_modify').'</label>';
518 518
 							$inputTag .= '<script>(function($) {$(function() {$(\'[name=modify_find_account_answer]\').change(function() {var $this = $(this); if($this.prop(\'checked\')) {$(\'[name=find_account_question],[name=find_account_answer]\').attr(\'disabled\', false); } else {$(\'[name=find_account_question]\').attr(\'disabled\', true); $(\'[name=find_account_answer]\').attr(\'disabled\', true).val(\'\'); } }); }); })(jQuery);</script>';
519 519
 						}
520 520
 					}
521
-					else if($formInfo->name == 'email_address')
521
+					else if ($formInfo->name == 'email_address')
522 522
 					{
523 523
 						$formTag->type = 'email';
524 524
 						$inputTag = '<input type="email" name="email_address" id="email_address" value="'.$memberInfo['email_address'].'" />';
525 525
 					}
526
-					else if($formInfo->name == 'homepage')
526
+					else if ($formInfo->name == 'homepage')
527 527
 					{
528 528
 						$formTag->type = 'url';
529 529
 						$inputTag = '<input type="url" name="homepage" id="homepage" value="'.$memberInfo['homepage'].'" />';
530 530
 					}
531
-					else if($formInfo->name == 'blog')
531
+					else if ($formInfo->name == 'blog')
532 532
 					{
533 533
 						$formTag->type = 'url';
534 534
 						$inputTag = '<input type="url" name="blog" id="blog" value="'.$memberInfo['blog'].'" />';
@@ -549,92 +549,92 @@  discard block
 block discarded – undo
549 549
 					$extentionReplace = array();
550 550
 
551 551
 					$formTag->type = $extendForm->column_type;
552
-					if($extendForm->column_type == 'text')
552
+					if ($extendForm->column_type == 'text')
553 553
 					{
554 554
 						$template = '<input type="text" name="%column_name%" id="%column_name%" value="%value%" />';
555 555
 					}
556
-					else if($extendForm->column_type == 'homepage')
556
+					else if ($extendForm->column_type == 'homepage')
557 557
 					{
558 558
 						$template = '<input type="url" name="%column_name%" id="%column_name%" value="%value%" />';
559 559
 					}
560
-					else if($extendForm->column_type == 'email_address')
560
+					else if ($extendForm->column_type == 'email_address')
561 561
 					{
562 562
 						$template = '<input type="email" name="%column_name%" id="%column_name%" value="%value%" />';
563 563
 					}
564
-					else if($extendForm->column_type == 'tel')
564
+					else if ($extendForm->column_type == 'tel')
565 565
 					{
566 566
 						$extentionReplace = array('tel_0' => $extendForm->value[0],
567 567
 							'tel_1' => $extendForm->value[1],
568 568
 							'tel_2' => $extendForm->value[2]);
569 569
 						$template = '<input type="tel" name="%column_name%[]" id="%column_name%" value="%tel_0%" size="4" maxlength="4" style="width:30px" title="First Number" /> - <input type="tel" name="%column_name%[]" value="%tel_1%" size="4" maxlength="4" style="width:35px" title="Second Number" /> - <input type="tel" name="%column_name%[]" value="%tel_2%" size="4" maxlength="4" style="width:35px" title="Third Number" />';
570 570
 					}
571
-					else if($extendForm->column_type == 'textarea')
571
+					else if ($extendForm->column_type == 'textarea')
572 572
 					{
573 573
 						$template = '<textarea name="%column_name%" id="%column_name%" rows="4" cols="42">%value%</textarea>';
574 574
 					}
575
-					else if($extendForm->column_type == 'checkbox')
575
+					else if ($extendForm->column_type == 'checkbox')
576 576
 					{
577 577
 						$template = '';
578
-						if($extendForm->default_value)
578
+						if ($extendForm->default_value)
579 579
 						{
580 580
 							$template = '<div style="padding-top:5px">%s</div>';
581 581
 							$__i = 0;
582 582
 							$optionTag = array();
583
-							foreach($extendForm->default_value as $v)
583
+							foreach ($extendForm->default_value as $v)
584 584
 							{
585 585
 								$checked = '';
586
-								if(is_array($extendForm->value) && in_array($v, $extendForm->value))$checked = 'checked="checked"';
586
+								if (is_array($extendForm->value) && in_array($v, $extendForm->value))$checked = 'checked="checked"';
587 587
 								$optionTag[] = '<label for="%column_name%'.$__i.'"><input type="checkbox" id="%column_name%'.$__i.'" name="%column_name%[]" value="'.$v.'" '.$checked.' /> '.$v.'</label>';
588 588
 								$__i++;
589 589
 							}
590 590
 							$template = sprintf($template, implode('', $optionTag));
591 591
 						}
592 592
 					}
593
-					else if($extendForm->column_type == 'radio')
593
+					else if ($extendForm->column_type == 'radio')
594 594
 					{
595 595
 						$template = '';
596
-						if($extendForm->default_value)
596
+						if ($extendForm->default_value)
597 597
 						{
598 598
 							$template = '<div style="padding-top:5px">%s</div>';
599 599
 							$optionTag = array();
600
-							foreach($extendForm->default_value as $v)
600
+							foreach ($extendForm->default_value as $v)
601 601
 							{
602
-								if($extendForm->value == $v)$checked = 'checked="checked"';
602
+								if ($extendForm->value == $v)$checked = 'checked="checked"';
603 603
 								else $checked = '';
604 604
 								$optionTag[] = '<label><input type="radio" name="%column_name%" value="'.$v.'" '.$checked.' /> '.$v.'</label>';
605 605
 							}
606 606
 							$template = sprintf($template, implode('', $optionTag));
607 607
 						}
608 608
 					}
609
-					else if($extendForm->column_type == 'select')
609
+					else if ($extendForm->column_type == 'select')
610 610
 					{
611 611
 						$template = '<select name="'.$formInfo->name.'" id="'.$formInfo->name.'">%s</select>';
612 612
 						$optionTag = array();
613 613
 						$optionTag[] = sprintf('<option value="">%s</option>', $lang->cmd_select);
614
-						if($extendForm->default_value)
614
+						if ($extendForm->default_value)
615 615
 						{
616
-							foreach($extendForm->default_value as $v)
616
+							foreach ($extendForm->default_value as $v)
617 617
 							{
618
-								if($v == $extendForm->value) $selected = 'selected="selected"';
618
+								if ($v == $extendForm->value) $selected = 'selected="selected"';
619 619
 								else $selected = '';
620 620
 								$optionTag[] = sprintf('<option value="%s" %s >%s</option>', $v, $selected, $v);
621 621
 							}
622 622
 						}
623 623
 						$template = sprintf($template, implode('', $optionTag));
624 624
 					}
625
-					else if($extendForm->column_type == 'kr_zip')
625
+					else if ($extendForm->column_type == 'kr_zip')
626 626
 					{
627 627
 						$krzipModel = getModel('krzip');
628
-						if($krzipModel && method_exists($krzipModel , 'getKrzipCodeSearchHtml' ))
628
+						if ($krzipModel && method_exists($krzipModel, 'getKrzipCodeSearchHtml'))
629 629
 						{
630 630
 							$template = $krzipModel->getKrzipCodeSearchHtml($extendForm->column_name, $extendForm->value);
631 631
 						}
632 632
 					}
633
-					else if($extendForm->column_type == 'jp_zip')
633
+					else if ($extendForm->column_type == 'jp_zip')
634 634
 					{
635 635
 						$template = '<input type="text" name="%column_name%" id="%column_name%" value="%value%" />';
636 636
 					}
637
-					else if($extendForm->column_type == 'date')
637
+					else if ($extendForm->column_type == 'date')
638 638
 					{
639 639
 						$extentionReplace = array('date' => zdate($extendForm->value, 'Y-m-d'), 'cmd_delete' => $lang->cmd_delete);
640 640
 						$template = '<input type="hidden" name="%column_name%" id="date_%column_name%" value="%value%" /><input type="text" placeholder="YYYY-MM-DD" class="inputDate" value="%date%" readonly="readonly" /> <input type="button" value="%cmd_delete%" class="btn dateRemover" />';
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 					$replace = array_merge($extentionReplace, $replace);
644 644
 					$inputTag = preg_replace_callback('@%(\w+)%@', function($n) use($replace) { return $replace[$n[1]]; }, $template);
645 645
 
646
-					if($extendForm->description)
646
+					if ($extendForm->description)
647 647
 						$inputTag .= '<p class="help-block">'.$extendForm->description.'</p>';
648 648
 				}
649 649
 				$formTag->inputTag = $inputTag;
@@ -674,12 +674,12 @@  discard block
 block discarded – undo
674 674
 	function dispMemberAdminInsertJoinForm() {
675 675
 		// Get the value of join_form
676 676
 		$member_join_form_srl = Context::get('member_join_form_srl');
677
-		if($member_join_form_srl)
677
+		if ($member_join_form_srl)
678 678
 		{
679 679
 			$oMemberModel = getModel('member');
680 680
 			$join_form = $oMemberModel->getJoinForm($member_join_form_srl);
681 681
 
682
-			if(!$join_form) Context::set('member_join_form_srl','',true);
682
+			if (!$join_form) Context::set('member_join_form_srl', '', true);
683 683
 			else
684 684
 			{
685 685
 				Context::set('join_form', $join_form);
Please login to merge, or discard this patch.
Braces   +62 added lines, -57 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 			if(!$this->memberInfo)
50 50
 			{
51 51
 				Context::set('member_srl','');
52
-			}
53
-			else
52
+			} else
54 53
 			{
55 54
 				Context::set('member_info',$this->memberInfo);
56 55
 			}
@@ -101,7 +100,9 @@  discard block
 block discarded – undo
101 100
 		{
102 101
 			foreach($config->signupForm as $signupItem)
103 102
 			{
104
-				if(!count($memberIdentifiers)) break;
103
+				if(!count($memberIdentifiers)) {
104
+					break;
105
+				}
105 106
 				if(in_array($signupItem->name, $memberIdentifiers) && ($signupItem->required || $signupItem->isUse))
106 107
 				{
107 108
 					unset($memberIdentifiers[$signupItem->name]);
@@ -316,7 +317,9 @@  discard block
 block discarded – undo
316 317
 		$extendForm = $oMemberModel->getCombineJoinForm($this->memberInfo);
317 318
 		Context::set('extend_form_list', $extendForm);
318 319
 		$memberInfo = get_object_vars(Context::get('member_info'));
319
-		if (!is_array($memberInfo['group_list'])) $memberInfo['group_list'] = array();
320
+		if (!is_array($memberInfo['group_list'])) {
321
+			$memberInfo['group_list'] = array();
322
+		}
320 323
 		Context::set('memberInfo', $memberInfo);
321 324
 
322 325
 		$disableColumns = array('password', 'find_account_question', 'find_account_answer');
@@ -418,7 +421,9 @@  discard block
 block discarded – undo
418 421
 
419 422
 		foreach($member_config->signupForm as $no=>$formInfo)
420 423
 		{
421
-			if(!$formInfo->isUse)continue;
424
+			if(!$formInfo->isUse) {
425
+				continue;
426
+			}
422 427
 
423 428
 			// 회원 본인이 아닌 경우 입력 폼 제거
424 429
 			if($formInfo->name == 'find_account_question' && $memberInfo['member_srl'] !== $logged_info->member_srl)
@@ -427,18 +432,23 @@  discard block
 block discarded – undo
427 432
 				continue;
428 433
 			}
429 434
 
430
-			if($formInfo->name == $member_config->identifier || $formInfo->name == 'password') continue;
435
+			if($formInfo->name == $member_config->identifier || $formInfo->name == 'password') {
436
+				continue;
437
+			}
431 438
 
432 439
 			$formTag = new stdClass();
433 440
 			$inputTag = '';
434 441
 			$formTag->title = ($formInfo->isDefaultForm) ? $lang->{$formInfo->name} : $formInfo->title;
435 442
 			if($isAdmin)
436 443
 			{
437
-				if($formInfo->mustRequired) $formTag->title = '<em style="color:red">*</em> '.$formTag->title;
438
-			}
439
-			else
444
+				if($formInfo->mustRequired) {
445
+					$formTag->title = '<em style="color:red">*</em> '.$formTag->title;
446
+				}
447
+			} else
440 448
 			{
441
-				if ($formInfo->required && $formInfo->name != 'password') $formTag->title = '<em style="color:red">*</em> '.$formTag->title;
449
+				if ($formInfo->required && $formInfo->name != 'password') {
450
+					$formTag->title = '<em style="color:red">*</em> '.$formTag->title;
451
+				}
442 452
 			}
443 453
 			$formTag->name = $formInfo->name;
444 454
 
@@ -451,13 +461,11 @@  discard block
 block discarded – undo
451 461
 					{
452 462
 						$target = $memberInfo['profile_image'];
453 463
 						$functionName = 'doDeleteProfileImage';
454
-					}
455
-					else if($formInfo->name == 'image_name')
464
+					} else if($formInfo->name == 'image_name')
456 465
 					{
457 466
 						$target = $memberInfo['image_name'];
458 467
 						$functionName = 'doDeleteImageName';
459
-					}
460
-					else if($formInfo->name == 'image_mark')
468
+					} else if($formInfo->name == 'image_mark')
461 469
 					{
462 470
 						$target = $memberInfo['image_mark'];
463 471
 						$functionName = 'doDeleteImageMark';
@@ -473,8 +481,7 @@  discard block
 block discarded – undo
473 481
 							$functionName,
474 482
 							$memberInfo['member_srl'],
475 483
 							$lang->cmd_delete);
476
-					}
477
-					else
484
+					} else
478 485
 					{
479 486
 						$inputTag = sprintf('<input type="hidden" name="__%s_exist" value="false" />', $formInfo->name);
480 487
 					}
@@ -493,8 +500,7 @@  discard block
 block discarded – undo
493 500
 							$memberInfo['birthday'],
494 501
 							zdate($memberInfo['birthday'], 'Y-m-d', false),
495 502
 							$lang->cmd_delete);
496
-					}
497
-					else if($formInfo->name == 'find_account_question')
503
+					} else if($formInfo->name == 'find_account_question')
498 504
 					{
499 505
 						$disabled = (!!$memberInfo['member_srl']) ? 'disabled="disabled"' : '';
500 506
 
@@ -503,8 +509,11 @@  discard block
 block discarded – undo
503 509
 						$optionTag = array();
504 510
 						foreach($lang->find_account_question_items as $key=>$val)
505 511
 						{
506
-							if($key == $memberInfo['find_account_question']) $selected = 'selected="selected"';
507
-							else $selected = '';
512
+							if($key == $memberInfo['find_account_question']) {
513
+								$selected = 'selected="selected"';
514
+							} else {
515
+								$selected = '';
516
+							}
508 517
 							$optionTag[] = sprintf('<option value="%s" %s >%s</option>',
509 518
 								$key,
510 519
 								$selected,
@@ -517,23 +526,19 @@  discard block
 block discarded – undo
517 526
 							$inputTag .= ' <label><input type="checkbox" name="modify_find_account_answer" value="Y" /> ' . Context::getLang('cmd_modify') . '</label>';
518 527
 							$inputTag .= '<script>(function($) {$(function() {$(\'[name=modify_find_account_answer]\').change(function() {var $this = $(this); if($this.prop(\'checked\')) {$(\'[name=find_account_question],[name=find_account_answer]\').attr(\'disabled\', false); } else {$(\'[name=find_account_question]\').attr(\'disabled\', true); $(\'[name=find_account_answer]\').attr(\'disabled\', true).val(\'\'); } }); }); })(jQuery);</script>';
519 528
 						}
520
-					}
521
-					else if($formInfo->name == 'email_address')
529
+					} else if($formInfo->name == 'email_address')
522 530
 					{
523 531
 						$formTag->type = 'email';
524 532
 						$inputTag = '<input type="email" name="email_address" id="email_address" value="'.$memberInfo['email_address'].'" />';
525
-					}
526
-					else if($formInfo->name == 'homepage')
533
+					} else if($formInfo->name == 'homepage')
527 534
 					{
528 535
 						$formTag->type = 'url';
529 536
 						$inputTag = '<input type="url" name="homepage" id="homepage" value="'.$memberInfo['homepage'].'" />';
530
-					}
531
-					else if($formInfo->name == 'blog')
537
+					} else if($formInfo->name == 'blog')
532 538
 					{
533 539
 						$formTag->type = 'url';
534 540
 						$inputTag = '<input type="url" name="blog" id="blog" value="'.$memberInfo['blog'].'" />';
535
-					}
536
-					else
541
+					} else
537 542
 					{
538 543
 						$formTag->type = 'text';
539 544
 						$inputTag = sprintf('<input type="text" name="%s" id="%s" value="%s" />',
@@ -552,27 +557,22 @@  discard block
 block discarded – undo
552 557
 					if($extendForm->column_type == 'text')
553 558
 					{
554 559
 						$template = '<input type="text" name="%column_name%" id="%column_name%" value="%value%" />';
555
-					}
556
-					else if($extendForm->column_type == 'homepage')
560
+					} else if($extendForm->column_type == 'homepage')
557 561
 					{
558 562
 						$template = '<input type="url" name="%column_name%" id="%column_name%" value="%value%" />';
559
-					}
560
-					else if($extendForm->column_type == 'email_address')
563
+					} else if($extendForm->column_type == 'email_address')
561 564
 					{
562 565
 						$template = '<input type="email" name="%column_name%" id="%column_name%" value="%value%" />';
563
-					}
564
-					else if($extendForm->column_type == 'tel')
566
+					} else if($extendForm->column_type == 'tel')
565 567
 					{
566 568
 						$extentionReplace = array('tel_0' => $extendForm->value[0],
567 569
 							'tel_1' => $extendForm->value[1],
568 570
 							'tel_2' => $extendForm->value[2]);
569 571
 						$template = '<input type="tel" name="%column_name%[]" id="%column_name%" value="%tel_0%" size="4" maxlength="4" style="width:30px" title="First Number" /> - <input type="tel" name="%column_name%[]" value="%tel_1%" size="4" maxlength="4" style="width:35px" title="Second Number" /> - <input type="tel" name="%column_name%[]" value="%tel_2%" size="4" maxlength="4" style="width:35px" title="Third Number" />';
570
-					}
571
-					else if($extendForm->column_type == 'textarea')
572
+					} else if($extendForm->column_type == 'textarea')
572 573
 					{
573 574
 						$template = '<textarea name="%column_name%" id="%column_name%" rows="4" cols="42">%value%</textarea>';
574
-					}
575
-					else if($extendForm->column_type == 'checkbox')
575
+					} else if($extendForm->column_type == 'checkbox')
576 576
 					{
577 577
 						$template = '';
578 578
 						if($extendForm->default_value)
@@ -583,14 +583,15 @@  discard block
 block discarded – undo
583 583
 							foreach($extendForm->default_value as $v)
584 584
 							{
585 585
 								$checked = '';
586
-								if(is_array($extendForm->value) && in_array($v, $extendForm->value))$checked = 'checked="checked"';
586
+								if(is_array($extendForm->value) && in_array($v, $extendForm->value)) {
587
+									$checked = 'checked="checked"';
588
+								}
587 589
 								$optionTag[] = '<label for="%column_name%'.$__i.'"><input type="checkbox" id="%column_name%'.$__i.'" name="%column_name%[]" value="'.$v.'" '.$checked.' /> '.$v.'</label>';
588 590
 								$__i++;
589 591
 							}
590 592
 							$template = sprintf($template, implode('', $optionTag));
591 593
 						}
592
-					}
593
-					else if($extendForm->column_type == 'radio')
594
+					} else if($extendForm->column_type == 'radio')
594 595
 					{
595 596
 						$template = '';
596 597
 						if($extendForm->default_value)
@@ -599,14 +600,16 @@  discard block
 block discarded – undo
599 600
 							$optionTag = array();
600 601
 							foreach($extendForm->default_value as $v)
601 602
 							{
602
-								if($extendForm->value == $v)$checked = 'checked="checked"';
603
-								else $checked = '';
603
+								if($extendForm->value == $v) {
604
+									$checked = 'checked="checked"';
605
+								} else {
606
+									$checked = '';
607
+								}
604 608
 								$optionTag[] = '<label><input type="radio" name="%column_name%" value="'.$v.'" '.$checked.' /> '.$v.'</label>';
605 609
 							}
606 610
 							$template = sprintf($template, implode('', $optionTag));
607 611
 						}
608
-					}
609
-					else if($extendForm->column_type == 'select')
612
+					} else if($extendForm->column_type == 'select')
610 613
 					{
611 614
 						$template = '<select name="'.$formInfo->name.'" id="'.$formInfo->name.'">%s</select>';
612 615
 						$optionTag = array();
@@ -615,26 +618,26 @@  discard block
 block discarded – undo
615 618
 						{
616 619
 							foreach($extendForm->default_value as $v)
617 620
 							{
618
-								if($v == $extendForm->value) $selected = 'selected="selected"';
619
-								else $selected = '';
621
+								if($v == $extendForm->value) {
622
+									$selected = 'selected="selected"';
623
+								} else {
624
+									$selected = '';
625
+								}
620 626
 								$optionTag[] = sprintf('<option value="%s" %s >%s</option>', $v, $selected, $v);
621 627
 							}
622 628
 						}
623 629
 						$template = sprintf($template, implode('', $optionTag));
624
-					}
625
-					else if($extendForm->column_type == 'kr_zip')
630
+					} else if($extendForm->column_type == 'kr_zip')
626 631
 					{
627 632
 						$krzipModel = getModel('krzip');
628 633
 						if($krzipModel && method_exists($krzipModel , 'getKrzipCodeSearchHtml' ))
629 634
 						{
630 635
 							$template = $krzipModel->getKrzipCodeSearchHtml($extendForm->column_name, $extendForm->value);
631 636
 						}
632
-					}
633
-					else if($extendForm->column_type == 'jp_zip')
637
+					} else if($extendForm->column_type == 'jp_zip')
634 638
 					{
635 639
 						$template = '<input type="text" name="%column_name%" id="%column_name%" value="%value%" />';
636
-					}
637
-					else if($extendForm->column_type == 'date')
640
+					} else if($extendForm->column_type == 'date')
638 641
 					{
639 642
 						$extentionReplace = array('date' => zdate($extendForm->value, 'Y-m-d'), 'cmd_delete' => $lang->cmd_delete);
640 643
 						$template = '<input type="hidden" name="%column_name%" id="date_%column_name%" value="%value%" /><input type="text" placeholder="YYYY-MM-DD" class="inputDate" value="%date%" readonly="readonly" /> <input type="button" value="%cmd_delete%" class="btn dateRemover" />';
@@ -643,8 +646,9 @@  discard block
 block discarded – undo
643 646
 					$replace = array_merge($extentionReplace, $replace);
644 647
 					$inputTag = preg_replace_callback('@%(\w+)%@', function($n) use($replace) { return $replace[$n[1]]; }, $template);
645 648
 
646
-					if($extendForm->description)
647
-						$inputTag .= '<p class="help-block">'.$extendForm->description.'</p>';
649
+					if($extendForm->description) {
650
+											$inputTag .= '<p class="help-block">'.$extendForm->description.'</p>';
651
+					}
648 652
 				}
649 653
 				$formTag->inputTag = $inputTag;
650 654
 				$formTags[] = $formTag;
@@ -679,8 +683,9 @@  discard block
 block discarded – undo
679 683
 			$oMemberModel = getModel('member');
680 684
 			$join_form = $oMemberModel->getJoinForm($member_join_form_srl);
681 685
 
682
-			if(!$join_form) Context::set('member_join_form_srl','',true);
683
-			else
686
+			if(!$join_form) {
687
+				Context::set('member_join_form_srl','',true);
688
+			} else
684 689
 			{
685 690
 				Context::set('join_form', $join_form);
686 691
 				$security = new Security();
Please login to merge, or discard this patch.
modules/member/member.admin.controller.php 2 patches
Spacing   +175 added lines, -175 removed lines patch added patch discarded remove patch
@@ -24,31 +24,31 @@  discard block
 block discarded – undo
24 24
 		// if(Context::getRequestMethod() == "GET") return new Object(-1, "msg_invalid_request");
25 25
 		// Extract the necessary information in advance
26 26
 		$logged_info = Context::get('logged_info');
27
-		if($logged_info->is_admin != 'Y' || !checkCSRF())
27
+		if ($logged_info->is_admin != 'Y' || !checkCSRF())
28 28
 		{
29 29
 			return new Object(-1, 'msg_invalid_request');
30 30
 		}
31 31
 
32
-		$args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date');
33
-		$oMemberModel = &getModel ('member');
34
-		$config = $oMemberModel->getMemberConfig ();
32
+		$args = Context::gets('member_srl', 'email_address', 'find_account_answer', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date');
33
+		$oMemberModel = &getModel('member');
34
+		$config = $oMemberModel->getMemberConfig();
35 35
 		$getVars = array();
36
-		if($config->signupForm)
36
+		if ($config->signupForm)
37 37
 		{
38
-			foreach($config->signupForm as $formInfo)
38
+			foreach ($config->signupForm as $formInfo)
39 39
 			{
40
-				if($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired))
40
+				if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired))
41 41
 				{
42 42
 					$getVars[] = $formInfo->name;
43 43
 				}
44 44
 			}
45 45
 		}
46
-		foreach($getVars as $val)
46
+		foreach ($getVars as $val)
47 47
 		{
48 48
 			$args->{$val} = Context::get($val);
49 49
 		}
50 50
 		$args->member_srl = Context::get('member_srl');
51
-		if(Context::get('reset_password'))
51
+		if (Context::get('reset_password'))
52 52
 			$args->password = Context::get('reset_password');
53 53
 		else unset($args->password);
54 54
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		unset($all_args->error_return_url);
61 61
 		unset($all_args->success_return_url);
62 62
 		unset($all_args->ruleset);
63
-		if(!isset($args->limit_date)) $args->limit_date = "";
63
+		if (!isset($args->limit_date)) $args->limit_date = "";
64 64
 		unset($all_args->password);
65 65
 		unset($all_args->password2);
66 66
 		unset($all_args->reset_password);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		$extra_vars = delObjectVars($all_args, $args);
69 69
 		$args->extra_vars = serialize($extra_vars);
70 70
 		// Check if an original member exists having the member_srl
71
-		if($args->member_srl)
71
+		if ($args->member_srl)
72 72
 		{
73 73
 			// Create a member model object
74 74
 			$oMemberModel = getModel('member');
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
 			$columnList = array('member_srl');
77 77
 			$member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList);
78 78
 			// If no original member exists, make a new one
79
-			if($member_info->member_srl != $args->member_srl) unset($args->member_srl);
79
+			if ($member_info->member_srl != $args->member_srl) unset($args->member_srl);
80 80
 		}
81 81
 
82 82
 		// remove whitespace
83 83
 		$checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address');
84
-		foreach($checkInfos as $val)
84
+		foreach ($checkInfos as $val)
85 85
 		{
86
-			if(isset($args->{$val}))
86
+			if (isset($args->{$val}))
87 87
 			{
88 88
 				$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', $args->{$val});
89 89
 			}
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 		$oMemberController = getController('member');
93 93
 		// Execute insert or update depending on the value of member_srl
94
-		if(!$args->member_srl)
94
+		if (!$args->member_srl)
95 95
 		{
96 96
 			$args->password = Context::get('password');
97 97
 			$output = $oMemberController->insertMember($args);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 			$msg_code = 'success_updated';
104 104
 		}
105 105
 
106
-		if(!$output->toBool()) return $output;
106
+		if (!$output->toBool()) return $output;
107 107
 		// Save Signature
108 108
 		$signature = Context::get('signature');
109 109
 		$oMemberController->putSignature($args->member_srl, $signature);
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 		$this->setMessage($msg_code);
113 113
 
114 114
 		$profile_image = $_FILES['profile_image'];
115
-		if(is_uploaded_file($profile_image['tmp_name']))
115
+		if (is_uploaded_file($profile_image['tmp_name']))
116 116
 		{
117 117
 			$oMemberController->insertProfileImage($args->member_srl, $profile_image['tmp_name']);
118 118
 		}
119 119
 
120 120
 		$image_mark = $_FILES['image_mark'];
121
-		if(is_uploaded_file($image_mark['tmp_name']))
121
+		if (is_uploaded_file($image_mark['tmp_name']))
122 122
 		{
123 123
 			$oMemberController->insertImageMark($args->member_srl, $image_mark['tmp_name']);
124 124
 		}
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 
145 145
 		$oMemberController = getController('member');
146 146
 		$output = $oMemberController->deleteMember($member_srl);
147
-		if(!$output->toBool()) return $output;
147
+		if (!$output->toBool()) return $output;
148 148
 
149
-		$this->add('page',Context::get('page'));
149
+		$this->add('page', Context::get('page'));
150 150
 		$this->setMessage("success_deleted");
151 151
 	}
152 152
 
@@ -165,26 +165,26 @@  discard block
 block discarded – undo
165 165
 		);
166 166
 		
167 167
 		$oPassword = new Password();
168
-		if(!array_key_exists($args->password_hashing_algorithm, $oPassword->getSupportedAlgorithms()))
168
+		if (!array_key_exists($args->password_hashing_algorithm, $oPassword->getSupportedAlgorithms()))
169 169
 		{
170 170
 			$args->password_hashing_algorithm = 'md5';
171 171
 		}
172 172
 		
173 173
 		$args->password_hashing_work_factor = intval($args->password_hashing_work_factor, 10);
174
-		if($args->password_hashing_work_factor < 4)
174
+		if ($args->password_hashing_work_factor < 4)
175 175
 		{
176 176
 			$args->password_hashing_work_factor = 4;
177 177
 		}
178
-		if($args->password_hashing_work_factor > 16)
178
+		if ($args->password_hashing_work_factor > 16)
179 179
 		{
180 180
 			$args->password_hashing_work_factor = 16;
181 181
 		}
182
-		if($args->password_hashing_auto_upgrade != 'Y')
182
+		if ($args->password_hashing_auto_upgrade != 'Y')
183 183
 		{
184 184
 			$args->password_hashing_auto_upgrade = 'N';
185 185
 		}
186 186
 
187
-		if((!$args->webmaster_name || !$args->webmaster_email) && $args->enable_confirm == 'Y')
187
+		if ((!$args->webmaster_name || !$args->webmaster_email) && $args->enable_confirm == 'Y')
188 188
 		{
189 189
 			return new Object(-1, 'msg_mail_authorization');
190 190
 		}
@@ -219,20 +219,20 @@  discard block
 block discarded – undo
219 219
 		$usable_list = Context::get('usable_list');
220 220
 		$all_args = Context::getRequestVars();
221 221
 
222
-		$args->limit_day = (int)$args->limit_day;
223
-		if(!trim(strip_tags($args->agreement)))
222
+		$args->limit_day = (int) $args->limit_day;
223
+		if (!trim(strip_tags($args->agreement)))
224 224
 		{
225
-			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
225
+			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt';
226 226
 			FileHandler::removeFile($agreement_file);
227 227
 			$args->agreement = NULL;
228 228
 		}
229 229
 
230
-		if($args->redirect_url)
230
+		if ($args->redirect_url)
231 231
 		{
232 232
 			$oModuleModel = getModel('module');
233 233
 			$redirectModuleInfo = $oModuleModel->getModuleInfoByModuleSrl($args->redirect_url, array('mid'));
234 234
 
235
-			if(!$redirectModuleInfo)
235
+			if (!$redirectModuleInfo)
236 236
 			{
237 237
 				return new Object('-1', 'msg_exist_selected_module');
238 238
 			}
@@ -256,28 +256,28 @@  discard block
 block discarded – undo
256 256
 		$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark', 'profile_image_max_width', 'profile_image_max_height', 'image_name_max_width', 'image_name_max_height', 'image_mark_max_width', 'image_mark_max_height');
257 257
 		$mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question');
258 258
 		$extendItems = $oMemberModel->getJoinFormList();
259
-		foreach($list_order as $key)
259
+		foreach ($list_order as $key)
260 260
 		{
261 261
 			$signupItem = new stdClass();
262 262
 			$signupItem->isIdentifier = ($key == $all_args->identifier);
263 263
 			$signupItem->isDefaultForm = in_array($key, $items);
264 264
 
265 265
 			$signupItem->name = $key;
266
-			if(!in_array($key, $items)) $signupItem->title = $key;
266
+			if (!in_array($key, $items)) $signupItem->title = $key;
267 267
 			else $signupItem->title = $lang->{$key};
268 268
 			$signupItem->mustRequired = in_array($key, $mustRequireds);
269 269
 			$signupItem->imageType = (strpos($key, 'image') !== false);
270 270
 			$signupItem->required = ($all_args->{$key} == 'required') || $signupItem->mustRequired || $signupItem->isIdentifier;
271 271
 			$signupItem->isUse = in_array($key, $usable_list) || $signupItem->required;
272 272
 			$signupItem->isPublic = ($all_args->{'is_'.$key.'_public'} == 'Y' && $signupItem->isUse) ? 'Y' : 'N';
273
-			if($signupItem->imageType)
273
+			if ($signupItem->imageType)
274 274
 			{
275 275
 				$signupItem->max_width = $all_args->{$key.'_max_width'};
276 276
 				$signupItem->max_height = $all_args->{$key.'_max_height'};
277 277
 			}
278 278
 
279 279
 			// set extends form
280
-			if(!$signupItem->isDefaultForm)
280
+			if (!$signupItem->isDefaultForm)
281 281
 			{
282 282
 				$extendItem = $extendItems[$all_args->{$key.'_member_join_form_srl'}];
283 283
 				$signupItem->type = $extendItem->column_type;
@@ -286,13 +286,13 @@  discard block
 block discarded – undo
286 286
 				$signupItem->description = $extendItem->description;
287 287
 
288 288
 				// check usable value change, required/option
289
-				if($signupItem->isUse != ($extendItem->is_active == 'Y') || $signupItem->required != ($extendItem->required == 'Y'))
289
+				if ($signupItem->isUse != ($extendItem->is_active == 'Y') || $signupItem->required != ($extendItem->required == 'Y'))
290 290
 				{
291 291
 					unset($update_args);
292 292
 					$update_args = new stdClass;
293 293
 					$update_args->member_join_form_srl = $extendItem->member_join_form_srl;
294
-					$update_args->is_active = $signupItem->isUse?'Y':'N';
295
-					$update_args->required = $signupItem->required?'Y':'N';
294
+					$update_args->is_active = $signupItem->isUse ? 'Y' : 'N';
295
+					$update_args->required = $signupItem->required ? 'Y' : 'N';
296 296
 
297 297
 					$update_output = executeQuery('member.updateJoinForm', $update_args);
298 298
 				}
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 		$this->_createFindAccountByQuestion($args->identifier);
310 310
 
311 311
 		// check agreement value exist
312
-		if($args->agreement)
312
+		if ($args->agreement)
313 313
 		{
314
-			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
314
+			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt';
315 315
 			$output = FileHandler::writeFile($agreement_file, $args->agreement);
316 316
 
317 317
 			unset($args->agreement);
@@ -339,16 +339,16 @@  discard block
 block discarded – undo
339 339
 			'after_logout_url'
340 340
 		);
341 341
 
342
-		if(!$args->change_password_date)
342
+		if (!$args->change_password_date)
343 343
 		{
344 344
 			$args->change_password_date = 0;
345 345
 		}
346 346
 
347
-		if(!trim(strip_tags($args->after_login_url)))
347
+		if (!trim(strip_tags($args->after_login_url)))
348 348
 		{
349 349
 			$args->after_login_url = NULL;
350 350
 		}
351
-		if(!trim(strip_tags($args->after_logout_url)))
351
+		if (!trim(strip_tags($args->after_logout_url)))
352 352
 		{
353 353
 			$args->after_logout_url = NULL;
354 354
 		}
@@ -375,17 +375,17 @@  discard block
 block discarded – undo
375 375
 		);
376 376
 
377 377
 		$args->layout_srl = $args->layout_srl ? $args->layout_srl : NULL;
378
-		if(!$args->skin)
378
+		if (!$args->skin)
379 379
 		{
380 380
 			$args->skin = 'default';
381 381
 		}
382
-		if(!$args->colorset)
382
+		if (!$args->colorset)
383 383
 		{
384 384
 			$args->colorset = 'white';
385 385
 		}
386 386
 
387 387
 		$args->mlayout_srl = $args->mlayout_srl ? $args->mlayout_srl : NULL;
388
-		if(!$args->mskin)
388
+		if (!$args->mskin)
389 389
 		{
390 390
 			$args->mskin = 'default';
391 391
 		}
@@ -408,12 +408,12 @@  discard block
 block discarded – undo
408 408
 		$extendItems = $oMemberModel->getJoinFormList();
409 409
 
410 410
 		$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark');
411
-		$mustRequireds = array('email_address', 'nick_name','password', 'find_account_question');
411
+		$mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question');
412 412
 		$orgRequireds = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name');
413 413
 		$orgUse = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday');
414 414
 		$list_order = array();
415 415
 
416
-		foreach($items as $key)
416
+		foreach ($items as $key)
417 417
 		{
418 418
 			unset($signupItem);
419 419
 			$signupItem = new stdClass;
@@ -425,23 +425,23 @@  discard block
 block discarded – undo
425 425
 			$signupItem->required = in_array($key, $orgRequireds);
426 426
 			$signupItem->isUse = ($config->{$key} == 'Y') || in_array($key, $orgUse);
427 427
 			$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
428
-			if($key == 'find_account_question' || $key == 'password')
428
+			if ($key == 'find_account_question' || $key == 'password')
429 429
 			{
430 430
 				$signupItem->isPublic = 'N';
431 431
 			}
432 432
 			$signupItem->isIdentifier = ($key == $identifier);
433
-			if ($signupItem->imageType){
433
+			if ($signupItem->imageType) {
434 434
 				$signupItem->max_width = $config->{$key.'_max_width'};
435 435
 				$signupItem->max_height = $config->{$key.'_max_height'};
436 436
 			}
437
-			if($signupItem->isIdentifier)
437
+			if ($signupItem->isIdentifier)
438 438
 				array_unshift($list_order, $signupItem);
439 439
 			else
440 440
 				$list_order[] = $signupItem;
441 441
 		}
442
-		if(is_array($extendItems))
442
+		if (is_array($extendItems))
443 443
 		{
444
-			foreach($extendItems as $form_srl=>$item_info)
444
+			foreach ($extendItems as $form_srl=>$item_info)
445 445
 			{
446 446
 				unset($signupItem);
447 447
 				$signupItem = new stdClass;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 				$signupItem->isUse = ($item_info->is_active == 'Y');
455 455
 				$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
456 456
 				$signupItem->description = $item_info->description;
457
-				if($signupItem->imageType)
457
+				if ($signupItem->imageType)
458 458
 				{
459 459
 					$signupItem->max_width = $config->{$key.'_max_width'};
460 460
 					$signupItem->max_height = $config->{$key.'_max_height'};
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
 	 * @param string $agreement
473 473
 	 * @return void
474 474
 	 */
475
-	function _createSignupRuleset($signupForm, $agreement = null){
475
+	function _createSignupRuleset($signupForm, $agreement = null) {
476 476
 		$xml_file = './files/ruleset/insertMember.xml';
477
-		$buff = '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL.
478
-			'<ruleset version="1.5.0">' . PHP_EOL.
479
-			'<customrules>' . PHP_EOL.
480
-			'</customrules>' . PHP_EOL.
481
-			'<fields>' . PHP_EOL . '%s' . PHP_EOL . '</fields>' . PHP_EOL.
477
+		$buff = '<?xml version="1.0" encoding="utf-8"?>'.PHP_EOL.
478
+			'<ruleset version="1.5.0">'.PHP_EOL.
479
+			'<customrules>'.PHP_EOL.
480
+			'</customrules>'.PHP_EOL.
481
+			'<fields>'.PHP_EOL.'%s'.PHP_EOL.'</fields>'.PHP_EOL.
482 482
 			'</ruleset>';
483 483
 
484 484
 		$fields = array();
@@ -487,41 +487,41 @@  discard block
 block discarded – undo
487 487
 		{
488 488
 			$fields[] = '<field name="accept_agreement"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /></field>';
489 489
 		}
490
-		foreach($signupForm as $formInfo)
490
+		foreach ($signupForm as $formInfo)
491 491
 		{
492
-			if($formInfo->required || $formInfo->mustRequired)
492
+			if ($formInfo->required || $formInfo->mustRequired)
493 493
 			{
494
-				if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip')
494
+				if ($formInfo->type == 'tel' || $formInfo->type == 'kr_zip')
495 495
 				{
496 496
 					$fields[] = sprintf('<field name="%s[]" required="true" />', $formInfo->name);
497 497
 				}
498
-				else if($formInfo->name == 'password')
498
+				else if ($formInfo->name == 'password')
499 499
 				{
500 500
 					$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:60" /></field>';
501 501
 					$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
502 502
 				}
503
-				else if($formInfo->name == 'find_account_question')
503
+				else if ($formInfo->name == 'find_account_question')
504 504
 				{
505 505
 					$fields[] = '<field name="find_account_question"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
506 506
 					$fields[] = '<field name="find_account_answer" length=":250"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
507 507
 				}
508
-				else if($formInfo->name == 'email_address')
508
+				else if ($formInfo->name == 'email_address')
509 509
 				{
510 510
 					$fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name);
511 511
 				}
512
-				else if($formInfo->name == 'user_id')
512
+				else if ($formInfo->name == 'user_id')
513 513
 				{
514 514
 					$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
515 515
 				}
516
-				else if($formInfo->name == 'nick_name')
516
+				else if ($formInfo->name == 'nick_name')
517 517
 				{
518 518
 					$fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name);
519 519
 				}
520
-				else if(strpos($formInfo->name, 'image') !== false)
520
+				else if (strpos($formInfo->name, 'image') !== false)
521 521
 				{
522 522
 					$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' &amp;&amp; $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
523 523
 				}
524
-				else if($formInfo->name == 'signature')
524
+				else if ($formInfo->name == 'signature')
525 525
 				{
526 526
 					$fields[] = '<field name="signature"><if test="$member_srl" attr="required" value="true" /></field>';
527 527
 				}
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 		FileHandler::writeFile($xml_file, $xml_buff);
537 537
 		unset($xml_buff);
538 538
 
539
-		$validator   = new Validator($xml_file);
539
+		$validator = new Validator($xml_file);
540 540
 		$validator->setCacheDir('files/cache');
541 541
 		$validator->getJsPath();
542 542
 	}
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 		$xml_buff = sprintf($buff, implode('', $fields));
565 565
 		Filehandler::writeFile($xml_file, $xml_buff);
566 566
 
567
-		$validator   = new Validator($xml_file);
567
+		$validator = new Validator($xml_file);
568 568
 		$validator->setCacheDir('files/cache');
569 569
 		$validator->getJsPath();
570 570
 	}
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			'</ruleset>';
586 586
 
587 587
 		$fields = array();
588
-		if($identifier == 'user_id')
588
+		if ($identifier == 'user_id')
589 589
 			$fields[] = '<field name="user_id" required="true" rule="userid" />';
590 590
 
591 591
 		$fields[] = '<field name="email_address" required="true" rule="email" />';
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
 		$xml_buff = sprintf($buff, implode('', $fields));
596 596
 		Filehandler::writeFile($xml_file, $xml_buff);
597 597
 
598
-		$validator   = new Validator($xml_file);
598
+		$validator = new Validator($xml_file);
599 599
 		$validator->setCacheDir('files/cache');
600 600
 		$validator->getJsPath();
601 601
 	}
@@ -606,12 +606,12 @@  discard block
 block discarded – undo
606 606
 	 */
607 607
 	function procMemberAdminInsertGroup()
608 608
 	{
609
-		$args = Context::gets('title','description','is_default','image_mark');
609
+		$args = Context::gets('title', 'description', 'is_default', 'image_mark');
610 610
 		$output = $this->insertGroup($args);
611
-		if(!$output->toBool()) return $output;
611
+		if (!$output->toBool()) return $output;
612 612
 
613
-		$this->add('group_srl','');
614
-		$this->add('page',Context::get('page'));
613
+		$this->add('group_srl', '');
614
+		$this->add('page', Context::get('page'));
615 615
 		$this->setMessage('success_registed');
616 616
 
617 617
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
@@ -626,13 +626,13 @@  discard block
 block discarded – undo
626 626
 	{
627 627
 		$group_srl = Context::get('group_srl');
628 628
 
629
-		$args = Context::gets('group_srl','title','description','is_default','image_mark');
629
+		$args = Context::gets('group_srl', 'title', 'description', 'is_default', 'image_mark');
630 630
 		$args->site_srl = 0;
631 631
 		$output = $this->updateGroup($args);
632
-		if(!$output->toBool()) return $output;
632
+		if (!$output->toBool()) return $output;
633 633
 
634
-		$this->add('group_srl','');
635
-		$this->add('page',Context::get('page'));
634
+		$this->add('group_srl', '');
635
+		$this->add('page', Context::get('page'));
636 636
 		$this->setMessage('success_updated');
637 637
 
638 638
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
@@ -648,10 +648,10 @@  discard block
 block discarded – undo
648 648
 		$group_srl = Context::get('group_srl');
649 649
 
650 650
 		$output = $this->deleteGroup($group_srl);
651
-		if(!$output->toBool()) return $output;
651
+		if (!$output->toBool()) return $output;
652 652
 
653
-		$this->add('group_srl','');
654
-		$this->add('page',Context::get('page'));
653
+		$this->add('group_srl', '');
654
+		$this->add('page', Context::get('page'));
655 655
 		$this->setMessage('success_deleted');
656 656
 
657 657
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
@@ -673,10 +673,10 @@  discard block
 block discarded – undo
673 673
 		$args->default_value = explode("\n", str_replace("\r", '', Context::get('default_value')));
674 674
 		$args->required = Context::get('required');
675 675
 		$args->is_active = (isset($args->required));
676
-		if(!in_array(strtoupper($args->required), array('Y','N')))$args->required = 'N';
676
+		if (!in_array(strtoupper($args->required), array('Y', 'N')))$args->required = 'N';
677 677
 		$args->description = Context::get('description') ? Context::get('description') : '';
678 678
 		// Default values
679
-		if(in_array($args->column_type, array('checkbox','select','radio')) && count($args->default_value))
679
+		if (in_array($args->column_type, array('checkbox', 'select', 'radio')) && count($args->default_value))
680 680
 		{
681 681
 			$args->default_value = serialize($args->default_value);
682 682
 		}
@@ -688,17 +688,17 @@  discard block
 block discarded – undo
688 688
 		// Check ID duplicated
689 689
 		$oMemberModel = getModel('member');
690 690
 		$config = $oMemberModel->getMemberConfig();
691
-		foreach($config->signupForm as $item)
691
+		foreach ($config->signupForm as $item)
692 692
 		{
693
-			if($item->name == $args->column_name)
693
+			if ($item->name == $args->column_name)
694 694
 			{
695
-				if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue;
696
-				return new Object(-1,'msg_exists_user_id');
695
+				if ($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue;
696
+				return new Object(-1, 'msg_exists_user_id');
697 697
 			}
698 698
 		}
699 699
 		// Fix if member_join_form_srl exists. Add if not exists.
700 700
 		$isInsert;
701
-		if(!$args->member_join_form_srl)
701
+		if (!$args->member_join_form_srl)
702 702
 		{
703 703
 			$isInsert = true;
704 704
 			$args->list_order = $args->member_join_form_srl = getNextSequence();
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 			$output = executeQuery('member.updateJoinForm', $args);
710 710
 		}
711 711
 
712
-		if(!$output->toBool()) return $output;
712
+		if (!$output->toBool()) return $output;
713 713
 
714 714
 		// memberConfig update
715 715
 		$signupItem = new stdClass();
@@ -726,15 +726,15 @@  discard block
 block discarded – undo
726 726
 		$config = $oMemberModel->getMemberConfig();
727 727
 		unset($config->agreement);
728 728
 
729
-		if($isInsert)
729
+		if ($isInsert)
730 730
 		{
731 731
 			$config->signupForm[] = $signupItem;
732 732
 		}
733 733
 		else
734 734
 		{
735
-			foreach($config->signupForm as $key=>$val)
735
+			foreach ($config->signupForm as $key=>$val)
736 736
 			{
737
-				if($val->member_join_form_srl == $signupItem->member_join_form_srl)
737
+				if ($val->member_join_form_srl == $signupItem->member_join_form_srl)
738 738
 				{
739 739
 					$config->signupForm[$key] = $signupItem;
740 740
 				}
@@ -762,9 +762,9 @@  discard block
 block discarded – undo
762 762
 		$config = $oMemberModel->getMemberConfig();
763 763
 		unset($config->agreement);
764 764
 
765
-		foreach($config->signupForm as $key=>$val)
765
+		foreach ($config->signupForm as $key=>$val)
766 766
 		{
767
-			if($val->member_join_form_srl == $member_join_form_srl)
767
+			if ($val->member_join_form_srl == $member_join_form_srl)
768 768
 			{
769 769
 				unset($config->signupForm[$key]);
770 770
 				break;
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
 		$member_join_form_srl = Context::get('member_join_form_srl');
785 785
 		$mode = Context::get('mode');
786 786
 
787
-		switch($mode)
787
+		switch ($mode)
788 788
 		{
789 789
 			case 'up' :
790 790
 				$output = $this->moveJoinFormUp($member_join_form_srl);
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 			case 'update' :
802 802
 				break;
803 803
 		}
804
-		if(!$output->toBool()) return $output;
804
+		if (!$output->toBool()) return $output;
805 805
 
806 806
 		$this->setMessage($msg_code);
807 807
 	}
@@ -820,40 +820,40 @@  discard block
 block discarded – undo
820 820
 		$oDB->begin();
821 821
 
822 822
 		$oMemberController = getController('member');
823
-		foreach($members as $key=>$member_srl)
823
+		foreach ($members as $key=>$member_srl)
824 824
 		{
825 825
 			$args = new stdClass();
826 826
 			$args->member_srl = $member_srl;
827
-			switch($var->type)
827
+			switch ($var->type)
828 828
 			{
829 829
 				case 'modify':
830 830
 					{
831
-						if(count($groups) > 0)
831
+						if (count($groups) > 0)
832 832
 						{
833 833
 							$args->site_srl = 0;
834 834
 							// One of its members to delete all the group
835 835
 							$output = executeQuery('member.deleteMemberGroupMember', $args);
836
-							if(!$output->toBool())
836
+							if (!$output->toBool())
837 837
 							{
838 838
 								$oDB->rollback();
839 839
 								return $output;
840 840
 							}
841 841
 							// Enter one of the loop a
842
-							foreach($groups as $group_srl)
842
+							foreach ($groups as $group_srl)
843 843
 							{
844
-								$output = $oMemberController->addMemberToGroup($args->member_srl,$group_srl);
845
-								if(!$output->toBool())
844
+								$output = $oMemberController->addMemberToGroup($args->member_srl, $group_srl);
845
+								if (!$output->toBool())
846 846
 								{
847 847
 									$oDB->rollback();
848 848
 									return $output;
849 849
 								}
850 850
 							}
851 851
 						}
852
-						if($var->denied)
852
+						if ($var->denied)
853 853
 						{
854 854
 							$args->denied = $var->denied;
855 855
 							$output = executeQuery('member.updateMemberDeniedInfo', $args);
856
-							if(!$output->toBool())
856
+							if (!$output->toBool())
857 857
 							{
858 858
 								$oDB->rollback();
859 859
 								return $output;
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
 					{
867 867
 						$oMemberController->memberInfo = null;
868 868
 						$output = $oMemberController->deleteMember($member_srl);
869
-						if(!$output->toBool())
869
+						if (!$output->toBool())
870 870
 						{
871 871
 							$oDB->rollback();
872 872
 							return $output;
@@ -879,15 +879,15 @@  discard block
 block discarded – undo
879 879
 
880 880
 		$message = $var->message;
881 881
 		// Send a message
882
-		if($message)
882
+		if ($message)
883 883
 		{
884 884
 			$oCommunicationController = getController('communication');
885 885
 
886 886
 			$logged_info = Context::get('logged_info');
887
-			$title = cut_str($message,10,'...');
887
+			$title = cut_str($message, 10, '...');
888 888
 			$sender_member_srl = $logged_info->member_srl;
889 889
 
890
-			foreach($members as $member_srl)
890
+			foreach ($members as $member_srl)
891 891
 			{
892 892
 				$oCommunicationController->sendMessage($sender_member_srl, $member_srl, $title, $message, false);
893 893
 			}
@@ -904,14 +904,14 @@  discard block
 block discarded – undo
904 904
 	function procMemberAdminDeleteMembers()
905 905
 	{
906 906
 		$target_member_srls = Context::get('target_member_srls');
907
-		if(!$target_member_srls) return new Object(-1, 'msg_invalid_request');
907
+		if (!$target_member_srls) return new Object(-1, 'msg_invalid_request');
908 908
 		$member_srls = explode(',', $target_member_srls);
909 909
 		$oMemberController = getController('member');
910 910
 
911
-		foreach($member_srls as $member)
911
+		foreach ($member_srls as $member)
912 912
 		{
913 913
 			$output = $oMemberController->deleteMember($member);
914
-			if(!$output->toBool())
914
+			if (!$output->toBool())
915 915
 			{
916 916
 				$this->setMessage('failed_deleted');
917 917
 				return $output;
@@ -928,11 +928,11 @@  discard block
 block discarded – undo
928 928
 	function procMemberAdminUpdateMembersGroup()
929 929
 	{
930 930
 		$member_srl = Context::get('member_srl');
931
-		if(!$member_srl) return new Object(-1,'msg_invalid_request');
932
-		$member_srls = explode(',',$member_srl);
931
+		if (!$member_srl) return new Object(-1, 'msg_invalid_request');
932
+		$member_srls = explode(',', $member_srl);
933 933
 
934 934
 		$group_srl = Context::get('group_srls');
935
-		if(!is_array($group_srl)) $group_srls = explode('|@|', $group_srl);
935
+		if (!is_array($group_srl)) $group_srls = explode('|@|', $group_srl);
936 936
 		else $group_srls = $group_srl;
937 937
 
938 938
 		$oDB = &DB::getInstance();
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
 		$args = new stdClass;
942 942
 		$args->member_srl = $member_srl;
943 943
 		$output = executeQuery('member.deleteMembersGroup', $args);
944
-		if(!$output->toBool())
944
+		if (!$output->toBool())
945 945
 		{
946 946
 			$oDB->rollback();
947 947
 			return $output;
@@ -949,21 +949,21 @@  discard block
 block discarded – undo
949 949
 		// Add to a selected group
950 950
 		$group_count = count($group_srls);
951 951
 		$member_count = count($member_srls);
952
-		for($j=0;$j<$group_count;$j++)
952
+		for ($j = 0; $j < $group_count; $j++)
953 953
 		{
954
-			$group_srl = (int)trim($group_srls[$j]);
955
-			if(!$group_srl) continue;
956
-			for($i=0;$i<$member_count;$i++)
954
+			$group_srl = (int) trim($group_srls[$j]);
955
+			if (!$group_srl) continue;
956
+			for ($i = 0; $i < $member_count; $i++)
957 957
 			{
958
-				$member_srl = (int)trim($member_srls[$i]);
959
-				if(!$member_srl) continue;
958
+				$member_srl = (int) trim($member_srls[$i]);
959
+				if (!$member_srl) continue;
960 960
 
961 961
 				$args = new stdClass;
962 962
 				$args->member_srl = $member_srl;
963 963
 				$args->group_srl = $group_srl;
964 964
 
965 965
 				$output = executeQuery('member.addMemberToGroup', $args);
966
-				if(!$output->toBool())
966
+				if (!$output->toBool())
967 967
 				{
968 968
 					$oDB->rollback();
969 969
 					return $output;
@@ -976,7 +976,7 @@  discard block
 block discarded – undo
976 976
 
977 977
 		$this->setMessage('success_updated');
978 978
 
979
-		if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
979
+		if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON')))
980 980
 		{
981 981
 			global $lang;
982 982
 			htmlHeader();
@@ -997,19 +997,19 @@  discard block
 block discarded – undo
997 997
 	{
998 998
 		$user_ids = Context::get('user_id');
999 999
 
1000
-		$user_ids = explode(',',$user_ids);
1000
+		$user_ids = explode(',', $user_ids);
1001 1001
 		$success_ids = array();
1002 1002
 
1003
-		foreach($user_ids as $val)
1003
+		foreach ($user_ids as $val)
1004 1004
 		{
1005 1005
 			$val = trim($val);
1006
-			if(!$val) continue;
1006
+			if (!$val) continue;
1007 1007
 
1008 1008
 			$output = $this->insertDeniedID($val, '');
1009
-			if($output->toBool()) $success_ids[] = $val;
1009
+			if ($output->toBool()) $success_ids[] = $val;
1010 1010
 		}
1011 1011
 
1012
-		$this->add('user_ids', implode(',',$success_ids));
1012
+		$this->add('user_ids', implode(',', $success_ids));
1013 1013
 
1014 1014
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminDeniedIDList');
1015 1015
 		$this->setRedirectUrl($returnUrl);
@@ -1026,10 +1026,10 @@  discard block
 block discarded – undo
1026 1026
 		$mode = Context::get('mode');
1027 1027
 		$mode = $mode ? $mode : 'insert';
1028 1028
 
1029
-		if($mode == 'delete')
1029
+		if ($mode == 'delete')
1030 1030
 		{
1031 1031
 			$output = $this->deleteDeniedNickName($nick_name);
1032
-			if(!$output->toBool())
1032
+			if (!$output->toBool())
1033 1033
 			{
1034 1034
 				return $output;
1035 1035
 			}
@@ -1038,19 +1038,19 @@  discard block
 block discarded – undo
1038 1038
 		}
1039 1039
 		else
1040 1040
 		{
1041
-			$nick_names = explode(',',$nick_name);
1041
+			$nick_names = explode(',', $nick_name);
1042 1042
 			$success_nick_names = array();
1043 1043
 
1044
-			foreach($nick_names as $val)
1044
+			foreach ($nick_names as $val)
1045 1045
 			{
1046 1046
 				$val = trim($val);
1047
-				if(!$val) continue;
1047
+				if (!$val) continue;
1048 1048
 
1049 1049
 				$output = $this->insertDeniedNickName($val, '');
1050
-				if($output->toBool()) $success_nick_names[] = $val;
1050
+				if ($output->toBool()) $success_nick_names[] = $val;
1051 1051
 			}
1052 1052
 
1053
-			$this->add('nick_names', implode(',',$success_nick_names));
1053
+			$this->add('nick_names', implode(',', $success_nick_names));
1054 1054
 		}
1055 1055
 	}
1056 1056
 
@@ -1063,16 +1063,16 @@  discard block
 block discarded – undo
1063 1063
 		$user_id = Context::get('user_id');
1064 1064
 		$mode = Context::get('mode');
1065 1065
 
1066
-		switch($mode)
1066
+		switch ($mode)
1067 1067
 		{
1068 1068
 			case 'delete' :
1069 1069
 				$output = $this->deleteDeniedID($user_id);
1070
-				if(!$output->toBool()) return $output;
1070
+				if (!$output->toBool()) return $output;
1071 1071
 				$msg_code = 'success_deleted';
1072 1072
 				break;
1073 1073
 		}
1074 1074
 
1075
-		$this->add('page',Context::get('page'));
1075
+		$this->add('page', Context::get('page'));
1076 1076
 		$this->setMessage($msg_code);
1077 1077
 	}
1078 1078
 
@@ -1119,24 +1119,24 @@  discard block
 block discarded – undo
1119 1119
 	 */
1120 1120
 	function insertGroup($args)
1121 1121
 	{
1122
-		if(!$args->site_srl) $args->site_srl = 0;
1122
+		if (!$args->site_srl) $args->site_srl = 0;
1123 1123
 		// Check the value of is_default.
1124
-		if($args->is_default != 'Y')
1124
+		if ($args->is_default != 'Y')
1125 1125
 		{
1126 1126
 			$args->is_default = 'N';
1127 1127
 		}
1128 1128
 		else
1129 1129
 		{
1130 1130
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1131
-			if(!$output->toBool()) return $output;
1131
+			if (!$output->toBool()) return $output;
1132 1132
 		}
1133 1133
 
1134
-		if(!isset($args->list_order) || $args->list_order=='')
1134
+		if (!isset($args->list_order) || $args->list_order == '')
1135 1135
 		{
1136 1136
 			$args->list_order = $args->group_srl;
1137 1137
 		}
1138 1138
 
1139
-		if(!$args->group_srl) $args->group_srl = getNextSequence();
1139
+		if (!$args->group_srl) $args->group_srl = getNextSequence();
1140 1140
 		$args->list_order = $args->group_srl;
1141 1141
 		$output = executeQuery('member.insertGroup', $args);
1142 1142
 		$this->_deleteMemberGroupCache($args->site_srl);
@@ -1151,17 +1151,17 @@  discard block
 block discarded – undo
1151 1151
 	 */
1152 1152
 	function updateGroup($args)
1153 1153
 	{
1154
-		if(!$args->site_srl) $args->site_srl = 0;
1154
+		if (!$args->site_srl) $args->site_srl = 0;
1155 1155
 		// Check the value of is_default.
1156
-		if(!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
1157
-		if($args->is_default!='Y')
1156
+		if (!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
1157
+		if ($args->is_default != 'Y')
1158 1158
 		{
1159 1159
 			$args->is_default = 'N';
1160 1160
 		}
1161 1161
 		else
1162 1162
 		{
1163 1163
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1164
-			if(!$output->toBool()) return $output;
1164
+			if (!$output->toBool()) return $output;
1165 1165
 		}
1166 1166
 
1167 1167
 		$output = executeQuery('member.updateGroup', $args);
@@ -1184,8 +1184,8 @@  discard block
 block discarded – undo
1184 1184
 		$columnList = array('group_srl', 'is_default');
1185 1185
 		$group_info = $oMemberModel->getGroup($group_srl, $columnList);
1186 1186
 
1187
-		if(!$group_info) return new Object(-1, 'lang->msg_not_founded');
1188
-		if($group_info->is_default == 'Y') return new Object(-1, 'msg_not_delete_default');
1187
+		if (!$group_info) return new Object(-1, 'lang->msg_not_founded');
1188
+		if ($group_info->is_default == 'Y') return new Object(-1, 'msg_not_delete_default');
1189 1189
 
1190 1190
 		// Get groups where is_default == 'Y'
1191 1191
 		$columnList = array('site_srl', 'group_srl');
@@ -1222,7 +1222,7 @@  discard block
 block discarded – undo
1222 1222
 		$defaultGroup = $oMemberModel->getDefaultGroup(0);
1223 1223
 		$defaultGroupSrl = $defaultGroup->group_srl;
1224 1224
 		$group_srls = $vars->group_srls;
1225
-		foreach($group_srls as $order=>$group_srl)
1225
+		foreach ($group_srls as $order=>$group_srl)
1226 1226
 		{
1227 1227
 			$isInsert = false;
1228 1228
 			$update_args = new stdClass();
@@ -1231,9 +1231,9 @@  discard block
 block discarded – undo
1231 1231
 			$update_args->image_mark = $vars->image_marks[$order];
1232 1232
 			$update_args->list_order = $order + 1;
1233 1233
 
1234
-			if(!$update_args->title) continue;
1234
+			if (!$update_args->title) continue;
1235 1235
 
1236
-			if(is_numeric($group_srl)) {
1236
+			if (is_numeric($group_srl)) {
1237 1237
 				$update_args->group_srl = $group_srl;
1238 1238
 				$output = $this->updateGroup($update_args);
1239 1239
 			}
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 				$output = $this->insertGroup($update_args);
1243 1243
 			}
1244 1244
 
1245
-			if($vars->defaultGroup == $group_srl) {
1245
+			if ($vars->defaultGroup == $group_srl) {
1246 1246
 				$defaultGroupSrl = $update_args->group_srl;
1247 1247
 			}
1248 1248
 		}
@@ -1268,7 +1268,7 @@  discard block
 block discarded – undo
1268 1268
 	{
1269 1269
 		$vars = Context::getRequestVars();
1270 1270
 
1271
-		foreach($vars->group_srls as $key => $val)
1271
+		foreach ($vars->group_srls as $key => $val)
1272 1272
 		{
1273 1273
 			$args = new stdClass;
1274 1274
 			$args->group_srl = $val;
@@ -1289,7 +1289,7 @@  discard block
 block discarded – undo
1289 1289
 	{
1290 1290
 		//remove from cache
1291 1291
 		$oCacheHandler = CacheHandler::getInstance('object', null, true);
1292
-		if($oCacheHandler->isSupport())
1292
+		if ($oCacheHandler->isSupport())
1293 1293
 		{
1294 1294
 			$oCacheHandler->invalidateGroupKey('member');
1295 1295
 		}
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
 		$args = new stdClass();
1307 1307
 		$args->user_id = $user_id;
1308 1308
 		$args->description = $description;
1309
-		$args->list_order = -1*getNextSequence();
1309
+		$args->list_order = -1 * getNextSequence();
1310 1310
 
1311 1311
 		return executeQuery('member.insertDeniedID', $args);
1312 1312
 	}
@@ -1327,7 +1327,7 @@  discard block
 block discarded – undo
1327 1327
 	 */
1328 1328
 	function deleteDeniedID($user_id)
1329 1329
 	{
1330
-		if(!$user_id) unset($user_id);
1330
+		if (!$user_id) unset($user_id);
1331 1331
 
1332 1332
 		$args = new stdClass;
1333 1333
 		$args->user_id = $user_id;
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
 	 */
1342 1342
 	function deleteDeniedNickName($nick_name)
1343 1343
 	{
1344
-		if(!$nick_name) unset($nick_name);
1344
+		if (!$nick_name) unset($nick_name);
1345 1345
 
1346 1346
 		$args = new stdClass;
1347 1347
 		$args->nick_name = $nick_name;
@@ -1380,16 +1380,16 @@  discard block
 block discarded – undo
1380 1380
 		// Get a list of all join forms
1381 1381
 		$join_form_list = $oMemberModel->getJoinFormList();
1382 1382
 		$join_form_srl_list = array_keys($join_form_list);
1383
-		if(count($join_form_srl_list)<2) return new Object();
1383
+		if (count($join_form_srl_list) < 2) return new Object();
1384 1384
 
1385 1385
 		$prev_member_join_form = NULL;
1386
-		foreach($join_form_list as $key => $val)
1386
+		foreach ($join_form_list as $key => $val)
1387 1387
 		{
1388
-			if($val->member_join_form_srl == $member_join_form_srl) break;
1388
+			if ($val->member_join_form_srl == $member_join_form_srl) break;
1389 1389
 			$prev_member_join_form = $val;
1390 1390
 		}
1391 1391
 		// Return if no previous join form exists
1392
-		if(!$prev_member_join_form) return new Object();
1392
+		if (!$prev_member_join_form) return new Object();
1393 1393
 		// Information of the join form
1394 1394
 		$cur_args = new stdClass;
1395 1395
 		$cur_args->member_join_form_srl = $member_join_form_srl;
@@ -1400,10 +1400,10 @@  discard block
 block discarded – undo
1400 1400
 		$prev_args->list_order = $list_order;
1401 1401
 		// Execute Query
1402 1402
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1403
-		if(!$output->toBool()) return $output;
1403
+		if (!$output->toBool()) return $output;
1404 1404
 
1405 1405
 		executeQuery('member.updateMemberJoinFormListorder', $prev_args);
1406
-		if(!$output->toBool()) return $output;
1406
+		if (!$output->toBool()) return $output;
1407 1407
 
1408 1408
 		return new Object();
1409 1409
 	}
@@ -1427,16 +1427,16 @@  discard block
 block discarded – undo
1427 1427
 		// Get information of all join forms
1428 1428
 		$join_form_list = $oMemberModel->getJoinFormList();
1429 1429
 		$join_form_srl_list = array_keys($join_form_list);
1430
-		if(count($join_form_srl_list)<2) return new Object();
1430
+		if (count($join_form_srl_list) < 2) return new Object();
1431 1431
 
1432
-		for($i=0;$i<count($join_form_srl_list);$i++)
1432
+		for ($i = 0; $i < count($join_form_srl_list); $i++)
1433 1433
 		{
1434
-			if($join_form_srl_list[$i]==$member_join_form_srl) break;
1434
+			if ($join_form_srl_list[$i] == $member_join_form_srl) break;
1435 1435
 		}
1436 1436
 
1437
-		$next_member_join_form_srl = $join_form_srl_list[$i+1];
1437
+		$next_member_join_form_srl = $join_form_srl_list[$i + 1];
1438 1438
 		// Return if no previous join form exists
1439
-		if(!$next_member_join_form_srl) return new Object();
1439
+		if (!$next_member_join_form_srl) return new Object();
1440 1440
 		$next_member_join_form = $join_form_list[$next_member_join_form_srl];
1441 1441
 		// Information of the join form
1442 1442
 		$cur_args = new stdClass;
@@ -1448,10 +1448,10 @@  discard block
 block discarded – undo
1448 1448
 		$next_args->list_order = $list_order;
1449 1449
 		// Execute Query
1450 1450
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1451
-		if(!$output->toBool()) return $output;
1451
+		if (!$output->toBool()) return $output;
1452 1452
 
1453 1453
 		$output = executeQuery('member.updateMemberJoinFormListorder', $next_args);
1454
-		if(!$output->toBool()) return $output;
1454
+		if (!$output->toBool()) return $output;
1455 1455
 
1456 1456
 		return new Object();
1457 1457
 	}
Please login to merge, or discard this patch.
Braces   +162 added lines, -86 removed lines patch added patch discarded remove patch
@@ -48,9 +48,11 @@  discard block
 block discarded – undo
48 48
 			$args->{$val} = Context::get($val);
49 49
 		}
50 50
 		$args->member_srl = Context::get('member_srl');
51
-		if(Context::get('reset_password'))
52
-			$args->password = Context::get('reset_password');
53
-		else unset($args->password);
51
+		if(Context::get('reset_password')) {
52
+					$args->password = Context::get('reset_password');
53
+		} else {
54
+			unset($args->password);
55
+		}
54 56
 
55 57
 		// Remove some unnecessary variables from all the vars
56 58
 		$all_args = Context::getRequestVars();
@@ -60,7 +62,9 @@  discard block
 block discarded – undo
60 62
 		unset($all_args->error_return_url);
61 63
 		unset($all_args->success_return_url);
62 64
 		unset($all_args->ruleset);
63
-		if(!isset($args->limit_date)) $args->limit_date = "";
65
+		if(!isset($args->limit_date)) {
66
+			$args->limit_date = "";
67
+		}
64 68
 		unset($all_args->password);
65 69
 		unset($all_args->password2);
66 70
 		unset($all_args->reset_password);
@@ -76,7 +80,9 @@  discard block
 block discarded – undo
76 80
 			$columnList = array('member_srl');
77 81
 			$member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList);
78 82
 			// If no original member exists, make a new one
79
-			if($member_info->member_srl != $args->member_srl) unset($args->member_srl);
83
+			if($member_info->member_srl != $args->member_srl) {
84
+				unset($args->member_srl);
85
+			}
80 86
 		}
81 87
 
82 88
 		// remove whitespace
@@ -96,14 +102,15 @@  discard block
 block discarded – undo
96 102
 			$args->password = Context::get('password');
97 103
 			$output = $oMemberController->insertMember($args);
98 104
 			$msg_code = 'success_registed';
99
-		}
100
-		else
105
+		} else
101 106
 		{
102 107
 			$output = $oMemberController->updateMember($args);
103 108
 			$msg_code = 'success_updated';
104 109
 		}
105 110
 
106
-		if(!$output->toBool()) return $output;
111
+		if(!$output->toBool()) {
112
+			return $output;
113
+		}
107 114
 		// Save Signature
108 115
 		$signature = Context::get('signature');
109 116
 		$oMemberController->putSignature($args->member_srl, $signature);
@@ -144,7 +151,9 @@  discard block
 block discarded – undo
144 151
 
145 152
 		$oMemberController = getController('member');
146 153
 		$output = $oMemberController->deleteMember($member_srl);
147
-		if(!$output->toBool()) return $output;
154
+		if(!$output->toBool()) {
155
+			return $output;
156
+		}
148 157
 
149 158
 		$this->add('page',Context::get('page'));
150 159
 		$this->setMessage("success_deleted");
@@ -263,8 +272,11 @@  discard block
 block discarded – undo
263 272
 			$signupItem->isDefaultForm = in_array($key, $items);
264 273
 
265 274
 			$signupItem->name = $key;
266
-			if(!in_array($key, $items)) $signupItem->title = $key;
267
-			else $signupItem->title = $lang->{$key};
275
+			if(!in_array($key, $items)) {
276
+				$signupItem->title = $key;
277
+			} else {
278
+				$signupItem->title = $lang->{$key};
279
+			}
268 280
 			$signupItem->mustRequired = in_array($key, $mustRequireds);
269 281
 			$signupItem->imageType = (strpos($key, 'image') !== false);
270 282
 			$signupItem->required = ($all_args->{$key} == 'required') || $signupItem->mustRequired || $signupItem->isIdentifier;
@@ -434,10 +446,11 @@  discard block
 block discarded – undo
434 446
 				$signupItem->max_width = $config->{$key.'_max_width'};
435 447
 				$signupItem->max_height = $config->{$key.'_max_height'};
436 448
 			}
437
-			if($signupItem->isIdentifier)
438
-				array_unshift($list_order, $signupItem);
439
-			else
440
-				$list_order[] = $signupItem;
449
+			if($signupItem->isIdentifier) {
450
+							array_unshift($list_order, $signupItem);
451
+			} else {
452
+							$list_order[] = $signupItem;
453
+			}
441 454
 		}
442 455
 		if(is_array($extendItems))
443 456
 		{
@@ -494,38 +507,30 @@  discard block
 block discarded – undo
494 507
 				if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip')
495 508
 				{
496 509
 					$fields[] = sprintf('<field name="%s[]" required="true" />', $formInfo->name);
497
-				}
498
-				else if($formInfo->name == 'password')
510
+				} else if($formInfo->name == 'password')
499 511
 				{
500 512
 					$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:60" /></field>';
501 513
 					$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
502
-				}
503
-				else if($formInfo->name == 'find_account_question')
514
+				} else if($formInfo->name == 'find_account_question')
504 515
 				{
505 516
 					$fields[] = '<field name="find_account_question"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
506 517
 					$fields[] = '<field name="find_account_answer" length=":250"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
507
-				}
508
-				else if($formInfo->name == 'email_address')
518
+				} else if($formInfo->name == 'email_address')
509 519
 				{
510 520
 					$fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name);
511
-				}
512
-				else if($formInfo->name == 'user_id')
521
+				} else if($formInfo->name == 'user_id')
513 522
 				{
514 523
 					$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
515
-				}
516
-				else if($formInfo->name == 'nick_name')
524
+				} else if($formInfo->name == 'nick_name')
517 525
 				{
518 526
 					$fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name);
519
-				}
520
-				else if(strpos($formInfo->name, 'image') !== false)
527
+				} else if(strpos($formInfo->name, 'image') !== false)
521 528
 				{
522 529
 					$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' &amp;&amp; $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
523
-				}
524
-				else if($formInfo->name == 'signature')
530
+				} else if($formInfo->name == 'signature')
525 531
 				{
526 532
 					$fields[] = '<field name="signature"><if test="$member_srl" attr="required" value="true" /></field>';
527
-				}
528
-				else
533
+				} else
529 534
 				{
530 535
 					$fields[] = sprintf('<field name="%s" required="true" />', $formInfo->name);
531 536
 				}
@@ -585,8 +590,9 @@  discard block
 block discarded – undo
585 590
 			'</ruleset>';
586 591
 
587 592
 		$fields = array();
588
-		if($identifier == 'user_id')
589
-			$fields[] = '<field name="user_id" required="true" rule="userid" />';
593
+		if($identifier == 'user_id') {
594
+					$fields[] = '<field name="user_id" required="true" rule="userid" />';
595
+		}
590 596
 
591 597
 		$fields[] = '<field name="email_address" required="true" rule="email" />';
592 598
 		$fields[] = '<field name="find_account_question" required="true" />';
@@ -608,7 +614,9 @@  discard block
 block discarded – undo
608 614
 	{
609 615
 		$args = Context::gets('title','description','is_default','image_mark');
610 616
 		$output = $this->insertGroup($args);
611
-		if(!$output->toBool()) return $output;
617
+		if(!$output->toBool()) {
618
+			return $output;
619
+		}
612 620
 
613 621
 		$this->add('group_srl','');
614 622
 		$this->add('page',Context::get('page'));
@@ -629,7 +637,9 @@  discard block
 block discarded – undo
629 637
 		$args = Context::gets('group_srl','title','description','is_default','image_mark');
630 638
 		$args->site_srl = 0;
631 639
 		$output = $this->updateGroup($args);
632
-		if(!$output->toBool()) return $output;
640
+		if(!$output->toBool()) {
641
+			return $output;
642
+		}
633 643
 
634 644
 		$this->add('group_srl','');
635 645
 		$this->add('page',Context::get('page'));
@@ -648,7 +658,9 @@  discard block
 block discarded – undo
648 658
 		$group_srl = Context::get('group_srl');
649 659
 
650 660
 		$output = $this->deleteGroup($group_srl);
651
-		if(!$output->toBool()) return $output;
661
+		if(!$output->toBool()) {
662
+			return $output;
663
+		}
652 664
 
653 665
 		$this->add('group_srl','');
654 666
 		$this->add('page',Context::get('page'));
@@ -673,14 +685,15 @@  discard block
 block discarded – undo
673 685
 		$args->default_value = explode("\n", str_replace("\r", '', Context::get('default_value')));
674 686
 		$args->required = Context::get('required');
675 687
 		$args->is_active = (isset($args->required));
676
-		if(!in_array(strtoupper($args->required), array('Y','N')))$args->required = 'N';
688
+		if(!in_array(strtoupper($args->required), array('Y','N'))) {
689
+			$args->required = 'N';
690
+		}
677 691
 		$args->description = Context::get('description') ? Context::get('description') : '';
678 692
 		// Default values
679 693
 		if(in_array($args->column_type, array('checkbox','select','radio')) && count($args->default_value))
680 694
 		{
681 695
 			$args->default_value = serialize($args->default_value);
682
-		}
683
-		else
696
+		} else
684 697
 		{
685 698
 			$args->default_value = '';
686 699
 		}
@@ -692,7 +705,9 @@  discard block
 block discarded – undo
692 705
 		{
693 706
 			if($item->name == $args->column_name)
694 707
 			{
695
-				if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue;
708
+				if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) {
709
+					continue;
710
+				}
696 711
 				return new Object(-1,'msg_exists_user_id');
697 712
 			}
698 713
 		}
@@ -703,13 +718,14 @@  discard block
 block discarded – undo
703 718
 			$isInsert = true;
704 719
 			$args->list_order = $args->member_join_form_srl = getNextSequence();
705 720
 			$output = executeQuery('member.insertJoinForm', $args);
706
-		}
707
-		else
721
+		} else
708 722
 		{
709 723
 			$output = executeQuery('member.updateJoinForm', $args);
710 724
 		}
711 725
 
712
-		if(!$output->toBool()) return $output;
726
+		if(!$output->toBool()) {
727
+			return $output;
728
+		}
713 729
 
714 730
 		// memberConfig update
715 731
 		$signupItem = new stdClass();
@@ -729,8 +745,7 @@  discard block
 block discarded – undo
729 745
 		if($isInsert)
730 746
 		{
731 747
 			$config->signupForm[] = $signupItem;
732
-		}
733
-		else
748
+		} else
734 749
 		{
735 750
 			foreach($config->signupForm as $key=>$val)
736 751
 			{
@@ -801,7 +816,9 @@  discard block
 block discarded – undo
801 816
 			case 'update' :
802 817
 				break;
803 818
 		}
804
-		if(!$output->toBool()) return $output;
819
+		if(!$output->toBool()) {
820
+			return $output;
821
+		}
805 822
 
806 823
 		$this->setMessage($msg_code);
807 824
 	}
@@ -904,7 +921,9 @@  discard block
 block discarded – undo
904 921
 	function procMemberAdminDeleteMembers()
905 922
 	{
906 923
 		$target_member_srls = Context::get('target_member_srls');
907
-		if(!$target_member_srls) return new Object(-1, 'msg_invalid_request');
924
+		if(!$target_member_srls) {
925
+			return new Object(-1, 'msg_invalid_request');
926
+		}
908 927
 		$member_srls = explode(',', $target_member_srls);
909 928
 		$oMemberController = getController('member');
910 929
 
@@ -928,12 +947,17 @@  discard block
 block discarded – undo
928 947
 	function procMemberAdminUpdateMembersGroup()
929 948
 	{
930 949
 		$member_srl = Context::get('member_srl');
931
-		if(!$member_srl) return new Object(-1,'msg_invalid_request');
950
+		if(!$member_srl) {
951
+			return new Object(-1,'msg_invalid_request');
952
+		}
932 953
 		$member_srls = explode(',',$member_srl);
933 954
 
934 955
 		$group_srl = Context::get('group_srls');
935
-		if(!is_array($group_srl)) $group_srls = explode('|@|', $group_srl);
936
-		else $group_srls = $group_srl;
956
+		if(!is_array($group_srl)) {
957
+			$group_srls = explode('|@|', $group_srl);
958
+		} else {
959
+			$group_srls = $group_srl;
960
+		}
937 961
 
938 962
 		$oDB = &DB::getInstance();
939 963
 		$oDB->begin();
@@ -952,11 +976,15 @@  discard block
 block discarded – undo
952 976
 		for($j=0;$j<$group_count;$j++)
953 977
 		{
954 978
 			$group_srl = (int)trim($group_srls[$j]);
955
-			if(!$group_srl) continue;
979
+			if(!$group_srl) {
980
+				continue;
981
+			}
956 982
 			for($i=0;$i<$member_count;$i++)
957 983
 			{
958 984
 				$member_srl = (int)trim($member_srls[$i]);
959
-				if(!$member_srl) continue;
985
+				if(!$member_srl) {
986
+					continue;
987
+				}
960 988
 
961 989
 				$args = new stdClass;
962 990
 				$args->member_srl = $member_srl;
@@ -1003,10 +1031,14 @@  discard block
 block discarded – undo
1003 1031
 		foreach($user_ids as $val)
1004 1032
 		{
1005 1033
 			$val = trim($val);
1006
-			if(!$val) continue;
1034
+			if(!$val) {
1035
+				continue;
1036
+			}
1007 1037
 
1008 1038
 			$output = $this->insertDeniedID($val, '');
1009
-			if($output->toBool()) $success_ids[] = $val;
1039
+			if($output->toBool()) {
1040
+				$success_ids[] = $val;
1041
+			}
1010 1042
 		}
1011 1043
 
1012 1044
 		$this->add('user_ids', implode(',',$success_ids));
@@ -1035,8 +1067,7 @@  discard block
 block discarded – undo
1035 1067
 			}
1036 1068
 			$msg_code = 'success_deleted';
1037 1069
 			$this->setMessage($msg_code);
1038
-		}
1039
-		else
1070
+		} else
1040 1071
 		{
1041 1072
 			$nick_names = explode(',',$nick_name);
1042 1073
 			$success_nick_names = array();
@@ -1044,10 +1075,14 @@  discard block
 block discarded – undo
1044 1075
 			foreach($nick_names as $val)
1045 1076
 			{
1046 1077
 				$val = trim($val);
1047
-				if(!$val) continue;
1078
+				if(!$val) {
1079
+					continue;
1080
+				}
1048 1081
 
1049 1082
 				$output = $this->insertDeniedNickName($val, '');
1050
-				if($output->toBool()) $success_nick_names[] = $val;
1083
+				if($output->toBool()) {
1084
+					$success_nick_names[] = $val;
1085
+				}
1051 1086
 			}
1052 1087
 
1053 1088
 			$this->add('nick_names', implode(',',$success_nick_names));
@@ -1067,7 +1102,9 @@  discard block
 block discarded – undo
1067 1102
 		{
1068 1103
 			case 'delete' :
1069 1104
 				$output = $this->deleteDeniedID($user_id);
1070
-				if(!$output->toBool()) return $output;
1105
+				if(!$output->toBool()) {
1106
+					return $output;
1107
+				}
1071 1108
 				$msg_code = 'success_deleted';
1072 1109
 				break;
1073 1110
 		}
@@ -1119,16 +1156,19 @@  discard block
 block discarded – undo
1119 1156
 	 */
1120 1157
 	function insertGroup($args)
1121 1158
 	{
1122
-		if(!$args->site_srl) $args->site_srl = 0;
1159
+		if(!$args->site_srl) {
1160
+			$args->site_srl = 0;
1161
+		}
1123 1162
 		// Check the value of is_default.
1124 1163
 		if($args->is_default != 'Y')
1125 1164
 		{
1126 1165
 			$args->is_default = 'N';
1127
-		}
1128
-		else
1166
+		} else
1129 1167
 		{
1130 1168
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1131
-			if(!$output->toBool()) return $output;
1169
+			if(!$output->toBool()) {
1170
+				return $output;
1171
+			}
1132 1172
 		}
1133 1173
 
1134 1174
 		if(!isset($args->list_order) || $args->list_order=='')
@@ -1136,7 +1176,9 @@  discard block
 block discarded – undo
1136 1176
 			$args->list_order = $args->group_srl;
1137 1177
 		}
1138 1178
 
1139
-		if(!$args->group_srl) $args->group_srl = getNextSequence();
1179
+		if(!$args->group_srl) {
1180
+			$args->group_srl = getNextSequence();
1181
+		}
1140 1182
 		$args->list_order = $args->group_srl;
1141 1183
 		$output = executeQuery('member.insertGroup', $args);
1142 1184
 		$this->_deleteMemberGroupCache($args->site_srl);
@@ -1151,17 +1193,22 @@  discard block
 block discarded – undo
1151 1193
 	 */
1152 1194
 	function updateGroup($args)
1153 1195
 	{
1154
-		if(!$args->site_srl) $args->site_srl = 0;
1196
+		if(!$args->site_srl) {
1197
+			$args->site_srl = 0;
1198
+		}
1155 1199
 		// Check the value of is_default.
1156
-		if(!$args->group_srl) return new Object(-1, 'lang->msg_not_founded');
1200
+		if(!$args->group_srl) {
1201
+			return new Object(-1, 'lang->msg_not_founded');
1202
+		}
1157 1203
 		if($args->is_default!='Y')
1158 1204
 		{
1159 1205
 			$args->is_default = 'N';
1160
-		}
1161
-		else
1206
+		} else
1162 1207
 		{
1163 1208
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1164
-			if(!$output->toBool()) return $output;
1209
+			if(!$output->toBool()) {
1210
+				return $output;
1211
+			}
1165 1212
 		}
1166 1213
 
1167 1214
 		$output = executeQuery('member.updateGroup', $args);
@@ -1184,8 +1231,12 @@  discard block
 block discarded – undo
1184 1231
 		$columnList = array('group_srl', 'is_default');
1185 1232
 		$group_info = $oMemberModel->getGroup($group_srl, $columnList);
1186 1233
 
1187
-		if(!$group_info) return new Object(-1, 'lang->msg_not_founded');
1188
-		if($group_info->is_default == 'Y') return new Object(-1, 'msg_not_delete_default');
1234
+		if(!$group_info) {
1235
+			return new Object(-1, 'lang->msg_not_founded');
1236
+		}
1237
+		if($group_info->is_default == 'Y') {
1238
+			return new Object(-1, 'msg_not_delete_default');
1239
+		}
1189 1240
 
1190 1241
 		// Get groups where is_default == 'Y'
1191 1242
 		$columnList = array('site_srl', 'group_srl');
@@ -1231,13 +1282,14 @@  discard block
 block discarded – undo
1231 1282
 			$update_args->image_mark = $vars->image_marks[$order];
1232 1283
 			$update_args->list_order = $order + 1;
1233 1284
 
1234
-			if(!$update_args->title) continue;
1285
+			if(!$update_args->title) {
1286
+				continue;
1287
+			}
1235 1288
 
1236 1289
 			if(is_numeric($group_srl)) {
1237 1290
 				$update_args->group_srl = $group_srl;
1238 1291
 				$output = $this->updateGroup($update_args);
1239
-			}
1240
-			else {
1292
+			} else {
1241 1293
 				$update_args->group_srl = getNextSequence();
1242 1294
 				$output = $this->insertGroup($update_args);
1243 1295
 			}
@@ -1327,7 +1379,9 @@  discard block
 block discarded – undo
1327 1379
 	 */
1328 1380
 	function deleteDeniedID($user_id)
1329 1381
 	{
1330
-		if(!$user_id) unset($user_id);
1382
+		if(!$user_id) {
1383
+			unset($user_id);
1384
+		}
1331 1385
 
1332 1386
 		$args = new stdClass;
1333 1387
 		$args->user_id = $user_id;
@@ -1341,7 +1395,9 @@  discard block
 block discarded – undo
1341 1395
 	 */
1342 1396
 	function deleteDeniedNickName($nick_name)
1343 1397
 	{
1344
-		if(!$nick_name) unset($nick_name);
1398
+		if(!$nick_name) {
1399
+			unset($nick_name);
1400
+		}
1345 1401
 
1346 1402
 		$args = new stdClass;
1347 1403
 		$args->nick_name = $nick_name;
@@ -1380,16 +1436,22 @@  discard block
 block discarded – undo
1380 1436
 		// Get a list of all join forms
1381 1437
 		$join_form_list = $oMemberModel->getJoinFormList();
1382 1438
 		$join_form_srl_list = array_keys($join_form_list);
1383
-		if(count($join_form_srl_list)<2) return new Object();
1439
+		if(count($join_form_srl_list)<2) {
1440
+			return new Object();
1441
+		}
1384 1442
 
1385 1443
 		$prev_member_join_form = NULL;
1386 1444
 		foreach($join_form_list as $key => $val)
1387 1445
 		{
1388
-			if($val->member_join_form_srl == $member_join_form_srl) break;
1446
+			if($val->member_join_form_srl == $member_join_form_srl) {
1447
+				break;
1448
+			}
1389 1449
 			$prev_member_join_form = $val;
1390 1450
 		}
1391 1451
 		// Return if no previous join form exists
1392
-		if(!$prev_member_join_form) return new Object();
1452
+		if(!$prev_member_join_form) {
1453
+			return new Object();
1454
+		}
1393 1455
 		// Information of the join form
1394 1456
 		$cur_args = new stdClass;
1395 1457
 		$cur_args->member_join_form_srl = $member_join_form_srl;
@@ -1400,10 +1462,14 @@  discard block
 block discarded – undo
1400 1462
 		$prev_args->list_order = $list_order;
1401 1463
 		// Execute Query
1402 1464
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1403
-		if(!$output->toBool()) return $output;
1465
+		if(!$output->toBool()) {
1466
+			return $output;
1467
+		}
1404 1468
 
1405 1469
 		executeQuery('member.updateMemberJoinFormListorder', $prev_args);
1406
-		if(!$output->toBool()) return $output;
1470
+		if(!$output->toBool()) {
1471
+			return $output;
1472
+		}
1407 1473
 
1408 1474
 		return new Object();
1409 1475
 	}
@@ -1427,16 +1493,22 @@  discard block
 block discarded – undo
1427 1493
 		// Get information of all join forms
1428 1494
 		$join_form_list = $oMemberModel->getJoinFormList();
1429 1495
 		$join_form_srl_list = array_keys($join_form_list);
1430
-		if(count($join_form_srl_list)<2) return new Object();
1496
+		if(count($join_form_srl_list)<2) {
1497
+			return new Object();
1498
+		}
1431 1499
 
1432 1500
 		for($i=0;$i<count($join_form_srl_list);$i++)
1433 1501
 		{
1434
-			if($join_form_srl_list[$i]==$member_join_form_srl) break;
1502
+			if($join_form_srl_list[$i]==$member_join_form_srl) {
1503
+				break;
1504
+			}
1435 1505
 		}
1436 1506
 
1437 1507
 		$next_member_join_form_srl = $join_form_srl_list[$i+1];
1438 1508
 		// Return if no previous join form exists
1439
-		if(!$next_member_join_form_srl) return new Object();
1509
+		if(!$next_member_join_form_srl) {
1510
+			return new Object();
1511
+		}
1440 1512
 		$next_member_join_form = $join_form_list[$next_member_join_form_srl];
1441 1513
 		// Information of the join form
1442 1514
 		$cur_args = new stdClass;
@@ -1448,10 +1520,14 @@  discard block
 block discarded – undo
1448 1520
 		$next_args->list_order = $list_order;
1449 1521
 		// Execute Query
1450 1522
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1451
-		if(!$output->toBool()) return $output;
1523
+		if(!$output->toBool()) {
1524
+			return $output;
1525
+		}
1452 1526
 
1453 1527
 		$output = executeQuery('member.updateMemberJoinFormListorder', $next_args);
1454
-		if(!$output->toBool()) return $output;
1528
+		if(!$output->toBool()) {
1529
+			return $output;
1530
+		}
1455 1531
 
1456 1532
 		return new Object();
1457 1533
 	}
Please login to merge, or discard this patch.