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
Pull Request — develop (#1814)
by
unknown
11:57
created
modules/layout/layout.class.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -27,27 +27,27 @@  discard block
 block discarded – undo
27 27
 	{
28 28
 		$oDB = &DB::getInstance();
29 29
 		// 2009. 02. 11 Add site_srl to layout table
30
-		if(!$oDB->isColumnExists('layouts', 'site_srl')) return true;
30
+		if (!$oDB->isColumnExists('layouts', 'site_srl')) return true;
31 31
 		// 2009. 02. 26 Move the previous layout for faceoff
32 32
 		$files = FileHandler::readDir('./files/cache/layout');
33
-		for($i=0,$c=count($files);$i<$c;$i++)
33
+		for ($i = 0, $c = count($files); $i < $c; $i++)
34 34
 		{
35 35
 			$filename = $files[$i];
36
-			if(preg_match('/([0-9]+)\.html/i',$filename)) return true;
36
+			if (preg_match('/([0-9]+)\.html/i', $filename)) return true;
37 37
 		}
38 38
 
39
-		if(!$oDB->isColumnExists('layouts', 'layout_type')) return true;
39
+		if (!$oDB->isColumnExists('layouts', 'layout_type')) return true;
40 40
 
41 41
 		$args = new stdClass();
42 42
 		$args->layout = '.';
43 43
 		$output = executeQueryArray('layout.getLayoutDotList', $args);
44
-		if($output->data && count($output->data) > 0)
44
+		if ($output->data && count($output->data) > 0)
45 45
 		{
46
-			foreach($output->data as $layout)
46
+			foreach ($output->data as $layout)
47 47
 			{
48 48
 				$layout_path = explode('.', $layout->layout);
49
-				if(count($layout_path) != 2) continue;
50
-				if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1]))) return true;
49
+				if (count($layout_path) != 2) continue;
50
+				if (is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1]))) return true;
51 51
 			}
52 52
 		}
53 53
 
@@ -62,39 +62,39 @@  discard block
 block discarded – undo
62 62
 	{
63 63
 		$oDB = &DB::getInstance();
64 64
 		// 2009. 02. 11 Add site_srl to menu table
65
-		if(!$oDB->isColumnExists('layouts', 'site_srl'))
65
+		if (!$oDB->isColumnExists('layouts', 'site_srl'))
66 66
 		{
67
-			$oDB->addColumn('layouts','site_srl','number',11,0,true);
67
+			$oDB->addColumn('layouts', 'site_srl', 'number', 11, 0, true);
68 68
 		}
69 69
 		// 2009. 02. 26 Move the previous layout for faceoff
70 70
 		$oLayoutModel = getModel('layout');
71 71
 		$files = FileHandler::readDir('./files/cache/layout');
72
-		for($i=0,$c=count($files);$i<$c;$i++)
72
+		for ($i = 0, $c = count($files); $i < $c; $i++)
73 73
 		{
74 74
 			$filename = $files[$i];
75
-			if(!preg_match('/([0-9]+)\.html/i',$filename,$match)) continue;
75
+			if (!preg_match('/([0-9]+)\.html/i', $filename, $match)) continue;
76 76
 			$layout_srl = $match[1];
77
-			if(!$layout_srl) continue;
77
+			if (!$layout_srl) continue;
78 78
 			$path = $oLayoutModel->getUserLayoutPath($layout_srl);
79
-			if(!is_dir($path)) FileHandler::makeDir($path);
80
-			FileHandler::copyFile('./files/cache/layout/'.$filename, $path.'layout.html');
81
-			@unlink('./files/cache/layout/'.$filename);
79
+			if (!is_dir($path)) FileHandler::makeDir($path);
80
+			FileHandler::copyFile('./files/cache/layout/' . $filename, $path . 'layout.html');
81
+			@unlink('./files/cache/layout/' . $filename);
82 82
 		}
83 83
 
84
-		if(!$oDB->isColumnExists('layouts', 'layout_type'))
84
+		if (!$oDB->isColumnExists('layouts', 'layout_type'))
85 85
 		{
86
-			$oDB->addColumn('layouts','layout_type','char',1,'P',true);
86
+			$oDB->addColumn('layouts', 'layout_type', 'char', 1, 'P', true);
87 87
 		}
88 88
 
89 89
 		$args->layout = '.';
90 90
 		$output = executeQueryArray('layout.getLayoutDotList', $args);
91
-		if($output->data && count($output->data) > 0)
91
+		if ($output->data && count($output->data) > 0)
92 92
 		{
93
-			foreach($output->data as $layout)
93
+			foreach ($output->data as $layout)
94 94
 			{
95 95
 				$layout_path = explode('.', $layout->layout);
96
-				if(count($layout_path) != 2) continue;
97
-				if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1])))
96
+				if (count($layout_path) != 2) continue;
97
+				if (is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1])))
98 98
 				{
99 99
 					$args->layout = implode('|@|', $layout_path);
100 100
 					$args->layout_srl = $layout->layout_srl;
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	function recompileCache()
113 113
 	{
114 114
 		$path = './files/cache/layout';
115
-		if(!is_dir($path))
115
+		if (!is_dir($path))
116 116
 		{
117 117
 			FileHandler::makeDir($path);
118 118
 			return;
Please login to merge, or discard this patch.
Braces   +27 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,16 +27,22 @@  discard block
 block discarded – undo
27 27
 	{
28 28
 		$oDB = &DB::getInstance();
29 29
 		// 2009. 02. 11 Add site_srl to layout table
30
-		if(!$oDB->isColumnExists('layouts', 'site_srl')) return true;
30
+		if(!$oDB->isColumnExists('layouts', 'site_srl')) {
31
+			return true;
32
+		}
31 33
 		// 2009. 02. 26 Move the previous layout for faceoff
32 34
 		$files = FileHandler::readDir('./files/cache/layout');
33 35
 		for($i=0,$c=count($files);$i<$c;$i++)
34 36
 		{
35 37
 			$filename = $files[$i];
36
-			if(preg_match('/([0-9]+)\.html/i',$filename)) return true;
38
+			if(preg_match('/([0-9]+)\.html/i',$filename)) {
39
+				return true;
40
+			}
37 41
 		}
38 42
 
39
-		if(!$oDB->isColumnExists('layouts', 'layout_type')) return true;
43
+		if(!$oDB->isColumnExists('layouts', 'layout_type')) {
44
+			return true;
45
+		}
40 46
 
41 47
 		$args = new stdClass();
42 48
 		$args->layout = '.';
@@ -46,8 +52,12 @@  discard block
 block discarded – undo
46 52
 			foreach($output->data as $layout)
47 53
 			{
48 54
 				$layout_path = explode('.', $layout->layout);
49
-				if(count($layout_path) != 2) continue;
50
-				if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1]))) return true;
55
+				if(count($layout_path) != 2) {
56
+					continue;
57
+				}
58
+				if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1]))) {
59
+					return true;
60
+				}
51 61
 			}
52 62
 		}
53 63
 
@@ -72,11 +82,17 @@  discard block
 block discarded – undo
72 82
 		for($i=0,$c=count($files);$i<$c;$i++)
73 83
 		{
74 84
 			$filename = $files[$i];
75
-			if(!preg_match('/([0-9]+)\.html/i',$filename,$match)) continue;
85
+			if(!preg_match('/([0-9]+)\.html/i',$filename,$match)) {
86
+				continue;
87
+			}
76 88
 			$layout_srl = $match[1];
77
-			if(!$layout_srl) continue;
89
+			if(!$layout_srl) {
90
+				continue;
91
+			}
78 92
 			$path = $oLayoutModel->getUserLayoutPath($layout_srl);
79
-			if(!is_dir($path)) FileHandler::makeDir($path);
93
+			if(!is_dir($path)) {
94
+				FileHandler::makeDir($path);
95
+			}
80 96
 			FileHandler::copyFile('./files/cache/layout/'.$filename, $path.'layout.html');
81 97
 			@unlink('./files/cache/layout/'.$filename);
82 98
 		}
@@ -93,7 +109,9 @@  discard block
 block discarded – undo
93 109
 			foreach($output->data as $layout)
94 110
 			{
95 111
 				$layout_path = explode('.', $layout->layout);
96
-				if(count($layout_path) != 2) continue;
112
+				if(count($layout_path) != 2) {
113
+					continue;
114
+				}
97 115
 				if(is_dir(sprintf(_XE_PATH_ . 'themes/%s/layouts/%s', $layout_path[0], $layout_path[1])))
98 116
 				{
99 117
 					$args->layout = implode('|@|', $layout_path);
Please login to merge, or discard this patch.
modules/member/member.admin.model.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * @class  memberAdminModel
5
- * @author NAVER ([email protected])
6
- * admin model class of member module
7
- */
4
+	 * @class  memberAdminModel
5
+	 * @author NAVER ([email protected])
6
+	 * admin model class of member module
7
+	 */
8 8
 class memberAdminModel extends member
9 9
 {
10 10
 	/**
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -42,64 +42,64 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		// Search option
44 44
 		$args = new stdClass();
45
-		$args->is_admin = Context::get('is_admin')=='Y'?'Y':'';
46
-		$args->is_denied = Context::get('is_denied')=='Y'?'Y':'';
45
+		$args->is_admin = Context::get('is_admin') == 'Y' ? 'Y' : '';
46
+		$args->is_denied = Context::get('is_denied') == 'Y' ? 'Y' : '';
47 47
 		$args->selected_group_srl = Context::get('selected_group_srl');
48 48
 
49 49
 		$filter = Context::get('filter_type');
50
-		switch($filter)
50
+		switch ($filter)
51 51
 		{
52
-			case 'super_admin' : $args->is_admin = 'Y';break;
53
-			case 'site_admin' : $args->member_srls = $this->getSiteAdminMemberSrls();break;
54
-			case 'enable' : $args->is_denied = 'N';break;
55
-			case 'disable' : $args->is_denied = 'Y';break;
52
+			case 'super_admin' : $args->is_admin = 'Y'; break;
53
+			case 'site_admin' : $args->member_srls = $this->getSiteAdminMemberSrls(); break;
54
+			case 'enable' : $args->is_denied = 'N'; break;
55
+			case 'disable' : $args->is_denied = 'Y'; break;
56 56
 		}
57 57
 
58 58
 		$search_target = trim(Context::get('search_target'));
59 59
 		$search_keyword = trim(Context::get('search_keyword'));
60 60
 
61
-		if($search_target && $search_keyword)
61
+		if ($search_target && $search_keyword)
62 62
 		{
63
-			switch($search_target)
63
+			switch ($search_target)
64 64
 			{
65 65
 				case 'user_id' :
66
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
66
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
67 67
 					$args->s_user_id = $search_keyword;
68 68
 					break;
69 69
 				case 'user_name' :
70
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
70
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
71 71
 					$args->s_user_name = $search_keyword;
72 72
 					break;
73 73
 				case 'nick_name' :
74
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
74
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
75 75
 					$args->s_nick_name = $search_keyword;
76 76
 					$args->html_nick_name = htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
77 77
 					break;
78 78
 				case 'email_address' :
79
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
79
+					if ($search_keyword) $search_keyword = str_replace(' ', '%', $search_keyword);
80 80
 					$args->s_email_address = $search_keyword;
81 81
 					break;
82 82
 				case 'regdate' :
83
-					$args->s_regdate = preg_replace("/[^0-9]/","",$search_keyword);
83
+					$args->s_regdate = preg_replace("/[^0-9]/", "", $search_keyword);
84 84
 					break;
85 85
 				case 'regdate_more' :
86
-					$args->s_regdate_more = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14);
86
+					$args->s_regdate_more = substr(preg_replace("/[^0-9]/", "", $search_keyword) . '00000000000000', 0, 14);
87 87
 					break;
88 88
 				case 'regdate_less' :
89
-					$args->s_regdate_less = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14);
89
+					$args->s_regdate_less = substr(preg_replace("/[^0-9]/", "", $search_keyword) . '00000000000000', 0, 14);
90 90
 					break;
91 91
 				case 'last_login' :
92
-					$args->s_last_login = preg_replace("/[^0-9]/","",$search_keyword);
92
+					$args->s_last_login = preg_replace("/[^0-9]/", "", $search_keyword);
93 93
 					//$args->s_last_login = $search_keyword;
94 94
 					break;
95 95
 				case 'last_login_more' :
96
-					$args->s_last_login_more = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14);
96
+					$args->s_last_login_more = substr(preg_replace("/[^0-9]/", "", $search_keyword) . '00000000000000', 0, 14);
97 97
 					break;
98 98
 				case 'last_login_less' :
99
-					$args->s_last_login_less = substr(preg_replace("/[^0-9]/","",$search_keyword) . '00000000000000',0,14);
99
+					$args->s_last_login_less = substr(preg_replace("/[^0-9]/", "", $search_keyword) . '00000000000000', 0, 14);
100 100
 					break;
101 101
 				case 'birthday' :
102
-					$args->s_birthday = preg_replace("/[^0-9]/","",$search_keyword);
102
+					$args->s_birthday = preg_replace("/[^0-9]/", "", $search_keyword);
103 103
 					break;
104 104
 				case 'extra_vars' :
105 105
 					$args->s_extra_vars = $search_keyword;
@@ -110,25 +110,25 @@  discard block
 block discarded – undo
110 110
 		// Change the query id if selected_group_srl exists (for table join)
111 111
 		$sort_order = Context::get('sort_order');
112 112
 		$sort_index = Context::get('sort_index');
113
-		if(!$sort_index)
113
+		if (!$sort_index)
114 114
 		{
115 115
 			$sort_index = "list_order";
116 116
 		}
117 117
 
118
-		if(!$sort_order)
118
+		if (!$sort_order)
119 119
 		{
120 120
 			$sort_order = 'asc';
121 121
 		}
122 122
 
123
-		if($sort_order != 'asc')
123
+		if ($sort_order != 'asc')
124 124
 		{
125 125
 			$sort_order = 'desc';
126 126
 		}
127 127
 
128
-		if($args->selected_group_srl)
128
+		if ($args->selected_group_srl)
129 129
 		{
130 130
 			$query_id = 'member.getMemberListWithinGroup';
131
-			$args->sort_index = "member.".$sort_index;
131
+			$args->sort_index = "member." . $sort_index;
132 132
 		}
133 133
 		else
134 134
 		{
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
 	function getSiteAdminMemberSrls()
175 175
 	{
176 176
 		$output = executeQueryArray('member.getSiteAdminMemberSrls');
177
-		if(!$output->toBool() || !$output->data) return array();
177
+		if (!$output->toBool() || !$output->data) return array();
178 178
 
179 179
 		$member_srls = array();
180
-		foreach($output->data as $member_info)
180
+		foreach ($output->data as $member_info)
181 181
 		{
182 182
 			$member_srls[] = $member_info->member_srl;
183 183
 		}
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	function getMemberAdminColorset()
194 194
 	{
195 195
 		$skin = Context::get('skin');
196
-		if(!$skin) $tpl = "";
196
+		if (!$skin) $tpl = "";
197 197
 		else
198 198
 		{
199 199
 			$oModuleModel = getModel('module');
@@ -202,11 +202,11 @@  discard block
 block discarded – undo
202 202
 
203 203
 			$oModuleModel = getModel('module');
204 204
 			$config = $oModuleModel->getModuleConfig('member');
205
-			if(!$config->colorset) $config->colorset = "white";
205
+			if (!$config->colorset) $config->colorset = "white";
206 206
 			Context::set('config', $config);
207 207
 
208 208
 			$oTemplate = &TemplateHandler::getInstance();
209
-			$tpl = $oTemplate->compile($this->module_path.'tpl', 'new_colorset_list');
209
+			$tpl = $oTemplate->compile($this->module_path . 'tpl', 'new_colorset_list');
210 210
 		}
211 211
 
212 212
 		$this->add('tpl', $tpl);
@@ -223,10 +223,10 @@  discard block
 block discarded – undo
223 223
 	public function getMemberCountByDate($date = '')
224 224
 	{
225 225
 		$args = new stdClass();
226
-		if($date) $args->regDate = date('Ymd', strtotime($date));
226
+		if ($date) $args->regDate = date('Ymd', strtotime($date));
227 227
 
228 228
 		$output = executeQuery('member.getMemberCountByDate', $args);
229
-		if(!$output->toBool()) return 0;
229
+		if (!$output->toBool()) return 0;
230 230
 
231 231
 		return $output->data->count;
232 232
 	}
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
 	 */
241 241
 	function getMemberGroupMemberCountByDate($date = '')
242 242
 	{
243
-		if($date) $args->regDate = date('Ymd', strtotime($date));
243
+		if ($date) $args->regDate = date('Ymd', strtotime($date));
244 244
 
245 245
 		$output = executeQuery('member.getMemberGroupMemberCountByDate', $args);
246
-		if(!$output->toBool()) return 0;
246
+		if (!$output->toBool()) return 0;
247 247
 
248 248
 		return count($output->data);
249 249
 	}
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
 		$args->member_join_form_srl = $member_join_form_srl;
262 262
 		$output = executeQuery('member.getJoinForm', $args);
263 263
 
264
-		if($output->toBool() && $output->data)
264
+		if ($output->toBool() && $output->data)
265 265
 		{
266 266
 			$formInfo = $output->data;
267 267
 			$default_value = $formInfo->default_value;
268
-			if($default_value)
268
+			if ($default_value)
269 269
 			{
270 270
 				$default_value = unserialize($default_value);
271 271
 				Context::set('default_value', $default_value);
@@ -275,18 +275,18 @@  discard block
 block discarded – undo
275 275
 
276 276
 		$oMemberModel = getModel('member');
277 277
 		$config = $oMemberModel->getMemberConfig();
278
-		foreach($config->signupForm as $item) 
278
+		foreach ($config->signupForm as $item) 
279 279
 		{
280 280
 			$list[] = $item->name;
281 281
 		}
282 282
 
283
-		$id_list = implode(',',$list);
284
-		Context::set('id_list',$id_list);
283
+		$id_list = implode(',', $list);
284
+		Context::set('id_list', $id_list);
285 285
 
286 286
 		$oTemplate = &TemplateHandler::getInstance();
287
-		$tpl = $oTemplate->compile($this->module_path.'tpl', 'insert_join_form');
287
+		$tpl = $oTemplate->compile($this->module_path . 'tpl', 'insert_join_form');
288 288
 
289
-		$this->add('tpl', str_replace("\n"," ",$tpl));
289
+		$this->add('tpl', str_replace("\n", " ", $tpl));
290 290
 	}
291 291
 
292 292
 	/**
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
 	{
299 299
 		$db_info = Context::getDBInfo();
300 300
 		$admin_ip_list = $db_info->admin_ip_list;
301
-		if(!$admin_ip_list) return true;
302
-		if(!is_array($admin_ip_list)) $admin_ip_list = explode(',',$admin_ip_list);
303
-		if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true;
301
+		if (!$admin_ip_list) return true;
302
+		if (!is_array($admin_ip_list)) $admin_ip_list = explode(',', $admin_ip_list);
303
+		if (!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true;
304 304
 		else return false;
305 305
 	}
306 306
 }
Please login to merge, or discard this patch.
Braces   +45 added lines, -18 removed lines patch added patch discarded remove patch
@@ -63,20 +63,28 @@  discard block
 block discarded – undo
63 63
 			switch($search_target)
64 64
 			{
65 65
 				case 'user_id' :
66
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
66
+					if($search_keyword) {
67
+						$search_keyword = str_replace(' ','%',$search_keyword);
68
+					}
67 69
 					$args->s_user_id = $search_keyword;
68 70
 					break;
69 71
 				case 'user_name' :
70
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
72
+					if($search_keyword) {
73
+						$search_keyword = str_replace(' ','%',$search_keyword);
74
+					}
71 75
 					$args->s_user_name = $search_keyword;
72 76
 					break;
73 77
 				case 'nick_name' :
74
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
78
+					if($search_keyword) {
79
+						$search_keyword = str_replace(' ','%',$search_keyword);
80
+					}
75 81
 					$args->s_nick_name = $search_keyword;
76 82
 					$args->html_nick_name = htmlspecialchars($search_keyword, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
77 83
 					break;
78 84
 				case 'email_address' :
79
-					if($search_keyword) $search_keyword = str_replace(' ','%',$search_keyword);
85
+					if($search_keyword) {
86
+						$search_keyword = str_replace(' ','%',$search_keyword);
87
+					}
80 88
 					$args->s_email_address = $search_keyword;
81 89
 					break;
82 90
 				case 'regdate' :
@@ -129,8 +137,7 @@  discard block
 block discarded – undo
129 137
 		{
130 138
 			$query_id = 'member.getMemberListWithinGroup';
131 139
 			$args->sort_index = "member.".$sort_index;
132
-		}
133
-		else
140
+		} else
134 141
 		{
135 142
 			$query_id = 'member.getMemberList';
136 143
 			$args->sort_index = $sort_index; 
@@ -174,7 +181,9 @@  discard block
 block discarded – undo
174 181
 	function getSiteAdminMemberSrls()
175 182
 	{
176 183
 		$output = executeQueryArray('member.getSiteAdminMemberSrls');
177
-		if(!$output->toBool() || !$output->data) return array();
184
+		if(!$output->toBool() || !$output->data) {
185
+			return array();
186
+		}
178 187
 
179 188
 		$member_srls = array();
180 189
 		foreach($output->data as $member_info)
@@ -193,8 +202,9 @@  discard block
 block discarded – undo
193 202
 	function getMemberAdminColorset()
194 203
 	{
195 204
 		$skin = Context::get('skin');
196
-		if(!$skin) $tpl = "";
197
-		else
205
+		if(!$skin) {
206
+			$tpl = "";
207
+		} else
198 208
 		{
199 209
 			$oModuleModel = getModel('module');
200 210
 			$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $skin);
@@ -202,7 +212,9 @@  discard block
 block discarded – undo
202 212
 
203 213
 			$oModuleModel = getModel('module');
204 214
 			$config = $oModuleModel->getModuleConfig('member');
205
-			if(!$config->colorset) $config->colorset = "white";
215
+			if(!$config->colorset) {
216
+				$config->colorset = "white";
217
+			}
206 218
 			Context::set('config', $config);
207 219
 
208 220
 			$oTemplate = &TemplateHandler::getInstance();
@@ -223,10 +235,14 @@  discard block
 block discarded – undo
223 235
 	public function getMemberCountByDate($date = '')
224 236
 	{
225 237
 		$args = new stdClass();
226
-		if($date) $args->regDate = date('Ymd', strtotime($date));
238
+		if($date) {
239
+			$args->regDate = date('Ymd', strtotime($date));
240
+		}
227 241
 
228 242
 		$output = executeQuery('member.getMemberCountByDate', $args);
229
-		if(!$output->toBool()) return 0;
243
+		if(!$output->toBool()) {
244
+			return 0;
245
+		}
230 246
 
231 247
 		return $output->data->count;
232 248
 	}
@@ -240,10 +256,14 @@  discard block
 block discarded – undo
240 256
 	 */
241 257
 	function getMemberGroupMemberCountByDate($date = '')
242 258
 	{
243
-		if($date) $args->regDate = date('Ymd', strtotime($date));
259
+		if($date) {
260
+			$args->regDate = date('Ymd', strtotime($date));
261
+		}
244 262
 
245 263
 		$output = executeQuery('member.getMemberGroupMemberCountByDate', $args);
246
-		if(!$output->toBool()) return 0;
264
+		if(!$output->toBool()) {
265
+			return 0;
266
+		}
247 267
 
248 268
 		return count($output->data);
249 269
 	}
@@ -298,10 +318,17 @@  discard block
 block discarded – undo
298 318
 	{
299 319
 		$db_info = Context::getDBInfo();
300 320
 		$admin_ip_list = $db_info->admin_ip_list;
301
-		if(!$admin_ip_list) return true;
302
-		if(!is_array($admin_ip_list)) $admin_ip_list = explode(',',$admin_ip_list);
303
-		if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) return true;
304
-		else return false;
321
+		if(!$admin_ip_list) {
322
+			return true;
323
+		}
324
+		if(!is_array($admin_ip_list)) {
325
+			$admin_ip_list = explode(',',$admin_ip_list);
326
+		}
327
+		if(!count($admin_ip_list) || IpFilter::filter($admin_ip_list)) {
328
+			return true;
329
+		} else {
330
+			return false;
331
+		}
305 332
 	}
306 333
 }
307 334
 /* End of file member.admin.model.php */
Please login to merge, or discard this patch.
modules/member/member.class.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * @class  member
5
- * @author NAVER ([email protected])
6
- * high class of the member module
7
- */
4
+	 * @class  member
5
+	 * @author NAVER ([email protected])
6
+	 * high class of the member module
7
+	 */
8 8
 class member extends ModuleObject {
9 9
 	/**
10 10
 	 * Use sha1 encryption
Please login to merge, or discard this patch.
Spacing   +96 added lines, -96 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');
@@ -183,60 +183,60 @@  discard block
 block discarded – undo
183 183
 		$oDB = &DB::getInstance();
184 184
 		$oModuleModel = getModel('module');
185 185
 		// check member directory (11/08/2007 added)
186
-		if(!is_dir("./files/member_extra_info")) return true;
186
+		if (!is_dir("./files/member_extra_info")) return true;
187 187
 		// check member directory (22/10/2007 added)
188
-		if(!is_dir("./files/member_extra_info/profile_image")) return true;
188
+		if (!is_dir("./files/member_extra_info/profile_image")) return true;
189 189
 		// Add a column(is_register) to "member_auth_mail" table (22/04/2008)
190 190
 		$act = $oDB->isColumnExists("member_auth_mail", "is_register");
191
-		if(!$act) return true;
191
+		if (!$act) return true;
192 192
 		// Add a column(site_srl) to "member_group_member" table (11/15/2008)
193
-		if(!$oDB->isColumnExists("member_group_member", "site_srl")) return true;
194
-		if(!$oDB->isColumnExists("member_group", "site_srl")) return true;
195
-		if($oDB->isIndexExists("member_group","uni_member_group_title")) return true;
193
+		if (!$oDB->isColumnExists("member_group_member", "site_srl")) return true;
194
+		if (!$oDB->isColumnExists("member_group", "site_srl")) return true;
195
+		if ($oDB->isIndexExists("member_group", "uni_member_group_title")) return true;
196 196
 
197 197
 		// Add a column for list_order (05/18/2011)
198
-		if(!$oDB->isColumnExists("member_group", "list_order")) return true;
198
+		if (!$oDB->isColumnExists("member_group", "list_order")) return true;
199 199
 
200 200
 		// image_mark 추가 (2009. 02. 14)
201
-		if(!$oDB->isColumnExists("member_group", "image_mark")) return true;
201
+		if (!$oDB->isColumnExists("member_group", "image_mark")) return true;
202 202
 		// Add c column for password expiration date
203
-		if(!$oDB->isColumnExists("member", "change_password_date")) return true;
203
+		if (!$oDB->isColumnExists("member", "change_password_date")) return true;
204 204
 
205 205
 		// Add columns of question and answer to verify a password
206
-		if(!$oDB->isColumnExists("member", "find_account_question")) return true;
207
-		if(!$oDB->isColumnExists("member", "find_account_answer")) return true;
206
+		if (!$oDB->isColumnExists("member", "find_account_question")) return true;
207
+		if (!$oDB->isColumnExists("member", "find_account_answer")) return true;
208 208
 
209
-		if(!$oDB->isColumnExists("member", "list_order")) return true;
210
-		if(!$oDB->isIndexExists("member","idx_list_order")) return true;
209
+		if (!$oDB->isColumnExists("member", "list_order")) return true;
210
+		if (!$oDB->isIndexExists("member", "idx_list_order")) return true;
211 211
 
212 212
 		$oModuleModel = getModel('module');
213 213
 		$config = $oModuleModel->getModuleConfig('member');
214 214
 		// check signup form ordering info
215
-		if(!$config->signupForm) return true;
215
+		if (!$config->signupForm) return true;
216 216
 
217 217
 		// check agreement field exist
218
-		if($config->agreement) return true;
218
+		if ($config->agreement) return true;
219 219
 
220
-		if($config->skin)
220
+		if ($config->skin)
221 221
 		{
222 222
 			$config_parse = explode('.', $config->skin);
223
-			if(count($config_parse) > 1)
223
+			if (count($config_parse) > 1)
224 224
 			{
225 225
 				$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
226
-				if(is_dir($template_path)) return true;
226
+				if (is_dir($template_path)) return true;
227 227
 			}
228 228
 		}
229 229
 
230 230
 		// supprot multilanguage agreement.
231
-		if(is_readable('./files/member_extra_info/agreement.txt')) return true;
231
+		if (is_readable('./files/member_extra_info/agreement.txt')) return true;
232 232
 
233
-		if(!is_readable('./files/ruleset/insertMember.xml')) return true;
234
-		if(!is_readable('./files/ruleset/login.xml')) return true;
235
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
233
+		if (!is_readable('./files/ruleset/insertMember.xml')) return true;
234
+		if (!is_readable('./files/ruleset/login.xml')) return true;
235
+		if (!is_readable('./files/ruleset/find_member_account_by_question.xml')) 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
 		return false;
242 242
 	}
@@ -256,66 +256,66 @@  discard block
 block discarded – undo
256 256
 		FileHandler::makeDir('./files/member_extra_info/signature');
257 257
 		FileHandler::makeDir('./files/member_extra_info/profile_image');
258 258
 		// Add a column
259
-		if(!$oDB->isColumnExists("member_auth_mail", "is_register"))
259
+		if (!$oDB->isColumnExists("member_auth_mail", "is_register"))
260 260
 		{
261 261
 			$oDB->addColumn("member_auth_mail", "is_register", "char", 1, "N", true);
262 262
 		}
263 263
 		// Add a column(site_srl) to "member_group_member" table (11/15/2008)
264
-		if(!$oDB->isColumnExists("member_group_member", "site_srl"))
264
+		if (!$oDB->isColumnExists("member_group_member", "site_srl"))
265 265
 		{
266 266
 			$oDB->addColumn("member_group_member", "site_srl", "number", 11, 0, true);
267 267
 			$oDB->addIndex("member_group_member", "idx_site_srl", "site_srl", false);
268 268
 		}
269
-		if(!$oDB->isColumnExists("member_group", "site_srl"))
269
+		if (!$oDB->isColumnExists("member_group", "site_srl"))
270 270
 		{
271 271
 			$oDB->addColumn("member_group", "site_srl", "number", 11, 0, true);
272
-			$oDB->addIndex("member_group","idx_site_title", array("site_srl","title"),true);
272
+			$oDB->addIndex("member_group", "idx_site_title", array("site_srl", "title"), true);
273 273
 		}
274
-		if($oDB->isIndexExists("member_group","uni_member_group_title"))
274
+		if ($oDB->isIndexExists("member_group", "uni_member_group_title"))
275 275
 		{
276
-			$oDB->dropIndex("member_group","uni_member_group_title",true);
276
+			$oDB->dropIndex("member_group", "uni_member_group_title", true);
277 277
 		}
278 278
 
279 279
 		// Add a column(list_order) to "member_group" table (05/18/2011)
280
-		if(!$oDB->isColumnExists("member_group", "list_order"))
280
+		if (!$oDB->isColumnExists("member_group", "list_order"))
281 281
 		{
282 282
 			$oDB->addColumn("member_group", "list_order", "number", 11, '', true);
283
-			$oDB->addIndex("member_group","idx_list_order", "list_order",false);
283
+			$oDB->addIndex("member_group", "idx_list_order", "list_order", false);
284 284
 			$output = executeQuery('member.updateAllMemberGroupListOrder');
285 285
 		}
286 286
 		// Add a column for image_mark (02/14/2009)
287
-		if(!$oDB->isColumnExists("member_group", "image_mark"))
287
+		if (!$oDB->isColumnExists("member_group", "image_mark"))
288 288
 		{
289 289
 			$oDB->addColumn("member_group", "image_mark", "text");
290 290
 		}
291 291
 		// Add a column for password expiration date
292
-		if(!$oDB->isColumnExists("member", "change_password_date"))
292
+		if (!$oDB->isColumnExists("member", "change_password_date"))
293 293
 		{
294 294
 			$oDB->addColumn("member", "change_password_date", "date");
295 295
 			executeQuery('member.updateAllChangePasswordDate');
296 296
 		}
297 297
 
298 298
 		// Add columns of question and answer to verify a password
299
-		if(!$oDB->isColumnExists("member", "find_account_question"))
299
+		if (!$oDB->isColumnExists("member", "find_account_question"))
300 300
 		{
301 301
 			$oDB->addColumn("member", "find_account_question", "number", 11);
302 302
 		}
303
-		if(!$oDB->isColumnExists("member", "find_account_answer"))
303
+		if (!$oDB->isColumnExists("member", "find_account_answer"))
304 304
 		{
305 305
 			$oDB->addColumn("member", "find_account_answer", "varchar", 250);
306 306
 		}
307 307
 
308
-		if(!$oDB->isColumnExists("member", "list_order"))
308
+		if (!$oDB->isColumnExists("member", "list_order"))
309 309
 		{
310 310
 			$oDB->addColumn("member", "list_order", "number", 11);
311 311
 			@set_time_limit(0);
312 312
 			$args->list_order = 'member_srl';
313
-			executeQuery('member.updateMemberListOrderAll',$args);
313
+			executeQuery('member.updateMemberListOrderAll', $args);
314 314
 			executeQuery('member.updateMemberListOrderAll');
315 315
 		}
316
-		if(!$oDB->isIndexExists("member","idx_list_order"))
316
+		if (!$oDB->isIndexExists("member", "idx_list_order"))
317 317
 		{
318
-			$oDB->addIndex("member","idx_list_order", array("list_order"));
318
+			$oDB->addIndex("member", "idx_list_order", array("list_order"));
319 319
 		}
320 320
 
321 321
 		$oModuleModel = getModel('module');
@@ -323,9 +323,9 @@  discard block
 block discarded – undo
323 323
 		$oModuleController = getController('module');
324 324
 
325 325
 		// check agreement value exist
326
-		if($config->agreement)
326
+		if ($config->agreement)
327 327
 		{
328
-			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
328
+			$agreement_file = _XE_PATH_ . 'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
329 329
 			$output = FileHandler::writeFile($agreement_file, $config->agreement);
330 330
 
331 331
 			$config->agreement = NULL;
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 
335 335
 		$oMemberAdminController = getAdminController('member');
336 336
 		// check signup form ordering info
337
-		if(!$config->signupForm || !is_array($config->signupForm))
337
+		if (!$config->signupForm || !is_array($config->signupForm))
338 338
 		{
339 339
 			$identifier = 'user_id';
340 340
 
@@ -344,13 +344,13 @@  discard block
 block discarded – undo
344 344
 			$output = $oModuleController->updateModuleConfig('member', $config);
345 345
 		}
346 346
 
347
-		if($config->skin)
347
+		if ($config->skin)
348 348
 		{
349 349
 			$config_parse = explode('.', $config->skin);
350 350
 			if (count($config_parse) > 1)
351 351
 			{
352 352
 				$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
353
-				if(is_dir($template_path))
353
+				if (is_dir($template_path))
354 354
 				{
355 355
 					$config->skin = implode('|@|', $config_parse);
356 356
 					$oModuleController = getController('module');
@@ -359,26 +359,26 @@  discard block
 block discarded – undo
359 359
 			}
360 360
 		}
361 361
 
362
-		if(is_readable('./files/member_extra_info/agreement.txt'))
362
+		if (is_readable('./files/member_extra_info/agreement.txt'))
363 363
 		{
364
-			$source_file = _XE_PATH_.'files/member_extra_info/agreement.txt';
365
-			$target_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
364
+			$source_file = _XE_PATH_ . 'files/member_extra_info/agreement.txt';
365
+			$target_file = _XE_PATH_ . 'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
366 366
 
367 367
 			FileHandler::rename($source_file, $target_file);
368 368
 		}
369 369
 
370 370
 		FileHandler::makeDir('./files/ruleset');
371
-		if(!is_readable('./files/ruleset/insertMember.xml'))
371
+		if (!is_readable('./files/ruleset/insertMember.xml'))
372 372
 			$oMemberAdminController->_createSignupRuleset($config->signupForm);
373
-		if(!is_readable('./files/ruleset/login.xml'))
373
+		if (!is_readable('./files/ruleset/login.xml'))
374 374
 			$oMemberAdminController->_createLoginRuleset($config->identifier);
375
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml'))
375
+		if (!is_readable('./files/ruleset/find_member_account_by_question.xml'))
376 376
 			$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
377 377
 
378 378
 		// 2013. 11. 22 add menu when popup document menu called
379
-		if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
379
+		if (!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
380 380
 			$oModuleController->insertTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after');
381
-		if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after'))
381
+		if (!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after'))
382 382
 			$oModuleController->insertTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after');
383 383
 
384 384
 		return new Object(0, 'success_updated');
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 	 */
399 399
 	function recordLoginError($error = 0, $message = 'success')
400 400
 	{
401
-		if($error == 0) return new Object($error, $message);
401
+		if ($error == 0) return new Object($error, $message);
402 402
 
403 403
 		// Create a member model object
404 404
 		$oMemberModel = getModel('member');
@@ -406,18 +406,18 @@  discard block
 block discarded – undo
406 406
 
407 407
 		// Check if there is recoding table.
408 408
 		$oDB = &DB::getInstance();
409
-		if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
409
+		if (!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
410 410
 
411 411
 		$args = new stdClass();
412 412
 		$args->ipaddress = $_SERVER['REMOTE_ADDR'];
413 413
 
414 414
 		$output = executeQuery('member.getLoginCountByIp', $args);
415
-		if($output->data && $output->data->count)
415
+		if ($output->data && $output->data->count)
416 416
 		{
417 417
 			$last_update = strtotime($output->data->last_update);
418
-			$term = intval($_SERVER['REQUEST_TIME']-$last_update);
418
+			$term = intval($_SERVER['REQUEST_TIME'] - $last_update);
419 419
 			//update, if IP address access in a short time, update count. If not, make count 1.
420
-			if($term < $config->max_error_count_time)
420
+			if ($term < $config->max_error_count_time)
421 421
 			{
422 422
 				$args->count = $output->data->count + 1;
423 423
 			}
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
 	 */
444 444
 	function recordMemberLoginError($error = 0, $message = 'success', $args = NULL)
445 445
 	{
446
-		if($error == 0 || !$args->member_srl) return new Object($error, $message);
446
+		if ($error == 0 || !$args->member_srl) return new Object($error, $message);
447 447
 
448 448
 		// Create a member model object
449 449
 		$oMemberModel = getModel('member');
@@ -451,21 +451,21 @@  discard block
 block discarded – undo
451 451
 
452 452
 		// Check if there is recoding table.
453 453
 		$oDB = &DB::getInstance();
454
-		if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
454
+		if (!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
455 455
 
456 456
 		$output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args);
457
-		if($output->data && $output->data->content)
457
+		if ($output->data && $output->data->content)
458 458
 		{
459 459
 			//update
460 460
 			$content = unserialize($output->data->content);
461
-			$content[] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
461
+			$content[] = array($_SERVER['REMOTE_ADDR'], Context::getLang($message), $_SERVER['REQUEST_TIME']);
462 462
 			$args->content = serialize($content);
463 463
 			$output = executeQuery('member.updateLoginCountHistoryByMemberSrl', $args);
464 464
 		}
465 465
 		else
466 466
 		{
467 467
 			//insert
468
-			$content[0] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
468
+			$content[0] = array($_SERVER['REMOTE_ADDR'], Context::getLang($message), $_SERVER['REQUEST_TIME']);
469 469
 			$args->content = serialize($content);
470 470
 			$output = executeQuery('member.insertLoginCountHistoryByMemberSrl', $args);
471 471
 		}
Please login to merge, or discard this patch.
Braces   +135 added lines, -55 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
 		{
@@ -183,39 +209,69 @@  discard block
 block discarded – undo
183 209
 		$oDB = &DB::getInstance();
184 210
 		$oModuleModel = getModel('module');
185 211
 		// check member directory (11/08/2007 added)
186
-		if(!is_dir("./files/member_extra_info")) return true;
212
+		if(!is_dir("./files/member_extra_info")) {
213
+			return true;
214
+		}
187 215
 		// check member directory (22/10/2007 added)
188
-		if(!is_dir("./files/member_extra_info/profile_image")) return true;
216
+		if(!is_dir("./files/member_extra_info/profile_image")) {
217
+			return true;
218
+		}
189 219
 		// Add a column(is_register) to "member_auth_mail" table (22/04/2008)
190 220
 		$act = $oDB->isColumnExists("member_auth_mail", "is_register");
191
-		if(!$act) return true;
221
+		if(!$act) {
222
+			return true;
223
+		}
192 224
 		// Add a column(site_srl) to "member_group_member" table (11/15/2008)
193
-		if(!$oDB->isColumnExists("member_group_member", "site_srl")) return true;
194
-		if(!$oDB->isColumnExists("member_group", "site_srl")) return true;
195
-		if($oDB->isIndexExists("member_group","uni_member_group_title")) return true;
225
+		if(!$oDB->isColumnExists("member_group_member", "site_srl")) {
226
+			return true;
227
+		}
228
+		if(!$oDB->isColumnExists("member_group", "site_srl")) {
229
+			return true;
230
+		}
231
+		if($oDB->isIndexExists("member_group","uni_member_group_title")) {
232
+			return true;
233
+		}
196 234
 
197 235
 		// Add a column for list_order (05/18/2011)
198
-		if(!$oDB->isColumnExists("member_group", "list_order")) return true;
236
+		if(!$oDB->isColumnExists("member_group", "list_order")) {
237
+			return true;
238
+		}
199 239
 
200 240
 		// image_mark 추가 (2009. 02. 14)
201
-		if(!$oDB->isColumnExists("member_group", "image_mark")) return true;
241
+		if(!$oDB->isColumnExists("member_group", "image_mark")) {
242
+			return true;
243
+		}
202 244
 		// Add c column for password expiration date
203
-		if(!$oDB->isColumnExists("member", "change_password_date")) return true;
245
+		if(!$oDB->isColumnExists("member", "change_password_date")) {
246
+			return true;
247
+		}
204 248
 
205 249
 		// Add columns of question and answer to verify a password
206
-		if(!$oDB->isColumnExists("member", "find_account_question")) return true;
207
-		if(!$oDB->isColumnExists("member", "find_account_answer")) return true;
250
+		if(!$oDB->isColumnExists("member", "find_account_question")) {
251
+			return true;
252
+		}
253
+		if(!$oDB->isColumnExists("member", "find_account_answer")) {
254
+			return true;
255
+		}
208 256
 
209
-		if(!$oDB->isColumnExists("member", "list_order")) return true;
210
-		if(!$oDB->isIndexExists("member","idx_list_order")) return true;
257
+		if(!$oDB->isColumnExists("member", "list_order")) {
258
+			return true;
259
+		}
260
+		if(!$oDB->isIndexExists("member","idx_list_order")) {
261
+			return true;
262
+		}
211 263
 
212 264
 		$oModuleModel = getModel('module');
213 265
 		$config = $oModuleModel->getModuleConfig('member');
214 266
 		// check signup form ordering info
215
-		if(!$config->signupForm) return true;
267
+		if(!$config->signupForm) {
268
+			return true;
269
+		}
216 270
 
217 271
 		// check agreement field exist
218
-		if($config->agreement) return true;
272
+		if($config->agreement) {
273
+			return true;
274
+		}
219 275
 
220 276
 		if($config->skin)
221 277
 		{
@@ -223,20 +279,34 @@  discard block
 block discarded – undo
223 279
 			if(count($config_parse) > 1)
224 280
 			{
225 281
 				$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
226
-				if(is_dir($template_path)) return true;
282
+				if(is_dir($template_path)) {
283
+					return true;
284
+				}
227 285
 			}
228 286
 		}
229 287
 
230 288
 		// supprot multilanguage agreement.
231
-		if(is_readable('./files/member_extra_info/agreement.txt')) return true;
289
+		if(is_readable('./files/member_extra_info/agreement.txt')) {
290
+			return true;
291
+		}
232 292
 
233
-		if(!is_readable('./files/ruleset/insertMember.xml')) return true;
234
-		if(!is_readable('./files/ruleset/login.xml')) return true;
235
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
293
+		if(!is_readable('./files/ruleset/insertMember.xml')) {
294
+			return true;
295
+		}
296
+		if(!is_readable('./files/ruleset/login.xml')) {
297
+			return true;
298
+		}
299
+		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) {
300
+			return true;
301
+		}
236 302
 
237 303
 		// 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;
304
+		if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) {
305
+			return true;
306
+		}
307
+		if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) {
308
+			return true;
309
+		}
240 310
 
241 311
 		return false;
242 312
 	}
@@ -368,18 +438,23 @@  discard block
 block discarded – undo
368 438
 		}
369 439
 
370 440
 		FileHandler::makeDir('./files/ruleset');
371
-		if(!is_readable('./files/ruleset/insertMember.xml'))
372
-			$oMemberAdminController->_createSignupRuleset($config->signupForm);
373
-		if(!is_readable('./files/ruleset/login.xml'))
374
-			$oMemberAdminController->_createLoginRuleset($config->identifier);
375
-		if(!is_readable('./files/ruleset/find_member_account_by_question.xml'))
376
-			$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
441
+		if(!is_readable('./files/ruleset/insertMember.xml')) {
442
+					$oMemberAdminController->_createSignupRuleset($config->signupForm);
443
+		}
444
+		if(!is_readable('./files/ruleset/login.xml')) {
445
+					$oMemberAdminController->_createLoginRuleset($config->identifier);
446
+		}
447
+		if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) {
448
+					$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
449
+		}
377 450
 
378 451
 		// 2013. 11. 22 add menu when popup document menu called
379
-		if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
380
-			$oModuleController->insertTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after');
381
-		if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after'))
382
-			$oModuleController->insertTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after');
452
+		if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) {
453
+					$oModuleController->insertTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after');
454
+		}
455
+		if(!$oModuleModel->getTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after')) {
456
+					$oModuleController->insertTrigger('comment.getCommentMenu', 'member', 'controller', 'triggerGetCommentMenu', 'after');
457
+		}
383 458
 
384 459
 		return new Object(0, 'success_updated');
385 460
 	}
@@ -398,7 +473,9 @@  discard block
 block discarded – undo
398 473
 	 */
399 474
 	function recordLoginError($error = 0, $message = 'success')
400 475
 	{
401
-		if($error == 0) return new Object($error, $message);
476
+		if($error == 0) {
477
+			return new Object($error, $message);
478
+		}
402 479
 
403 480
 		// Create a member model object
404 481
 		$oMemberModel = getModel('member');
@@ -406,7 +483,9 @@  discard block
 block discarded – undo
406 483
 
407 484
 		// Check if there is recoding table.
408 485
 		$oDB = &DB::getInstance();
409
-		if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
486
+		if(!$oDB->isTableExists('member_login_count') || $config->enable_login_fail_report == 'N') {
487
+			return new Object($error, $message);
488
+		}
410 489
 
411 490
 		$args = new stdClass();
412 491
 		$args->ipaddress = $_SERVER['REMOTE_ADDR'];
@@ -420,16 +499,14 @@  discard block
 block discarded – undo
420 499
 			if($term < $config->max_error_count_time)
421 500
 			{
422 501
 				$args->count = $output->data->count + 1;
423
-			}
424
-			else
502
+			} else
425 503
 			{
426 504
 				$args->count = 1;
427 505
 			}
428 506
 			unset($oMemberModel);
429 507
 			unset($config);
430 508
 			$output = executeQuery('member.updateLoginCountByIp', $args);
431
-		}
432
-		else
509
+		} else
433 510
 		{
434 511
 			//insert
435 512
 			$args->count = 1;
@@ -443,7 +520,9 @@  discard block
 block discarded – undo
443 520
 	 */
444 521
 	function recordMemberLoginError($error = 0, $message = 'success', $args = NULL)
445 522
 	{
446
-		if($error == 0 || !$args->member_srl) return new Object($error, $message);
523
+		if($error == 0 || !$args->member_srl) {
524
+			return new Object($error, $message);
525
+		}
447 526
 
448 527
 		// Create a member model object
449 528
 		$oMemberModel = getModel('member');
@@ -451,7 +530,9 @@  discard block
 block discarded – undo
451 530
 
452 531
 		// Check if there is recoding table.
453 532
 		$oDB = &DB::getInstance();
454
-		if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') return new Object($error, $message);
533
+		if(!$oDB->isTableExists('member_count_history') || $config->enable_login_fail_report == 'N') {
534
+			return new Object($error, $message);
535
+		}
455 536
 
456 537
 		$output = executeQuery('member.getLoginCountHistoryByMemberSrl', $args);
457 538
 		if($output->data && $output->data->content)
@@ -461,8 +542,7 @@  discard block
 block discarded – undo
461 542
 			$content[] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
462 543
 			$args->content = serialize($content);
463 544
 			$output = executeQuery('member.updateLoginCountHistoryByMemberSrl', $args);
464
-		}
465
-		else
545
+		} else
466 546
 		{
467 547
 			//insert
468 548
 			$content[0] = array($_SERVER['REMOTE_ADDR'],Context::getLang($message),$_SERVER['REQUEST_TIME']);
Please login to merge, or discard this patch.
modules/member/member.mobile.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3
-require_once(_XE_PATH_.'modules/member/member.view.php');
3
+require_once(_XE_PATH_ . 'modules/member/member.view.php');
4 4
 class memberMobile extends memberView
5 5
 {
6 6
 	/**
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 
22 22
 		$mskin = $this->member_config->mskin;
23 23
 		// Set the template path
24
-		if(!$mskin)
24
+		if (!$mskin)
25 25
 		{
26 26
 			$mskin = 'default';
27 27
 			$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
 
34 34
 		// if member_srl exists, set memberInfo
35 35
 		$member_srl = Context::get('member_srl');
36
-		if($member_srl)
36
+		if ($member_srl)
37 37
 		{
38 38
 			$oMemberModel = getModel('member');
39 39
 			$this->memberInfo = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
40
-			if(!$this->memberInfo)
40
+			if (!$this->memberInfo)
41 41
 			{
42
-				Context::set('member_srl','');
42
+				Context::set('member_srl', '');
43 43
 			}
44 44
 			else
45 45
 			{
46
-				Context::set('member_info',$this->memberInfo);
46
+				Context::set('member_info', $this->memberInfo);
47 47
 			}
48 48
 		}
49 49
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 		$oLayoutModel = getModel('layout');
53 53
 		$layout_info = $oLayoutModel->getLayout($this->member_config->mlayout_srl);
54
-		if($layout_info)
54
+		if ($layout_info)
55 55
 		{
56 56
 			$this->module_info->mlayout_srl = $this->member_config->mlayout_srl;
57 57
 			$this->setLayoutPath($layout_info->path);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	{
63 63
 		parent::dispMemberModifyInfo();
64 64
 
65
-		if($this->member_info)
65
+		if ($this->member_info)
66 66
 		{
67 67
 			Context::set('oMemberInfo', get_object_vars($this->member_info));
68 68
 		}
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
 		{
26 26
 			$mskin = 'default';
27 27
 			$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
28
-		}
29
-		else
28
+		} else
30 29
 		{
31 30
 			$template_path = sprintf('%sm.skins/%s', $this->module_path, $mskin);
32 31
 		}
@@ -40,8 +39,7 @@  discard block
 block discarded – undo
40 39
 			if(!$this->memberInfo)
41 40
 			{
42 41
 				Context::set('member_srl','');
43
-			}
44
-			else
42
+			} else
45 43
 			{
46 44
 				Context::set('member_info',$this->memberInfo);
47 45
 			}
Please login to merge, or discard this patch.
modules/member/member.view.php 4 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * @class  memberView
5
- * @author NAVER ([email protected])
6
- * @brief View class of member module
7
- */
4
+	 * @class  memberView
5
+	 * @author NAVER ([email protected])
6
+	 * @brief View class of member module
7
+	 */
8 8
 class memberView extends member
9 9
 {
10 10
 	var $group_list = NULL; // /< Group list information
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 	 * Spammer manage popup
636 636
 	 * 
637 637
 	 * @return void
638
-	**/
638
+	 **/
639 639
 	function dispMemberSpammer()
640 640
 	{
641 641
 		if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 		$skin = $this->member_config->skin;
27 27
 		// Set the template path
28
-		if(!$skin)
28
+		if (!$skin)
29 29
 		{
30 30
 			$skin = 'default';
31 31
 			$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 		$oLayoutModel = getModel('layout');
50 50
 		$layout_info = $oLayoutModel->getLayout($this->member_config->layout_srl);
51
-		if($layout_info)
51
+		if ($layout_info)
52 52
 		{
53 53
 			$this->module_info->layout_srl = $this->member_config->layout_srl;
54 54
 			$this->setLayoutPath($layout_info->path);
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
 		$oMemberModel = getModel('member');
64 64
 		$logged_info = Context::get('logged_info');
65 65
 		// Don't display member info to non-logged user
66
-		if(!$logged_info->member_srl) return $this->stop('msg_not_permitted');
66
+		if (!$logged_info->member_srl) return $this->stop('msg_not_permitted');
67 67
 
68 68
 		$member_srl = Context::get('member_srl');
69
-		if(!$member_srl && Context::get('is_logged'))
69
+		if (!$member_srl && Context::get('is_logged'))
70 70
 		{
71 71
 			$member_srl = $logged_info->member_srl;
72 72
 		}
73
-		elseif(!$member_srl)
73
+		elseif (!$member_srl)
74 74
 		{
75 75
 			return $this->dispMemberSignUpForm();
76 76
 		}
@@ -82,14 +82,14 @@  discard block
 block discarded – undo
82 82
 		unset($member_info->email_id);
83 83
 		unset($member_info->email_host);
84 84
 
85
-		if($logged_info->is_admin != 'Y' && ($member_info->member_srl != $logged_info->member_srl))
85
+		if ($logged_info->is_admin != 'Y' && ($member_info->member_srl != $logged_info->member_srl))
86 86
 		{
87
-			$start = strpos($member_info->email_address, '@')+1;
87
+			$start = strpos($member_info->email_address, '@') + 1;
88 88
 			$replaceStr = str_repeat('*', (strlen($member_info->email_address) - $start));
89 89
 			$member_info->email_address = substr_replace($member_info->email_address, $replaceStr, $start);
90 90
 		}
91 91
 
92
-		if(!$member_info->member_srl) return $this->dispMemberSignUpForm();
92
+		if (!$member_info->member_srl) return $this->dispMemberSignUpForm();
93 93
 
94 94
 		Context::set('memberInfo', get_object_vars($member_info));
95 95
 
@@ -107,46 +107,46 @@  discard block
 block discarded – undo
107 107
 	{
108 108
 		$logged_info = Context::get('logged_info');
109 109
 		$displayDatas = array();
110
-		foreach($memberConfig->signupForm as $no=>$formInfo)
110
+		foreach ($memberConfig->signupForm as $no=>$formInfo)
111 111
 		{
112
-			if(!$formInfo->isUse)
112
+			if (!$formInfo->isUse)
113 113
 			{
114 114
 				continue;
115 115
 			}
116 116
 
117
-			if($formInfo->name == 'password' || $formInfo->name == 'find_account_question')
117
+			if ($formInfo->name == 'password' || $formInfo->name == 'find_account_question')
118 118
 			{
119 119
 				continue;
120 120
 			}
121 121
 
122
-			if($logged_info->is_admin != 'Y' && $memberInfo->member_srl != $logged_info->member_srl && $formInfo->isPublic != 'Y')
122
+			if ($logged_info->is_admin != 'Y' && $memberInfo->member_srl != $logged_info->member_srl && $formInfo->isPublic != 'Y')
123 123
 			{
124 124
 				continue;
125 125
 			}
126 126
 
127 127
 			$item = $formInfo;
128 128
 
129
-			if($formInfo->isDefaultForm)
129
+			if ($formInfo->isDefaultForm)
130 130
 			{
131 131
 				$item->title = Context::getLang($formInfo->name);
132 132
 				$item->value = $memberInfo->{$formInfo->name};
133 133
 
134
-				if($formInfo->name == 'profile_image' && $memberInfo->profile_image)
134
+				if ($formInfo->name == 'profile_image' && $memberInfo->profile_image)
135 135
 				{
136 136
 					$target = $memberInfo->profile_image;
137
-					$item->value = '<img src="'.$target->src.'" />';
137
+					$item->value = '<img src="' . $target->src . '" />';
138 138
 				}
139
-				elseif($formInfo->name == 'image_name' && $memberInfo->image_name)
139
+				elseif ($formInfo->name == 'image_name' && $memberInfo->image_name)
140 140
 				{
141 141
 					$target = $memberInfo->image_name;
142
-					$item->value = '<img src="'.$target->src.'" />';
142
+					$item->value = '<img src="' . $target->src . '" />';
143 143
 				}
144
-				elseif($formInfo->name == 'image_mark' && $memberInfo->image_mark)
144
+				elseif ($formInfo->name == 'image_mark' && $memberInfo->image_mark)
145 145
 				{
146 146
 					$target = $memberInfo->image_mark;
147
-					$item->value = '<img src="'.$target->src.'" />';
147
+					$item->value = '<img src="' . $target->src . '" />';
148 148
 				}
149
-				elseif($formInfo->name == 'birthday' && $memberInfo->birthday)
149
+				elseif ($formInfo->name == 'birthday' && $memberInfo->birthday)
150 150
 				{
151 151
 					$item->value = zdate($item->value, 'Y-m-d');
152 152
 				}
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
 			{
156 156
 				$item->title = $extendFormInfo[$formInfo->member_join_form_srl]->column_title;
157 157
 				$orgValue = $extendFormInfo[$formInfo->member_join_form_srl]->value;
158
-				if($formInfo->type=='tel' && is_array($orgValue))
158
+				if ($formInfo->type == 'tel' && is_array($orgValue))
159 159
 				{
160 160
 					$item->value = implode('-', $orgValue);
161 161
 				}
162
-				elseif($formInfo->type=='kr_zip' && is_array($orgValue))
162
+				elseif ($formInfo->type == 'kr_zip' && is_array($orgValue))
163 163
 				{
164 164
 					$item->value = implode(' ', $orgValue);
165 165
 				}
166
-				elseif($formInfo->type=='checkbox' && is_array($orgValue))
166
+				elseif ($formInfo->type == 'checkbox' && is_array($orgValue))
167 167
 				{
168
-					$item->value = implode(", ",$orgValue);
168
+					$item->value = implode(", ", $orgValue);
169 169
 				}
170
-				elseif($formInfo->type=='date')
170
+				elseif ($formInfo->type == 'date')
171 171
 				{
172 172
 					$item->value = zdate($orgValue, "Y-m-d");
173 173
 				}
@@ -198,12 +198,12 @@  discard block
 block discarded – undo
198 198
 
199 199
 		$oMemberModel = getModel('member');
200 200
 		// Get the member information if logged-in
201
-		if($oMemberModel->isLogged()) return $this->stop('msg_already_logged');
201
+		if ($oMemberModel->isLogged()) return $this->stop('msg_already_logged');
202 202
 		// call a trigger (before) 
203 203
 		$trigger_output = ModuleHandler::triggerCall('member.dispMemberSignUpForm', 'before', $member_config);
204
-		if(!$trigger_output->toBool()) return $trigger_output;
204
+		if (!$trigger_output->toBool()) return $trigger_output;
205 205
 		// Error appears if the member is not allowed to join
206
-		if($member_config->enable_join != 'Y') return $this->stop('msg_signup_disabled');
206
+		if ($member_config->enable_join != 'Y') return $this->stop('msg_signup_disabled');
207 207
 
208 208
 		$oMemberAdminView = getAdminView('member');
209 209
 		$formTags = $oMemberAdminView->_getMemberInputTag($member_info);
@@ -226,15 +226,15 @@  discard block
 block discarded – undo
226 226
 	{
227 227
 		$logged_info = Context::get('logged_info');
228 228
 		$oMemberModel = getModel('member');
229
-		if(!$oMemberModel->isLogged() || empty($logged_info))
229
+		if (!$oMemberModel->isLogged() || empty($logged_info))
230 230
 		{
231 231
 			return $this->stop('msg_not_logged');
232 232
 		}
233 233
 
234 234
 		$_SESSION['rechecked_password_step'] = 'INPUT_PASSWORD';
235 235
 
236
-		$templateFile = $this->getTemplatePath().'rechecked_password.html';
237
-		if(!is_readable($templateFile))
236
+		$templateFile = $this->getTemplatePath() . 'rechecked_password.html';
237
+		if (!is_readable($templateFile))
238 238
 		{
239 239
 			$templatePath = sprintf('%sskins/default', $this->module_path);
240 240
 			$this->setTemplatePath($templatePath);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 */
260 260
 	function dispMemberModifyInfo() 
261 261
 	{
262
-		if($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD' && $_SESSION['rechecked_password_step'] != 'INPUT_DATA')
262
+		if ($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD' && $_SESSION['rechecked_password_step'] != 'INPUT_DATA')
263 263
 		{
264 264
 			$this->dispMemberModifyInfoBefore();
265 265
 			return;
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
 		$oMemberModel = getModel('member');
273 273
 		// A message appears if the user is not logged-in
274
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
274
+		if (!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
275 275
 
276 276
 		$logged_info = Context::get('logged_info');
277 277
 		$member_srl = $logged_info->member_srl;
@@ -279,13 +279,13 @@  discard block
 block discarded – undo
279 279
 		$columnList = array('member_srl', 'user_id', 'user_name', 'nick_name', 'email_address', 'find_account_answer', 'homepage', 'blog', 'birthday', 'allow_mailing');
280 280
 		$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
281 281
 		$member_info->signature = $oMemberModel->getSignature($member_srl);
282
-		Context::set('member_info',$member_info);
282
+		Context::set('member_info', $member_info);
283 283
 
284 284
 		// Get a list of extend join form
285 285
 		Context::set('extend_form_list', $oMemberModel->getCombineJoinForm($member_info));
286 286
 
287 287
 		// Editor of the module set for signing by calling getEditor
288
-		if($member_info->member_srl)
288
+		if ($member_info->member_srl)
289 289
 		{
290 290
 			$oEditorModel = getModel('editor');
291 291
 			$option = new stdClass();
@@ -330,15 +330,15 @@  discard block
 block discarded – undo
330 330
 	{
331 331
 		$oMemberModel = getModel('member');
332 332
 		// A message appears if the user is not logged-in
333
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
333
+		if (!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
334 334
 
335 335
 		$logged_info = Context::get('logged_info');
336 336
 		$member_srl = $logged_info->member_srl;
337 337
 
338 338
 		$module_srl = Context::get('module_srl');
339
-		Context::set('module_srl',Context::get('selected_module_srl'));
340
-		Context::set('search_target','member_srl');
341
-		Context::set('search_keyword',$member_srl);
339
+		Context::set('module_srl', Context::get('selected_module_srl'));
340
+		Context::set('search_target', 'member_srl');
341
+		Context::set('search_keyword', $member_srl);
342 342
 
343 343
 		$oDocumentAdminView = getAdminView('document');
344 344
 		$oDocumentAdminView->dispDocumentAdminList();
@@ -357,12 +357,12 @@  discard block
 block discarded – undo
357 357
 	{
358 358
 		$oMemberModel = getModel('member');
359 359
 		// A message appears if the user is not logged-in
360
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
360
+		if (!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
361 361
 
362 362
 		$logged_info = Context::get('logged_info');
363 363
 		$args = new stdClass();
364 364
 		$args->member_srl = $logged_info->member_srl;
365
-		$args->page = (int)Context::get('page');
365
+		$args->page = (int) Context::get('page');
366 366
 
367 367
 		$output = executeQuery('member.getScrapDocumentList', $args);
368 368
 		Context::set('total_count', $output->total_count);
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
 	{
382 382
 		$oMemberModel = getModel('member');
383 383
 		// A message appears if the user is not logged-in
384
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
384
+		if (!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
385 385
 		// Get the saved document(module_srl is set to member_srl instead)
386 386
 		$logged_info = Context::get('logged_info');
387 387
 		$args = new stdClass();
388 388
 		$args->member_srl = $logged_info->member_srl;
389
-		$args->page = (int)Context::get('page');
389
+		$args->page = (int) Context::get('page');
390 390
 		$args->statusList = array('TEMP');
391 391
 
392 392
 		$oDocumentModel = getModel('document');
@@ -405,10 +405,10 @@  discard block
 block discarded – undo
405 405
 	 */
406 406
 	function dispMemberLoginForm()
407 407
 	{
408
-		if(Context::get('is_logged'))
408
+		if (Context::get('is_logged'))
409 409
 		{
410
-			Context::set('redirect_url', getNotEncodedUrl('act',''));
411
-			$this->setTemplatePath($this->module_path.'tpl');
410
+			Context::set('redirect_url', getNotEncodedUrl('act', ''));
411
+			$this->setTemplatePath($this->module_path . 'tpl');
412 412
 			$this->setTemplateFile('redirect.html');
413 413
 			return;
414 414
 		}
@@ -420,10 +420,10 @@  discard block
 block discarded – undo
420 420
 
421 421
 		$XE_VALIDATOR_MESSAGE = Context::get('XE_VALIDATOR_MESSAGE');
422 422
 		$XE_VALIDATOR_ERROR = Context::get('XE_VALIDATOR_ERROR');
423
-		if($XE_VALIDATOR_ERROR == -11)
423
+		if ($XE_VALIDATOR_ERROR == -11)
424 424
 			Context::set('XE_VALIDATOR_MESSAGE', $XE_VALIDATOR_MESSAGE . $config->limit_day_description);
425 425
 
426
-		if($XE_VALIDATOR_ERROR < -10 && $XE_VALIDATOR_ERROR > -21)
426
+		if ($XE_VALIDATOR_ERROR < -10 && $XE_VALIDATOR_ERROR > -21)
427 427
 			Context::set('referer_url', getUrl('')); 
428 428
 		else
429 429
 			Context::set('referer_url', htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 	{
440 440
 		$oMemberModel = getModel('member');
441 441
 		// A message appears if the user is not logged-in
442
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
442
+		if (!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
443 443
 
444 444
 		$memberConfig = $this->member_config;
445 445
 
@@ -448,9 +448,9 @@  discard block
 block discarded – undo
448 448
 
449 449
 		$columnList = array('member_srl', 'user_id');
450 450
 		$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
451
-		Context::set('member_info',$member_info);
451
+		Context::set('member_info', $member_info);
452 452
 
453
-		if($memberConfig->identifier == 'user_id')
453
+		if ($memberConfig->identifier == 'user_id')
454 454
 		{
455 455
 			Context::set('identifier', 'user_id');
456 456
 			Context::set('formValue', $member_info->user_id);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 	{
472 472
 		$oMemberModel = getModel('member');
473 473
 		// A message appears if the user is not logged-in
474
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
474
+		if (!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
475 475
 
476 476
 		$memberConfig = $this->member_config;
477 477
 
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
 		$member_srl = $logged_info->member_srl;
480 480
 
481 481
 		$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
482
-		Context::set('member_info',$member_info);
482
+		Context::set('member_info', $member_info);
483 483
 
484
-		if($memberConfig->identifier == 'user_id')
484
+		if ($memberConfig->identifier == 'user_id')
485 485
 		{
486 486
 			Context::set('identifier', 'user_id');
487 487
 			Context::set('formValue', $member_info->user_id);
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 	{
503 503
 		$oMemberController = getController('member');
504 504
 		$output = $oMemberController->procMemberLogout();
505
-		if(!$output->redirect_url)
505
+		if (!$output->redirect_url)
506 506
 			$this->setRedirectUrl(getNotEncodedUrl('act', ''));
507 507
 		else
508 508
 			$this->setRedirectUrl($output->redirect_url);
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 	 */
525 525
 	function dispMemberFindAccount()
526 526
 	{
527
-		if(Context::get('is_logged')) return $this->stop('already_logged');
527
+		if (Context::get('is_logged')) return $this->stop('already_logged');
528 528
 
529 529
 		$config = $this->member_config;
530 530
 
@@ -538,13 +538,13 @@  discard block
 block discarded – undo
538 538
 	 */
539 539
 	function dispMemberGetTempPassword()
540 540
 	{
541
-		if(Context::get('is_logged')) return $this->stop('already_logged');
541
+		if (Context::get('is_logged')) return $this->stop('already_logged');
542 542
 
543 543
 		$user_id = Context::get('user_id');
544
-		$temp_password = $_SESSION['xe_temp_password_'.$user_id];
545
-		unset($_SESSION['xe_temp_password_'.$user_id]);
544
+		$temp_password = $_SESSION['xe_temp_password_' . $user_id];
545
+		unset($_SESSION['xe_temp_password_' . $user_id]);
546 546
 
547
-		if(!$user_id||!$temp_password) return new Object(-1,'msg_invaild_request');
547
+		if (!$user_id || !$temp_password) return new Object(-1, 'msg_invaild_request');
548 548
 
549 549
 		Context::set('temp_password', $temp_password);
550 550
 
@@ -559,12 +559,12 @@  discard block
 block discarded – undo
559 559
 		$authMemberSrl = $_SESSION['auth_member_srl'];
560 560
 		unset($_SESSION['auth_member_srl']);
561 561
 
562
-		if(Context::get('is_logged')) 
562
+		if (Context::get('is_logged')) 
563 563
 		{
564 564
 			return $this->stop('already_logged');
565 565
 		}
566 566
 
567
-		if($authMemberSrl)
567
+		if ($authMemberSrl)
568 568
 		{
569 569
 			$oMemberModel = getModel('member');
570 570
 			$memberInfo = $oMemberModel->getMemberInfoByMemberSrl($authMemberSrl);
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 
582 582
 	function dispMemberModifyEmailAddress()
583 583
 	{
584
-		if($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD' && $_SESSION['rechecked_password_step'] != 'INPUT_DATA')
584
+		if ($_SESSION['rechecked_password_step'] != 'VALIDATE_PASSWORD' && $_SESSION['rechecked_password_step'] != 'INPUT_DATA')
585 585
 		{
586 586
 			Context::set('success_return_url', getUrl('', 'mid', Context::get('mid'), 'act', 'dispMemberModifyEmailAddress'));
587 587
 			$this->dispMemberModifyInfoBefore();
@@ -609,10 +609,10 @@  discard block
 block discarded – undo
609 609
 		$js_code[] = 'if(!validator) return false;';
610 610
 
611 611
 		$errorLang = array();
612
-		foreach($extraList as $val) 
612
+		foreach ($extraList as $val) 
613 613
 		{
614 614
 			$title = str_ireplace(array('<script', '</script'), array('<scr"+"ipt', '</scr"+"ipt'), addslashes($val->column_title));
615
-			if($val->column_type == 'kr_zip' || $val->column_type == 'tel')
615
+			if ($val->column_type == 'kr_zip' || $val->column_type == 'tel')
616 616
 			{
617 617
 				$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["%s[]","%s"]);', $val->column_name, $title);
618 618
 			}
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 	**/
639 639
 	function dispMemberSpammer()
640 640
 	{
641
-		if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
641
+		if (!Context::get('is_logged')) return new Object(-1, 'msg_not_permitted');
642 642
 
643 643
 		$member_srl = Context::get('member_srl');
644 644
 		$module_srl = Context::get('module_srl');
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
 		$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
650 650
 		$grant = $oModuleModel->getGrant($module_info, Context::get('logged_info'));
651 651
 
652
-		if(!$grant->manager) return new Object(-1,'msg_not_permitted');
652
+		if (!$grant->manager) return new Object(-1, 'msg_not_permitted');
653 653
 
654 654
 		$oMemberModel = getModel('member');
655 655
 
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
 		$this->setLayoutPath('./common/tpl');
662 662
 		$this->setLayoutFile('popup_layout');
663 663
 
664
-		$this->setTemplatePath($this->module_path.'tpl');
664
+		$this->setTemplatePath($this->module_path . 'tpl');
665 665
 		$this->setTemplateFile('spammer');
666 666
 	}
667 667
 	
Please login to merge, or discard this patch.
Braces   +77 added lines, -58 removed lines patch added patch discarded remove patch
@@ -29,16 +29,14 @@  discard block
 block discarded – undo
29 29
 		{
30 30
 			$skin = 'default';
31 31
 			$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
32
-		}
33
-		else
32
+		} else
34 33
 		{
35 34
 			//check theme
36 35
 			$config_parse = explode('|@|', $skin);
37 36
 			if (count($config_parse) > 1)
38 37
 			{
39 38
 				$template_path = sprintf('./themes/%s/modules/member/', $config_parse[0]);
40
-			}
41
-			else
39
+			} else
42 40
 			{
43 41
 				$template_path = sprintf('%sskins/%s', $this->module_path, $skin);
44 42
 			}
@@ -63,14 +61,15 @@  discard block
 block discarded – undo
63 61
 		$oMemberModel = getModel('member');
64 62
 		$logged_info = Context::get('logged_info');
65 63
 		// Don't display member info to non-logged user
66
-		if(!$logged_info->member_srl) return $this->stop('msg_not_permitted');
64
+		if(!$logged_info->member_srl) {
65
+			return $this->stop('msg_not_permitted');
66
+		}
67 67
 
68 68
 		$member_srl = Context::get('member_srl');
69 69
 		if(!$member_srl && Context::get('is_logged'))
70 70
 		{
71 71
 			$member_srl = $logged_info->member_srl;
72
-		}
73
-		elseif(!$member_srl)
72
+		} elseif(!$member_srl)
74 73
 		{
75 74
 			return $this->dispMemberSignUpForm();
76 75
 		}
@@ -89,7 +88,9 @@  discard block
 block discarded – undo
89 88
 			$member_info->email_address = substr_replace($member_info->email_address, $replaceStr, $start);
90 89
 		}
91 90
 
92
-		if(!$member_info->member_srl) return $this->dispMemberSignUpForm();
91
+		if(!$member_info->member_srl) {
92
+			return $this->dispMemberSignUpForm();
93
+		}
93 94
 
94 95
 		Context::set('memberInfo', get_object_vars($member_info));
95 96
 
@@ -135,43 +136,35 @@  discard block
 block discarded – undo
135 136
 				{
136 137
 					$target = $memberInfo->profile_image;
137 138
 					$item->value = '<img src="'.$target->src.'" />';
138
-				}
139
-				elseif($formInfo->name == 'image_name' && $memberInfo->image_name)
139
+				} elseif($formInfo->name == 'image_name' && $memberInfo->image_name)
140 140
 				{
141 141
 					$target = $memberInfo->image_name;
142 142
 					$item->value = '<img src="'.$target->src.'" />';
143
-				}
144
-				elseif($formInfo->name == 'image_mark' && $memberInfo->image_mark)
143
+				} elseif($formInfo->name == 'image_mark' && $memberInfo->image_mark)
145 144
 				{
146 145
 					$target = $memberInfo->image_mark;
147 146
 					$item->value = '<img src="'.$target->src.'" />';
148
-				}
149
-				elseif($formInfo->name == 'birthday' && $memberInfo->birthday)
147
+				} elseif($formInfo->name == 'birthday' && $memberInfo->birthday)
150 148
 				{
151 149
 					$item->value = zdate($item->value, 'Y-m-d');
152 150
 				}
153
-			}
154
-			else
151
+			} else
155 152
 			{
156 153
 				$item->title = $extendFormInfo[$formInfo->member_join_form_srl]->column_title;
157 154
 				$orgValue = $extendFormInfo[$formInfo->member_join_form_srl]->value;
158 155
 				if($formInfo->type=='tel' && is_array($orgValue))
159 156
 				{
160 157
 					$item->value = implode('-', $orgValue);
161
-				}
162
-				elseif($formInfo->type=='kr_zip' && is_array($orgValue))
158
+				} elseif($formInfo->type=='kr_zip' && is_array($orgValue))
163 159
 				{
164 160
 					$item->value = implode(' ', $orgValue);
165
-				}
166
-				elseif($formInfo->type=='checkbox' && is_array($orgValue))
161
+				} elseif($formInfo->type=='checkbox' && is_array($orgValue))
167 162
 				{
168 163
 					$item->value = implode(", ",$orgValue);
169
-				}
170
-				elseif($formInfo->type=='date')
164
+				} elseif($formInfo->type=='date')
171 165
 				{
172 166
 					$item->value = zdate($orgValue, "Y-m-d");
173
-				}
174
-				else
167
+				} else
175 168
 				{
176 169
 					$item->value = nl2br($orgValue);
177 170
 				}
@@ -198,12 +191,18 @@  discard block
 block discarded – undo
198 191
 
199 192
 		$oMemberModel = getModel('member');
200 193
 		// Get the member information if logged-in
201
-		if($oMemberModel->isLogged()) return $this->stop('msg_already_logged');
194
+		if($oMemberModel->isLogged()) {
195
+			return $this->stop('msg_already_logged');
196
+		}
202 197
 		// call a trigger (before) 
203 198
 		$trigger_output = ModuleHandler::triggerCall('member.dispMemberSignUpForm', 'before', $member_config);
204
-		if(!$trigger_output->toBool()) return $trigger_output;
199
+		if(!$trigger_output->toBool()) {
200
+			return $trigger_output;
201
+		}
205 202
 		// Error appears if the member is not allowed to join
206
-		if($member_config->enable_join != 'Y') return $this->stop('msg_signup_disabled');
203
+		if($member_config->enable_join != 'Y') {
204
+			return $this->stop('msg_signup_disabled');
205
+		}
207 206
 
208 207
 		$oMemberAdminView = getAdminView('member');
209 208
 		$formTags = $oMemberAdminView->_getMemberInputTag($member_info);
@@ -244,8 +243,7 @@  discard block
 block discarded – undo
244 243
 		{
245 244
 			Context::set('identifierTitle', Context::getLang('email_address'));
246 245
 			Context::set('identifierValue', $logged_info->email_address); 
247
-		}
248
-		else
246
+		} else
249 247
 		{
250 248
 			Context::set('identifierTitle', Context::getLang('user_id'));
251 249
 			Context::set('identifierValue', $logged_info->user_id);
@@ -271,7 +269,9 @@  discard block
 block discarded – undo
271 269
 
272 270
 		$oMemberModel = getModel('member');
273 271
 		// A message appears if the user is not logged-in
274
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
272
+		if(!$oMemberModel->isLogged()) {
273
+			return $this->stop('msg_not_logged');
274
+		}
275 275
 
276 276
 		$logged_info = Context::get('logged_info');
277 277
 		$member_srl = $logged_info->member_srl;
@@ -330,7 +330,9 @@  discard block
 block discarded – undo
330 330
 	{
331 331
 		$oMemberModel = getModel('member');
332 332
 		// A message appears if the user is not logged-in
333
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
333
+		if(!$oMemberModel->isLogged()) {
334
+			return $this->stop('msg_not_logged');
335
+		}
334 336
 
335 337
 		$logged_info = Context::get('logged_info');
336 338
 		$member_srl = $logged_info->member_srl;
@@ -357,7 +359,9 @@  discard block
 block discarded – undo
357 359
 	{
358 360
 		$oMemberModel = getModel('member');
359 361
 		// A message appears if the user is not logged-in
360
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
362
+		if(!$oMemberModel->isLogged()) {
363
+			return $this->stop('msg_not_logged');
364
+		}
361 365
 
362 366
 		$logged_info = Context::get('logged_info');
363 367
 		$args = new stdClass();
@@ -381,7 +385,9 @@  discard block
 block discarded – undo
381 385
 	{
382 386
 		$oMemberModel = getModel('member');
383 387
 		// A message appears if the user is not logged-in
384
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
388
+		if(!$oMemberModel->isLogged()) {
389
+			return $this->stop('msg_not_logged');
390
+		}
385 391
 		// Get the saved document(module_srl is set to member_srl instead)
386 392
 		$logged_info = Context::get('logged_info');
387 393
 		$args = new stdClass();
@@ -420,13 +426,15 @@  discard block
 block discarded – undo
420 426
 
421 427
 		$XE_VALIDATOR_MESSAGE = Context::get('XE_VALIDATOR_MESSAGE');
422 428
 		$XE_VALIDATOR_ERROR = Context::get('XE_VALIDATOR_ERROR');
423
-		if($XE_VALIDATOR_ERROR == -11)
424
-			Context::set('XE_VALIDATOR_MESSAGE', $XE_VALIDATOR_MESSAGE . $config->limit_day_description);
429
+		if($XE_VALIDATOR_ERROR == -11) {
430
+					Context::set('XE_VALIDATOR_MESSAGE', $XE_VALIDATOR_MESSAGE . $config->limit_day_description);
431
+		}
425 432
 
426
-		if($XE_VALIDATOR_ERROR < -10 && $XE_VALIDATOR_ERROR > -21)
427
-			Context::set('referer_url', getUrl('')); 
428
-		else
429
-			Context::set('referer_url', htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
433
+		if($XE_VALIDATOR_ERROR < -10 && $XE_VALIDATOR_ERROR > -21) {
434
+					Context::set('referer_url', getUrl(''));
435
+		} else {
436
+					Context::set('referer_url', htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
437
+		}
430 438
 
431 439
 		// Set a template file
432 440
 		$this->setTemplateFile('login_form');
@@ -439,7 +447,9 @@  discard block
 block discarded – undo
439 447
 	{
440 448
 		$oMemberModel = getModel('member');
441 449
 		// A message appears if the user is not logged-in
442
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
450
+		if(!$oMemberModel->isLogged()) {
451
+			return $this->stop('msg_not_logged');
452
+		}
443 453
 
444 454
 		$memberConfig = $this->member_config;
445 455
 
@@ -454,8 +464,7 @@  discard block
 block discarded – undo
454 464
 		{
455 465
 			Context::set('identifier', 'user_id');
456 466
 			Context::set('formValue', $member_info->user_id);
457
-		}
458
-		else
467
+		} else
459 468
 		{
460 469
 			Context::set('identifier', 'email_address');
461 470
 			Context::set('formValue', $member_info->email_address);
@@ -471,7 +480,9 @@  discard block
 block discarded – undo
471 480
 	{
472 481
 		$oMemberModel = getModel('member');
473 482
 		// A message appears if the user is not logged-in
474
-		if(!$oMemberModel->isLogged()) return $this->stop('msg_not_logged');
483
+		if(!$oMemberModel->isLogged()) {
484
+			return $this->stop('msg_not_logged');
485
+		}
475 486
 
476 487
 		$memberConfig = $this->member_config;
477 488
 
@@ -485,8 +496,7 @@  discard block
 block discarded – undo
485 496
 		{
486 497
 			Context::set('identifier', 'user_id');
487 498
 			Context::set('formValue', $member_info->user_id);
488
-		}
489
-		else
499
+		} else
490 500
 		{
491 501
 			Context::set('identifier', 'email_address');
492 502
 			Context::set('formValue', $member_info->email_address);
@@ -502,10 +512,11 @@  discard block
 block discarded – undo
502 512
 	{
503 513
 		$oMemberController = getController('member');
504 514
 		$output = $oMemberController->procMemberLogout();
505
-		if(!$output->redirect_url)
506
-			$this->setRedirectUrl(getNotEncodedUrl('act', ''));
507
-		else
508
-			$this->setRedirectUrl($output->redirect_url);
515
+		if(!$output->redirect_url) {
516
+					$this->setRedirectUrl(getNotEncodedUrl('act', ''));
517
+		} else {
518
+					$this->setRedirectUrl($output->redirect_url);
519
+		}
509 520
 
510 521
 		return;
511 522
 	}
@@ -524,7 +535,9 @@  discard block
 block discarded – undo
524 535
 	 */
525 536
 	function dispMemberFindAccount()
526 537
 	{
527
-		if(Context::get('is_logged')) return $this->stop('already_logged');
538
+		if(Context::get('is_logged')) {
539
+			return $this->stop('already_logged');
540
+		}
528 541
 
529 542
 		$config = $this->member_config;
530 543
 
@@ -538,13 +551,17 @@  discard block
 block discarded – undo
538 551
 	 */
539 552
 	function dispMemberGetTempPassword()
540 553
 	{
541
-		if(Context::get('is_logged')) return $this->stop('already_logged');
554
+		if(Context::get('is_logged')) {
555
+			return $this->stop('already_logged');
556
+		}
542 557
 
543 558
 		$user_id = Context::get('user_id');
544 559
 		$temp_password = $_SESSION['xe_temp_password_'.$user_id];
545 560
 		unset($_SESSION['xe_temp_password_'.$user_id]);
546 561
 
547
-		if(!$user_id||!$temp_password) return new Object(-1,'msg_invaild_request');
562
+		if(!$user_id||!$temp_password) {
563
+			return new Object(-1,'msg_invaild_request');
564
+		}
548 565
 
549 566
 		Context::set('temp_password', $temp_password);
550 567
 
@@ -572,8 +589,7 @@  discard block
 block discarded – undo
572 589
 			$_SESSION['auth_member_info'] = $memberInfo;
573 590
 			Context::set('memberInfo', $memberInfo);
574 591
 			$this->setTemplateFile('reset_mail');
575
-		}
576
-		else
592
+		} else
577 593
 		{
578 594
 			$this->setTemplateFile('resend_auth_mail');
579 595
 		}
@@ -615,8 +631,7 @@  discard block
 block discarded – undo
615 631
 			if($val->column_type == 'kr_zip' || $val->column_type == 'tel')
616 632
 			{
617 633
 				$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["%s[]","%s"]);', $val->column_name, $title);
618
-			}
619
-			else
634
+			} else
620 635
 			{
621 636
 				$js_code[] = sprintf('validator.cast("ADD_MESSAGE", ["%s","%s"]);', $val->column_name, $title);
622 637
 			}
@@ -638,7 +653,9 @@  discard block
 block discarded – undo
638 653
 	**/
639 654
 	function dispMemberSpammer()
640 655
 	{
641
-		if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
656
+		if(!Context::get('is_logged')) {
657
+			return new Object(-1,'msg_not_permitted');
658
+		}
642 659
 
643 660
 		$member_srl = Context::get('member_srl');
644 661
 		$module_srl = Context::get('module_srl');
@@ -649,7 +666,9 @@  discard block
 block discarded – undo
649 666
 		$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl, $columnList);
650 667
 		$grant = $oModuleModel->getGrant($module_info, Context::get('logged_info'));
651 668
 
652
-		if(!$grant->manager) return new Object(-1,'msg_not_permitted');
669
+		if(!$grant->manager) {
670
+			return new Object(-1,'msg_not_permitted');
671
+		}
653 672
 
654 673
 		$oMemberModel = getModel('member');
655 674
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	/**
111 111
 	 * RSS Module configurations
112 112
 	 *
113
-	 * @return void
113
+	 * @return Object|null
114 114
 	 */
115 115
 	function procRssAdminInsertModuleConfig()
116 116
 	{
Please login to merge, or discard this patch.
modules/menu/menu.admin.model.php 4 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * @class  menuAdminModel
5
- * @brief admin model class of the menu module
6
- *
7
- * @author NAVER ([email protected])
8
- * @package /modules/menu
9
- * @version 0.1
10
- */
4
+	 * @class  menuAdminModel
5
+	 * @brief admin model class of the menu module
6
+	 *
7
+	 * @author NAVER ([email protected])
8
+	 * @package /modules/menu
9
+	 * @version 0.1
10
+	 */
11 11
 class menuAdminModel extends menu
12 12
 {
13 13
 	private $menuSrlWithinHome = 0;
Please login to merge, or discard this patch.
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
 	 */
28 28
 	function getMenuList($obj)
29 29
 	{
30
-		if(!$obj->site_srl)
30
+		if (!$obj->site_srl)
31 31
 		{
32 32
 			$site_module_info = Context::get('site_module_info');
33
-			$obj->site_srl = (int)$site_module_info->site_srl;
33
+			$obj->site_srl = (int) $site_module_info->site_srl;
34 34
 		}
35 35
 		$args = new stdClass;
36 36
 		$args->site_srl = $obj->site_srl;
37 37
 		$args->sort_index = $obj->sort_index;
38
-		$args->page = $obj->page?$obj->page:1;
39
-		$args->list_count = $obj->list_count?$obj->list_count:20;
40
-		$args->page_count = $obj->page_count?$obj->page_count:10;
38
+		$args->page = $obj->page ? $obj->page : 1;
39
+		$args->list_count = $obj->list_count ? $obj->list_count : 20;
40
+		$args->page_count = $obj->page_count ? $obj->page_count : 10;
41 41
 		// document.getDocumentList query execution
42 42
 		$output = executeQuery('menu.getMenuList', $args);
43 43
 		// Return if no result or an error occurs
44
-		if(!$output->toBool()||!count($output->data)) return $output;
44
+		if (!$output->toBool() || !count($output->data)) return $output;
45 45
 
46 46
 		return $output;
47 47
 	}
@@ -53,17 +53,17 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	function getMenus($site_srl = null)
55 55
 	{
56
-		if(!isset($site_srl))
56
+		if (!isset($site_srl))
57 57
 		{
58 58
 			$site_module_info = Context::get('site_module_info');
59
-			$site_srl = (int)$site_module_info->site_srl;
59
+			$site_srl = (int) $site_module_info->site_srl;
60 60
 		}
61 61
 		// Get information from the DB
62 62
 		$args = new stdClass();
63
-		$args->site_srl = $site_srl ;
63
+		$args->site_srl = $site_srl;
64 64
 		$args->menu_srl = $menu_srl;
65 65
 		$output = executeQueryArray('menu.getMenus', $args);
66
-		if(!$output->data) return;
66
+		if (!$output->data) return;
67 67
 		$menus = $output->data;
68 68
 		return $menus;
69 69
 	}
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 		$args = new stdClass();
81 81
 		$args->menu_srl = $menu_srl;
82 82
 		$output = executeQuery('menu.getMenu', $args);
83
-		if(!$output->data) return;
83
+		if (!$output->data) return;
84 84
 
85 85
 		$menu_info = $output->data;
86
-		$menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php',$menu_srl);
87
-		$menu_info->php_file = sprintf('./files/cache/menu/%s.php',$menu_srl);
86
+		$menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php', $menu_srl);
87
+		$menu_info->php_file = sprintf('./files/cache/menu/%s.php', $menu_srl);
88 88
 		return $menu_info;
89 89
 	}
90 90
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	function getMenuByTitle($title, $site_srl = 0)
98 98
 	{
99 99
 		// Get information from the DB
100
-		if(!is_array($title))
100
+		if (!is_array($title))
101 101
 		{
102 102
 			$title = array($title);
103 103
 		}
@@ -105,15 +105,15 @@  discard block
 block discarded – undo
105 105
 		$args->title = $title;
106 106
 		$args->site_srl = $site_srl;
107 107
 		$output = executeQuery('menu.getMenuByTitle', $args);
108
-		if(!$output->data) return;
108
+		if (!$output->data) return;
109 109
 
110
-		if(is_array($output->data)) $menu_info = $output->data[0];
110
+		if (is_array($output->data)) $menu_info = $output->data[0];
111 111
 		else $menu_info = $output->data;
112 112
 
113
-		if($menu_info->menu_srl)
113
+		if ($menu_info->menu_srl)
114 114
 		{
115
-			$menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php',$menu_info->menu_srl);
116
-			$menu_info->php_file = sprintf('./files/cache/menu/%s.php',$menu_info->menu_srl);
115
+			$menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php', $menu_info->menu_srl);
116
+			$menu_info->php_file = sprintf('./files/cache/menu/%s.php', $menu_info->menu_srl);
117 117
 		}
118 118
 		return $menu_info;
119 119
 	}
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		$args = new stdClass();
131 131
 		$args->title = $title;
132 132
 		$output = executeQueryArray('menu.getMenuByTitle', $args);
133
-		if(!$output->data)
133
+		if (!$output->data)
134 134
 		{
135 135
 			return array();
136 136
 		}
@@ -151,16 +151,16 @@  discard block
 block discarded – undo
151 151
 		$args->menu_item_srl = $menu_item_srl;
152 152
 		$output = executeQuery('menu.getMenuItem', $args);
153 153
 		$node = $output->data;
154
-		settype($node,'object');
155
-		if($node->group_srls) $node->group_srls = explode(',',$node->group_srls);
154
+		settype($node, 'object');
155
+		if ($node->group_srls) $node->group_srls = explode(',', $node->group_srls);
156 156
 		else $node->group_srls = array();
157 157
 
158 158
 		$tmp_name = unserialize($node->name);
159
-		if($tmp_name && count($tmp_name))
159
+		if ($tmp_name && count($tmp_name))
160 160
 		{
161 161
 			$selected_lang = array();
162 162
 			$rand_name = $tmp_name[Context::getLangType()];
163
-			if(!$rand_name) $rand_name = array_shift($tmp_name);
163
+			if (!$rand_name) $rand_name = array_shift($tmp_name);
164 164
 			$node->name = $rand_name;
165 165
 		}
166 166
 		return $node;
@@ -175,18 +175,18 @@  discard block
 block discarded – undo
175 175
 		$menuItemSrl = Context::get('menu_item_srl');
176 176
 		$menuItem = $this->getMenuItemInfo($menuItemSrl);
177 177
 
178
-		if(!$menuItem->url)
178
+		if (!$menuItem->url)
179 179
 		{
180 180
 			$menuItem->moduleType = null;
181 181
 		}
182
-		else if(strncasecmp('http', $menuItem->url, 4) !== 0)
182
+		else if (strncasecmp('http', $menuItem->url, 4) !== 0)
183 183
 		{
184 184
 			$oModuleModel = getModel('module');
185 185
 			$moduleInfo = $oModuleModel->getModuleInfoByMid($menuItem->url, 0);
186
-			if(!$moduleInfo) $menuItem->moduleType = 'url';
186
+			if (!$moduleInfo) $menuItem->moduleType = 'url';
187 187
 			else
188 188
 			{
189
-				if($moduleInfo->mid == $menuItem->url)
189
+				if ($moduleInfo->mid == $menuItem->url)
190 190
 				{
191 191
 					$menuItem->moduleType = $moduleInfo->module;
192 192
 					$menuItem->pageType = $moduleInfo->page_type;
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
 		else $menuItem->moduleType = 'url';
198 198
 
199 199
 		// grant setting
200
-		if(is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0)
200
+		if (is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0)
201 201
 		{
202
-			if($menuItem->group_srls[0] == -1)
202
+			if ($menuItem->group_srls[0] == -1)
203 203
 			{
204 204
 				$menuItem->grant = 'member';
205 205
 			}
206
-			else if($menuItem->group_srls[0] == -3)
206
+			else if ($menuItem->group_srls[0] == -3)
207 207
 			{
208 208
 				$menuItem->grant = 'manager';
209 209
 			}
@@ -217,21 +217,21 @@  discard block
 block discarded – undo
217 217
 		$oMemberModel = getModel('member');
218 218
 		$oModuleAdminModel = getAdminModel('module');
219 219
 		$output = $oMemberModel->getGroups();
220
-		if(is_array($output))
220
+		if (is_array($output))
221 221
 		{
222 222
 			$groupList = array();
223
-			foreach($output AS $key=>$value)
223
+			foreach ($output AS $key=>$value)
224 224
 			{
225 225
 				$groupList[$value->group_srl] = new stdClass();
226 226
 				$groupList[$value->group_srl]->group_srl = $value->group_srl;
227
-				if(substr($value->title,0,12)=='$user_lang->')
227
+				if (substr($value->title, 0, 12) == '$user_lang->')
228 228
 				{
229 229
 					$tmp = $oModuleAdminModel->getLangCode(0, $value->title);
230 230
 					$groupList[$value->group_srl]->title = $tmp[Context::getLangType()];
231 231
 				}
232 232
 				else $groupList[$value->group_srl]->title = $value->title;
233 233
 
234
-				if(in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked = true;
234
+				if (in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked = true;
235 235
 				else $groupList[$value->group_srl]->isChecked = false;
236 236
 			}
237 237
 		}
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
 	 */
270 270
 	function getMenuItemNames($source_name, $site_srl = null)
271 271
 	{
272
-		if(!$site_srl)
272
+		if (!$site_srl)
273 273
 		{
274 274
 			$site_module_info = Context::get('site_module_info');
275
-			$site_srl = (int)$site_module_info->site_srl;
275
+			$site_srl = (int) $site_module_info->site_srl;
276 276
 		}
277 277
 		// Get language code
278 278
 		$oModuleAdminModel = getAdminModel('module');
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
 		// Add a sub-menu if there is parent_srl but not menu_item_srl
298 298
 		$item_info = new stdClass;
299
-		if(!$menu_item_srl && $parent_srl)
299
+		if (!$menu_item_srl && $parent_srl)
300 300
 		{
301 301
 			// Get information of the parent menu
302 302
 			$parent_info = $this->getMenuItemInfo($parent_srl);
@@ -309,9 +309,9 @@  discard block
 block discarded – undo
309 309
 		else
310 310
 		{
311 311
 			// Get information of the menu if menu_item_srl exists
312
-			if($menu_item_srl) $item_info = $this->getMenuItemInfo($menu_item_srl);
312
+			if ($menu_item_srl) $item_info = $this->getMenuItemInfo($menu_item_srl);
313 313
 			// Get only menu_item_srl if no values found, considering it as adding a new menu
314
-			if(!$item_info->menu_item_srl)
314
+			if (!$item_info->menu_item_srl)
315 315
 			{
316 316
 				$item_info->menu_item_srl = getNextSequence();
317 317
 			}
@@ -325,9 +325,9 @@  discard block
 block discarded – undo
325 325
 
326 326
 		// Compile the template file into tpl variable and then return it
327 327
 		$oTemplate = &TemplateHandler::getInstance();
328
-		$tpl = $oTemplate->compile($this->module_path.'tpl', 'menu_item_info');
328
+		$tpl = $oTemplate->compile($this->module_path . 'tpl', 'menu_item_info');
329 329
 
330
-		$this->add('tpl', str_replace("\n"," ",$tpl));
330
+		$this->add('tpl', str_replace("\n", " ", $tpl));
331 331
 	}
332 332
 
333 333
 	/**
@@ -346,10 +346,10 @@  discard block
 block discarded – undo
346 346
 
347 347
 		Context::loadLang('modules/page/lang');
348 348
 
349
-		foreach($_allModules as $module_name)
349
+		foreach ($_allModules as $module_name)
350 350
 		{
351 351
 			$module = $oModuleModel->getModuleInfoXml($module_name);
352
-			if(!isset($module)) continue;
352
+			if (!isset($module)) continue;
353 353
 			$defaultSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'P');
354 354
 			$defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M');
355 355
 			$skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin);
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 			$module->package_srl = $oAutoinstallModel->getPackageSrlByPath('./modules/' . $module_name);
365 365
 			$module->url = _XE_LOCATION_SITE_ . '?mid=download&package_srl=' . $module->package_srl;
366 366
 
367
-			if($module_name == 'page')
367
+			if ($module_name == 'page')
368 368
 			{
369 369
 				$pageTypeName = Context::getLang('page_type_name');
370 370
 				$module->title = $pageTypeName['ARTICLE'];
@@ -401,11 +401,11 @@  discard block
 block discarded – undo
401 401
 		$moduleList = array('page');
402 402
 
403 403
 		$output = $oModuleModel->getModuleListByInstance($site_srl);
404
-		if(is_array($output->data))
404
+		if (is_array($output->data))
405 405
 		{
406
-			foreach($output->data as $value)
406
+			foreach ($output->data as $value)
407 407
 			{
408
-				if($value->instanceCount > 1)
408
+				if ($value->instanceCount > 1)
409 409
 				{
410 410
 					$moduleList[] = $value->module;
411 411
 				}
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 
415 415
 		// after trigger
416 416
 		$output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
417
-		if(!$output->toBool()) return $output;
417
+		if (!$output->toBool()) return $output;
418 418
 
419 419
 		$localModuleList = array_unique($moduleList);
420 420
 
@@ -423,9 +423,9 @@  discard block
 block discarded – undo
423 423
 		// get have instance
424 424
 		$remotePackageList = $oAutoinstallModel->getHaveInstance(array('path'));
425 425
 		$remoteModuleList = array();
426
-		foreach($remotePackageList as $package)
426
+		foreach ($remotePackageList as $package)
427 427
 		{
428
-			if(strpos($package->path, './modules/') !== 0) continue;
428
+			if (strpos($package->path, './modules/') !== 0) continue;
429 429
 
430 430
 			$pathInfo = explode('/', $package->path);
431 431
 			$remoteModuleList[] = $pathInfo[2];
@@ -443,13 +443,13 @@  discard block
 block discarded – undo
443 443
 
444 444
 		$moduleInfoList = array();
445 445
 		Context::loadLang('modules/page/lang');
446
-		if(is_array($moduleList))
446
+		if (is_array($moduleList))
447 447
 		{
448
-			foreach($moduleList as $value)
448
+			foreach ($moduleList as $value)
449 449
 			{
450 450
 				$moduleInfo = $oModuleModel->getModuleInfoXml($value);
451 451
 
452
-				if($value == 'page')
452
+				if ($value == 'page')
453 453
 				{
454 454
 					$pageTypeName = Context::getLang('page_type_name');
455 455
 					$moduleInfo->title = $pageTypeName['ARTICLE'];
@@ -480,10 +480,10 @@  discard block
 block discarded – undo
480 480
 		$siteSrl = Context::get('site_srl');
481 481
 		$menuSrl = Context::get('menu_srl');
482 482
 
483
-		if(!isset($siteSrl))
483
+		if (!isset($siteSrl))
484 484
 		{
485 485
 			$site_module_info = Context::get('site_module_info');
486
-			$siteSrl = (int)$site_module_info->site_srl;
486
+			$siteSrl = (int) $site_module_info->site_srl;
487 487
 		}
488 488
 
489 489
 		$oModuleModel = getModel('module');
@@ -492,24 +492,24 @@  discard block
 block discarded – undo
492 492
 		$start_module = $oModuleModel->getSiteInfo(0, $columnList);
493 493
 
494 494
 		$menuList = array();
495
-		if($menuSrl)
495
+		if ($menuSrl)
496 496
 		{
497 497
 			$isMenuFixed = false;
498 498
 			$output = $this->getMenu($menuSrl);
499
-			$php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$output->menu_srl);
500
-			if(file_exists($php_file)) include($php_file);
499
+			$php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php', $output->menu_srl);
500
+			if (file_exists($php_file)) include($php_file);
501 501
 			else $oMenuAdminController->makeXmlFile($menuSrl);
502 502
 
503
-			if(count($menu->list)>0)
503
+			if (count($menu->list) > 0)
504 504
 			{
505
-				foreach($menu->list AS $key=>$value)
505
+				foreach ($menu->list AS $key=>$value)
506 506
 				{
507
-					$this->_menuInfoSetting($menu->list[$key], $start_module, $isMenuFixed, $menuSrl,$siteSrl);
507
+					$this->_menuInfoSetting($menu->list[$key], $start_module, $isMenuFixed, $menuSrl, $siteSrl);
508 508
 				}
509 509
 			}
510 510
 
511 511
 			// menu recreate
512
-			if($isMenuFixed)
512
+			if ($isMenuFixed)
513 513
 			{
514 514
 				$oMenuAdminController->makeXmlFile($menuSrl);
515 515
 			}
@@ -522,18 +522,18 @@  discard block
 block discarded – undo
522 522
 		else
523 523
 		{
524 524
 			$menuListFromDB = $this->getMenus($siteSrl);
525
-			if(is_array($menuListFromDB))
525
+			if (is_array($menuListFromDB))
526 526
 			{
527 527
 				$oAdmin = getClass('admin');
528
-				foreach($menuListFromDB AS $key=>$value)
528
+				foreach ($menuListFromDB AS $key=>$value)
529 529
 				{
530
-					if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]);
530
+					if ($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]);
531 531
 					else
532 532
 					{
533 533
 						unset($menu);
534 534
 						unset($menuItems);
535
-						$value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$value->menu_srl);
536
-						if(!file_exists($value->php_file))
535
+						$value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php', $value->menu_srl);
536
+						if (!file_exists($value->php_file))
537 537
 						{
538 538
 							$oMenuAdminController->makeXmlFile($value->menu_srl);
539 539
 						}
@@ -541,16 +541,16 @@  discard block
 block discarded – undo
541 541
 						include($value->php_file);
542 542
 
543 543
 						$isMenuFixed = false;
544
-						if(count($menu->list) > 0)
544
+						if (count($menu->list) > 0)
545 545
 						{
546
-							foreach($menu->list AS $key2=>$value2)
546
+							foreach ($menu->list AS $key2=>$value2)
547 547
 							{
548
-								$this->_menuInfoSetting($menu->list[$key2], $start_module, $isMenuFixed, $value->menu_srl,$siteSrl);
548
+								$this->_menuInfoSetting($menu->list[$key2], $start_module, $isMenuFixed, $value->menu_srl, $siteSrl);
549 549
 							}
550 550
 						}
551 551
 
552 552
 						// menu recreate
553
-						if($isMenuFixed)
553
+						if ($isMenuFixed)
554 554
 						{
555 555
 							$oMenuAdminController->makeXmlFile($value->menu_srl);
556 556
 						}
@@ -561,7 +561,7 @@  discard block
 block discarded – undo
561 561
 						$menuItems->menuItems = $menu;
562 562
 
563 563
 						// If include home menu, move first
564
-						if($value->menu_srl == $this->menuSrlWithinHome)
564
+						if ($value->menu_srl == $this->menuSrlWithinHome)
565 565
 						{
566 566
 							$menuList[-1] = $menuItems;
567 567
 						}
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 	public function getMenuAdminDetailSetup()
585 585
 	{
586 586
 		$menuItemSrl = Context::get('menu_item_srl');
587
-		if(!$menuItemSrl)
587
+		if (!$menuItemSrl)
588 588
 		{
589 589
 			return new Object(-1, 'msg_invalid_request');
590 590
 		}
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 		$menuItemInfo = $this->getMenuItemInfo($menuItemSrl);
593 593
 
594 594
 		// if menu is shortcut
595
-		if($menuItemInfo->is_shortcut == 'Y')
595
+		if ($menuItemInfo->is_shortcut == 'Y')
596 596
 		{
597 597
 			return new Object(-1, 'msg_invalid_request');
598 598
 		}
@@ -604,18 +604,18 @@  discard block
 block discarded – undo
604 604
 		// get xml info
605 605
 		$moduleConfInfo = $oModuleModel->getModuleInfoXml($moduleInfo->module);
606 606
 
607
-		if($moduleConfInfo->setup_index_act)
607
+		if ($moduleConfInfo->setup_index_act)
608 608
 		{
609 609
 			$setupUrl = getNotEncodedUrl('', 'module', 'admin', 'act', $moduleConfInfo->setup_index_act, 'module_srl', $moduleInfo->module_srl, 'isLayoutDrop', '1');
610 610
 		}
611 611
 
612
-		if($moduleConfInfo->simple_setup_index_act)
612
+		if ($moduleConfInfo->simple_setup_index_act)
613 613
 		{
614 614
 			$oTargetmoduleAdminModel = getAdminModel($moduleInfo->module);
615 615
 			$advancedSetupUrl = getUrl('', 'module', 'admin', 'act', $moduleConfInfo->setup_index_act, 'module_srl', $moduleInfo->module_srl);
616 616
 			$simpleSetupHtml = $oTargetmoduleAdminModel->{$moduleConfInfo->simple_setup_index_act}($moduleInfo->module_srl, $advancedSetupUrl);
617 617
 
618
-			if($simpleSetupHtml)
618
+			if ($simpleSetupHtml)
619 619
 			{
620 620
 				$this->add('simpleSetupHtml', $simpleSetupHtml);
621 621
 			}
@@ -628,18 +628,18 @@  discard block
 block discarded – undo
628 628
 	 * @param array $menu
629 629
 	 * @return void
630 630
 	 */
631
-	private function _menuInfoSetting(&$menu, &$start_module, &$isMenuFixed, $menuSrl,$siteSrl = 0)
631
+	private function _menuInfoSetting(&$menu, &$start_module, &$isMenuFixed, $menuSrl, $siteSrl = 0)
632 632
 	{
633 633
 		$oModuleModel = getModel('module');
634 634
 		// if url is empty and is_shortcut is 'N', change to is_shortcut 'Y'
635
-		if(!$menu['url'] && $menu['is_shortcut'] == 'N')
635
+		if (!$menu['url'] && $menu['is_shortcut'] == 'N')
636 636
 		{
637 637
 			$menu['is_shortcut'] = 'Y';
638 638
 
639 639
 			$args = new stdClass;
640 640
 			$args->menu_item_srl = $menu['node_srl'];
641 641
 			$args->is_shortcut = 'Y';
642
-			if($menu['menu_name_key']) $args->name = $menu['menu_name_key'];
642
+			if ($menu['menu_name_key']) $args->name = $menu['menu_name_key'];
643 643
 			else $args->name = $menu['menu_name'];
644 644
 			$output = executeQuery('menu.updateMenuItem', $args);
645 645
 
@@ -648,17 +648,17 @@  discard block
 block discarded – undo
648 648
 
649 649
 		//if menu type is module menu
650 650
 		//if(!empty($menu['url']) && !preg_match('/^http/i', $menu['url']))
651
-		if($menu['is_shortcut'] != 'Y')
651
+		if ($menu['is_shortcut'] != 'Y')
652 652
 		{
653 653
 			unset($midInfo, $moduleInfo);
654 654
 			$midInfo = $oModuleModel->getModuleInfoByMid($menu['url'], $siteSrl);
655 655
 			$moduleInfo = $oModuleModel->getModuleInfoXml($midInfo->module);
656 656
 
657
-			if($midInfo)
657
+			if ($midInfo)
658 658
 			{
659 659
 				$menu['module_srl'] = $midInfo->module_srl;
660 660
 				$menu['module'] = $midInfo->module;
661
-				if($midInfo->page_type)
661
+				if ($midInfo->page_type)
662 662
 				{
663 663
 					$menu['module_type'] = $midInfo->page_type;
664 664
 				}
@@ -668,16 +668,16 @@  discard block
 block discarded – undo
668 668
 				}
669 669
 			}
670 670
 
671
-			if($moduleInfo->setup_index_act)
671
+			if ($moduleInfo->setup_index_act)
672 672
 			{
673 673
 				$menu['setup_index_act'] = $moduleInfo->setup_index_act;
674 674
 			}
675
-			else if($moduleInfo->default_index_act)
675
+			else if ($moduleInfo->default_index_act)
676 676
 			{
677 677
 				$menu['setup_index_act'] = $moduleInfo->default_index_act;
678 678
 			}
679 679
 
680
-			if($menu['is_shortcut'] == 'N' && $midInfo->mid == $start_module->mid)
680
+			if ($menu['is_shortcut'] == 'N' && $midInfo->mid == $start_module->mid)
681 681
 			{
682 682
 				$menu['is_start_module'] = true;
683 683
 				$this->menuSrlWithinHome = $menuSrl;
@@ -686,9 +686,9 @@  discard block
 block discarded – undo
686 686
 			$menu['layout_srl'] = $midInfo->layout_srl;
687 687
 			$menu['browser_title'] = $midInfo->browser_title;
688 688
 		}
689
-		if(count($menu['list']) > 0)
689
+		if (count($menu['list']) > 0)
690 690
 		{
691
-			foreach($menu['list'] as $key=>$value)
691
+			foreach ($menu['list'] as $key=>$value)
692 692
 			{
693 693
 				$this->_menuInfoSetting($menu['list'][$key], $start_module, $isMenuFixed, $menuSrl, $siteSrl);
694 694
 			}
Please login to merge, or discard this patch.
Braces   +72 added lines, -45 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@  discard block
 block discarded – undo
41 41
 		// document.getDocumentList query execution
42 42
 		$output = executeQuery('menu.getMenuList', $args);
43 43
 		// Return if no result or an error occurs
44
-		if(!$output->toBool()||!count($output->data)) return $output;
44
+		if(!$output->toBool()||!count($output->data)) {
45
+			return $output;
46
+		}
45 47
 
46 48
 		return $output;
47 49
 	}
@@ -63,7 +65,9 @@  discard block
 block discarded – undo
63 65
 		$args->site_srl = $site_srl ;
64 66
 		$args->menu_srl = $menu_srl;
65 67
 		$output = executeQueryArray('menu.getMenus', $args);
66
-		if(!$output->data) return;
68
+		if(!$output->data) {
69
+			return;
70
+		}
67 71
 		$menus = $output->data;
68 72
 		return $menus;
69 73
 	}
@@ -80,7 +84,9 @@  discard block
 block discarded – undo
80 84
 		$args = new stdClass();
81 85
 		$args->menu_srl = $menu_srl;
82 86
 		$output = executeQuery('menu.getMenu', $args);
83
-		if(!$output->data) return;
87
+		if(!$output->data) {
88
+			return;
89
+		}
84 90
 
85 91
 		$menu_info = $output->data;
86 92
 		$menu_info->xml_file = sprintf('./files/cache/menu/%s.xml.php',$menu_srl);
@@ -105,10 +111,15 @@  discard block
 block discarded – undo
105 111
 		$args->title = $title;
106 112
 		$args->site_srl = $site_srl;
107 113
 		$output = executeQuery('menu.getMenuByTitle', $args);
108
-		if(!$output->data) return;
114
+		if(!$output->data) {
115
+			return;
116
+		}
109 117
 
110
-		if(is_array($output->data)) $menu_info = $output->data[0];
111
-		else $menu_info = $output->data;
118
+		if(is_array($output->data)) {
119
+			$menu_info = $output->data[0];
120
+		} else {
121
+			$menu_info = $output->data;
122
+		}
112 123
 
113 124
 		if($menu_info->menu_srl)
114 125
 		{
@@ -152,15 +163,20 @@  discard block
 block discarded – undo
152 163
 		$output = executeQuery('menu.getMenuItem', $args);
153 164
 		$node = $output->data;
154 165
 		settype($node,'object');
155
-		if($node->group_srls) $node->group_srls = explode(',',$node->group_srls);
156
-		else $node->group_srls = array();
166
+		if($node->group_srls) {
167
+			$node->group_srls = explode(',',$node->group_srls);
168
+		} else {
169
+			$node->group_srls = array();
170
+		}
157 171
 
158 172
 		$tmp_name = unserialize($node->name);
159 173
 		if($tmp_name && count($tmp_name))
160 174
 		{
161 175
 			$selected_lang = array();
162 176
 			$rand_name = $tmp_name[Context::getLangType()];
163
-			if(!$rand_name) $rand_name = array_shift($tmp_name);
177
+			if(!$rand_name) {
178
+				$rand_name = array_shift($tmp_name);
179
+			}
164 180
 			$node->name = $rand_name;
165 181
 		}
166 182
 		return $node;
@@ -178,13 +194,13 @@  discard block
 block discarded – undo
178 194
 		if(!$menuItem->url)
179 195
 		{
180 196
 			$menuItem->moduleType = null;
181
-		}
182
-		else if(strncasecmp('http', $menuItem->url, 4) !== 0)
197
+		} else if(strncasecmp('http', $menuItem->url, 4) !== 0)
183 198
 		{
184 199
 			$oModuleModel = getModel('module');
185 200
 			$moduleInfo = $oModuleModel->getModuleInfoByMid($menuItem->url, 0);
186
-			if(!$moduleInfo) $menuItem->moduleType = 'url';
187
-			else
201
+			if(!$moduleInfo) {
202
+				$menuItem->moduleType = 'url';
203
+			} else
188 204
 			{
189 205
 				if($moduleInfo->mid == $menuItem->url)
190 206
 				{
@@ -193,8 +209,9 @@  discard block
 block discarded – undo
193 209
 					$menuItem->layoutSrl = $moduleInfo->layout_srl;
194 210
 				}
195 211
 			}
212
+		} else {
213
+			$menuItem->moduleType = 'url';
196 214
 		}
197
-		else $menuItem->moduleType = 'url';
198 215
 
199 216
 		// grant setting
200 217
 		if(is_array($menuItem->group_srls) && count($menuItem->group_srls) > 0)
@@ -202,12 +219,10 @@  discard block
 block discarded – undo
202 219
 			if($menuItem->group_srls[0] == -1)
203 220
 			{
204 221
 				$menuItem->grant = 'member';
205
-			}
206
-			else if($menuItem->group_srls[0] == -3)
222
+			} else if($menuItem->group_srls[0] == -3)
207 223
 			{
208 224
 				$menuItem->grant = 'manager';
209
-			}
210
-			else
225
+			} else
211 226
 			{
212 227
 				$menuItem->grant = 'group';
213 228
 			}
@@ -228,11 +243,15 @@  discard block
 block discarded – undo
228 243
 				{
229 244
 					$tmp = $oModuleAdminModel->getLangCode(0, $value->title);
230 245
 					$groupList[$value->group_srl]->title = $tmp[Context::getLangType()];
246
+				} else {
247
+					$groupList[$value->group_srl]->title = $value->title;
231 248
 				}
232
-				else $groupList[$value->group_srl]->title = $value->title;
233 249
 
234
-				if(in_array($key, $menuItem->group_srls)) $groupList[$value->group_srl]->isChecked = true;
235
-				else $groupList[$value->group_srl]->isChecked = false;
250
+				if(in_array($key, $menuItem->group_srls)) {
251
+					$groupList[$value->group_srl]->isChecked = true;
252
+				} else {
253
+					$groupList[$value->group_srl]->isChecked = false;
254
+				}
236 255
 			}
237 256
 		}
238 257
 		$menuItem->groupList = $groupList;
@@ -305,11 +324,12 @@  discard block
 block discarded – undo
305 324
 			$item_info->parent_srl = $parent_srl;
306 325
 			$item_info->parent_menu_name = $parent_info->name;
307 326
 			// In case of modifying the existing menu or addting a new menu to the root
308
-		}
309
-		else
327
+		} else
310 328
 		{
311 329
 			// Get information of the menu if menu_item_srl exists
312
-			if($menu_item_srl) $item_info = $this->getMenuItemInfo($menu_item_srl);
330
+			if($menu_item_srl) {
331
+				$item_info = $this->getMenuItemInfo($menu_item_srl);
332
+			}
313 333
 			// Get only menu_item_srl if no values found, considering it as adding a new menu
314 334
 			if(!$item_info->menu_item_srl)
315 335
 			{
@@ -349,7 +369,9 @@  discard block
 block discarded – undo
349 369
 		foreach($_allModules as $module_name)
350 370
 		{
351 371
 			$module = $oModuleModel->getModuleInfoXml($module_name);
352
-			if(!isset($module)) continue;
372
+			if(!isset($module)) {
373
+				continue;
374
+			}
353 375
 			$defaultSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'P');
354 376
 			$defaultMobileSkin = $oModuleModel->getModuleDefaultSkin($module_name, 'M');
355 377
 			$skinInfo = $oModuleModel->loadSkinInfo(ModuleHandler::getModulePath($module_name), $defaultSkin);
@@ -379,8 +401,7 @@  discard block
 block discarded – undo
379 401
 				$oModuleInfo->title = $pageTypeName['OUTSIDE'];
380 402
 				$oModuleInfo->no_skin = 'Y';
381 403
 				$allModules['OUTSIDE'] = $oModuleInfo;
382
-			}
383
-			else
404
+			} else
384 405
 			{
385 406
 				$allModules[$module_name] = $module;
386 407
 			}
@@ -414,7 +435,9 @@  discard block
 block discarded – undo
414 435
 
415 436
 		// after trigger
416 437
 		$output = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
417
-		if(!$output->toBool()) return $output;
438
+		if(!$output->toBool()) {
439
+			return $output;
440
+		}
418 441
 
419 442
 		$localModuleList = array_unique($moduleList);
420 443
 
@@ -425,7 +448,9 @@  discard block
 block discarded – undo
425 448
 		$remoteModuleList = array();
426 449
 		foreach($remotePackageList as $package)
427 450
 		{
428
-			if(strpos($package->path, './modules/') !== 0) continue;
451
+			if(strpos($package->path, './modules/') !== 0) {
452
+				continue;
453
+			}
429 454
 
430 455
 			$pathInfo = explode('/', $package->path);
431 456
 			$remoteModuleList[] = $pathInfo[2];
@@ -464,8 +489,7 @@  discard block
 block discarded – undo
464 489
 					$oModuleInfo->title = $pageTypeName['OUTSIDE'];
465 490
 					$oModuleInfo->no_skin = 'Y';
466 491
 					$moduleInfoList['OUTSIDE'] = $oModuleInfo;
467
-				}
468
-				else
492
+				} else
469 493
 				{
470 494
 					$moduleInfoList[$value] = $moduleInfo;
471 495
 				}
@@ -497,8 +521,11 @@  discard block
 block discarded – undo
497 521
 			$isMenuFixed = false;
498 522
 			$output = $this->getMenu($menuSrl);
499 523
 			$php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$output->menu_srl);
500
-			if(file_exists($php_file)) include($php_file);
501
-			else $oMenuAdminController->makeXmlFile($menuSrl);
524
+			if(file_exists($php_file)) {
525
+				include($php_file);
526
+			} else {
527
+				$oMenuAdminController->makeXmlFile($menuSrl);
528
+			}
502 529
 
503 530
 			if(count($menu->list)>0)
504 531
 			{
@@ -518,8 +545,7 @@  discard block
 block discarded – undo
518 545
 			$menuItems->title = $output->title;
519 546
 			$menuItems->menuItems = $menu;
520 547
 			$menuList[] = $menuItems;
521
-		}
522
-		else
548
+		} else
523 549
 		{
524 550
 			$menuListFromDB = $this->getMenus($siteSrl);
525 551
 			if(is_array($menuListFromDB))
@@ -527,8 +553,9 @@  discard block
 block discarded – undo
527 553
 				$oAdmin = getClass('admin');
528 554
 				foreach($menuListFromDB AS $key=>$value)
529 555
 				{
530
-					if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]);
531
-					else
556
+					if($value->title == $oAdmin->getAdminMenuName()) {
557
+						unset($output[$key]);
558
+					} else
532 559
 					{
533 560
 						unset($menu);
534 561
 						unset($menuItems);
@@ -564,8 +591,7 @@  discard block
 block discarded – undo
564 591
 						if($value->menu_srl == $this->menuSrlWithinHome)
565 592
 						{
566 593
 							$menuList[-1] = $menuItems;
567
-						}
568
-						else
594
+						} else
569 595
 						{
570 596
 							$menuList[] = $menuItems;
571 597
 						}
@@ -639,8 +665,11 @@  discard block
 block discarded – undo
639 665
 			$args = new stdClass;
640 666
 			$args->menu_item_srl = $menu['node_srl'];
641 667
 			$args->is_shortcut = 'Y';
642
-			if($menu['menu_name_key']) $args->name = $menu['menu_name_key'];
643
-			else $args->name = $menu['menu_name'];
668
+			if($menu['menu_name_key']) {
669
+				$args->name = $menu['menu_name_key'];
670
+			} else {
671
+				$args->name = $menu['menu_name'];
672
+			}
644 673
 			$output = executeQuery('menu.updateMenuItem', $args);
645 674
 
646 675
 			$isMenuFixed = true;
@@ -661,8 +690,7 @@  discard block
 block discarded – undo
661 690
 				if($midInfo->page_type)
662 691
 				{
663 692
 					$menu['module_type'] = $midInfo->page_type;
664
-				}
665
-				else
693
+				} else
666 694
 				{
667 695
 					$menu['module_type'] = $midInfo->module;
668 696
 				}
@@ -671,8 +699,7 @@  discard block
 block discarded – undo
671 699
 			if($moduleInfo->setup_index_act)
672 700
 			{
673 701
 				$menu['setup_index_act'] = $moduleInfo->setup_index_act;
674
-			}
675
-			else if($moduleInfo->default_index_act)
702
+			} else if($moduleInfo->default_index_act)
676 703
 			{
677 704
 				$menu['setup_index_act'] = $moduleInfo->default_index_act;
678 705
 			}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	/**
111 111
 	 * RSS Module configurations
112 112
 	 *
113
-	 * @return void
113
+	 * @return Object|null
114 114
 	 */
115 115
 	function procRssAdminInsertModuleConfig()
116 116
 	{
Please login to merge, or discard this patch.
modules/menu/menu.admin.view.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * menuAdminView class
5
- * admin view class of the menu module
6
- *
7
- * @author NAVER ([email protected])
8
- * @package /modules/menu
9
- * @version 0.1
10
- */
4
+	 * menuAdminView class
5
+	 * admin view class of the menu module
6
+	 *
7
+	 * @author NAVER ([email protected])
8
+	 * @package /modules/menu
9
+	 * @version 0.1
10
+	 */
11 11
 class menuAdminView extends menu
12 12
 {
13 13
 	var $tmpMenu = null;
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 */
19 19
 	function init()
20 20
 	{
21
-		$this->setTemplatePath($this->module_path.'tpl');
21
+		$this->setTemplatePath($this->module_path . 'tpl');
22 22
 	}
23 23
 
24 24
 	
@@ -28,20 +28,20 @@  discard block
 block discarded – undo
28 28
 	 */
29 29
 	function dispMenuAdminSiteMap()
30 30
 	{
31
-		Context::loadLang(_XE_PATH_.'modules/document/lang/');
32
-		Context::loadLang(_XE_PATH_.'modules/layout/lang/');
33
-		Context::loadLang(_XE_PATH_.'modules/autoinstall/lang/');
31
+		Context::loadLang(_XE_PATH_ . 'modules/document/lang/');
32
+		Context::loadLang(_XE_PATH_ . 'modules/layout/lang/');
33
+		Context::loadLang(_XE_PATH_ . 'modules/autoinstall/lang/');
34 34
 		$site_srl = Context::get('site_srl');
35 35
 		$site_module_info = Context::get('site_module_info');
36 36
 
37
-		if(!$site_srl)
37
+		if (!$site_srl)
38 38
 		{
39
-			if($logged_info->is_admin == 'Y' && !$site_keyword) $site_srl = 0;
40
-			else $site_srl = (int)$site_module_info->site_srl;
39
+			if ($logged_info->is_admin == 'Y' && !$site_keyword) $site_srl = 0;
40
+			else $site_srl = (int) $site_module_info->site_srl;
41 41
 		}
42 42
 
43 43
 		// process for unlinked modules
44
-		if($site_srl == 0)
44
+		if ($site_srl == 0)
45 45
 		{
46 46
 			$oMenuController = getAdminController('menu');
47 47
 			$oMenuController->linkAllModuleInstancesToSitemap();
@@ -51,25 +51,25 @@  discard block
 block discarded – undo
51 51
 
52 52
 		$oMenuAdminModel = getAdminModel('menu');
53 53
 		$menuListFromDB = $oMenuAdminModel->getMenus();
54
-		if(is_array($menuListFromDB)) $output = array_reverse($menuListFromDB);
54
+		if (is_array($menuListFromDB)) $output = array_reverse($menuListFromDB);
55 55
 
56 56
 		$menuList = array();
57
-		if(is_array($output))
57
+		if (is_array($output))
58 58
 		{
59 59
 			$menuItems = array();
60
-			foreach($output as $key=>$value)
60
+			foreach ($output as $key=>$value)
61 61
 			{
62
-				if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]);
62
+				if ($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]);
63 63
 				else
64 64
 				{
65 65
 					unset($menu, $menuItems);
66 66
 					//$value->xml_file = sprintf('./files/cache/menu/%s.xml.php',$value->menu_srl);
67
-					$value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$value->menu_srl);
68
-					if(file_exists($value->php_file)) include($value->php_file);
67
+					$value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php', $value->menu_srl);
68
+					if (file_exists($value->php_file)) include($value->php_file);
69 69
 
70
-					if(count($menu->list)>0)
70
+					if (count($menu->list) > 0)
71 71
 					{
72
-						foreach($menu->list as $key2=>$value2)
72
+						foreach ($menu->list as $key2=>$value2)
73 73
 						{
74 74
 							$this->_menuInfoSetting($menu->list[$key2]);
75 75
 						}
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 		Context::set('layout_list', $layoutList);
98 98
 
99 99
 		// choice theme file
100
-		$theme_file = _XE_PATH_.'files/theme/theme_info.php';
101
-		if(is_readable($theme_file))
100
+		$theme_file = _XE_PATH_ . 'files/theme/theme_info.php';
101
+		if (is_readable($theme_file))
102 102
 		{
103 103
 			include($theme_file);
104 104
 			Context::set('current_layout', $theme_info->layout);
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
 		// get default group list
114 114
 		$oMemberModel = getModel('member');
115 115
 		$output = $oMemberModel->getGroups();
116
-		if(is_array($output))
116
+		if (is_array($output))
117 117
 		{
118 118
 			$groupList = array();
119
-			foreach($output as $value)
119
+			foreach ($output as $value)
120 120
 			{
121 121
 				$groupList[$value->group_srl] = new stdClass();
122 122
 				$groupList[$value->group_srl]->group_srl = $value->group_srl;
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 	function _menuInfoSetting(&$menu)
146 146
 	{
147 147
 		$oModuleModel = getModel('module');
148
-		if($menu['url'] && strncasecmp('http', $menu['url'], 4) !== 0)
148
+		if ($menu['url'] && strncasecmp('http', $menu['url'], 4) !== 0)
149 149
 		{
150 150
 			unset($midInfo);
151 151
 			unset($moduleInfo);
152 152
 			$midInfo = $oModuleModel->getModuleInfoByMid($menu['url'], 0);
153 153
 			$moduleInfo = $oModuleModel->getModuleInfoXml($midInfo->module);
154
-			if($moduleInfo->setup_index_act)
154
+			if ($moduleInfo->setup_index_act)
155 155
 			{
156 156
 				$menu['module_srl'] = $midInfo->module_srl;
157 157
 				$menu['setup_index_act'] = $moduleInfo->setup_index_act;
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 			// setting layout srl for layout management
160 160
 			$menu['layout_srl'] = $midInfo->layout_srl;
161 161
 		}
162
-		if(count($menu['list']) > 0)
162
+		if (count($menu['list']) > 0)
163 163
 		{
164
-			foreach($menu['list'] as $key=>$value)
164
+			foreach ($menu['list'] as $key=>$value)
165 165
 			{
166 166
 				$this->_menuInfoSetting($menu['list'][$key]);
167 167
 			}
@@ -175,17 +175,17 @@  discard block
 block discarded – undo
175 175
 	 */
176 176
 	function _arrangeMenuItem($menuItems)
177 177
 	{
178
-		if(is_array($menuItems))
178
+		if (is_array($menuItems))
179 179
 		{
180 180
 			$arrangedMenuItemList = array();
181
-			foreach($menuItems as $value)
181
+			foreach ($menuItems as $value)
182 182
 			{
183
-				if($value->parent_srl == 0)
183
+				if ($value->parent_srl == 0)
184 184
 				{
185 185
 					$arrangedMenuItemList[$value->menu_item_srl] = array('name'=>$value->name, 'subMenu'=>array());
186 186
 				}
187 187
 
188
-				if($value->parent_srl > 0 && isset($arrangedMenuItemList[$value->parent_srl]))
188
+				if ($value->parent_srl > 0 && isset($arrangedMenuItemList[$value->parent_srl]))
189 189
 				{
190 190
 					$arrangedMenuItemList[$value->parent_srl]['subMenu'][$value->menu_item_srl] = $value;
191 191
 				}
Please login to merge, or discard this patch.
Braces   +15 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,8 +36,11 @@  discard block
 block discarded – undo
36 36
 
37 37
 		if(!$site_srl)
38 38
 		{
39
-			if($logged_info->is_admin == 'Y' && !$site_keyword) $site_srl = 0;
40
-			else $site_srl = (int)$site_module_info->site_srl;
39
+			if($logged_info->is_admin == 'Y' && !$site_keyword) {
40
+				$site_srl = 0;
41
+			} else {
42
+				$site_srl = (int)$site_module_info->site_srl;
43
+			}
41 44
 		}
42 45
 
43 46
 		// process for unlinked modules
@@ -51,7 +54,9 @@  discard block
 block discarded – undo
51 54
 
52 55
 		$oMenuAdminModel = getAdminModel('menu');
53 56
 		$menuListFromDB = $oMenuAdminModel->getMenus();
54
-		if(is_array($menuListFromDB)) $output = array_reverse($menuListFromDB);
57
+		if(is_array($menuListFromDB)) {
58
+			$output = array_reverse($menuListFromDB);
59
+		}
55 60
 
56 61
 		$menuList = array();
57 62
 		if(is_array($output))
@@ -59,13 +64,16 @@  discard block
 block discarded – undo
59 64
 			$menuItems = array();
60 65
 			foreach($output as $key=>$value)
61 66
 			{
62
-				if($value->title == $oAdmin->getAdminMenuName()) unset($output[$key]);
63
-				else
67
+				if($value->title == $oAdmin->getAdminMenuName()) {
68
+					unset($output[$key]);
69
+				} else
64 70
 				{
65 71
 					unset($menu, $menuItems);
66 72
 					//$value->xml_file = sprintf('./files/cache/menu/%s.xml.php',$value->menu_srl);
67 73
 					$value->php_file = sprintf(_XE_PATH_ . 'files/cache/menu/%s.php',$value->menu_srl);
68
-					if(file_exists($value->php_file)) include($value->php_file);
74
+					if(file_exists($value->php_file)) {
75
+						include($value->php_file);
76
+					}
69 77
 
70 78
 					if(count($menu->list)>0)
71 79
 					{
@@ -102,8 +110,7 @@  discard block
 block discarded – undo
102 110
 		{
103 111
 			include($theme_file);
104 112
 			Context::set('current_layout', $theme_info->layout);
105
-		}
106
-		else
113
+		} else
107 114
 		{
108 115
 			$oModuleModel = getModel('module');
109 116
 			$default_mid = $oModuleModel->getDefaultMid();
Please login to merge, or discard this patch.
modules/menu/menu.class.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * menu class
5
- * high class of the menu module
6
- *
7
- * @author NAVER ([email protected])
8
- * @package /modules/menu
9
- * @version 0.1
10
- */
4
+	 * menu class
5
+	 * high class of the menu module
6
+	 *
7
+	 * @author NAVER ([email protected])
8
+	 * @package /modules/menu
9
+	 * @version 0.1
10
+	 */
11 11
 class menu extends ModuleObject
12 12
 {
13 13
 	/**
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 	{
31 31
 		$oDB = &DB::getInstance();
32 32
 		// 2009. 02. 11 menu added to the table site_srl
33
-		if(!$oDB->isColumnExists('menu', 'site_srl')) return true;
33
+		if (!$oDB->isColumnExists('menu', 'site_srl')) return true;
34 34
 
35 35
 		// 2012. 02. 01 title index check
36
-		if(!$oDB->isIndexExists("menu", "idx_title")) return true;
36
+		if (!$oDB->isIndexExists("menu", "idx_title")) return true;
37 37
 
38
-		if(!$oDB->isColumnExists('menu_item', 'is_shortcut'))
38
+		if (!$oDB->isColumnExists('menu_item', 'is_shortcut'))
39 39
 		{
40 40
 			return TRUE;
41 41
 		}
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 		$args = new stdClass();
46 46
 		$args->title = array("Temporary menu");
47 47
 		$temp_menus = executeQueryArray('menu.getMenuByTitle', $args);
48
-		if($temp_menus->toBool() && count($temp_menus->data)) return true;
48
+		if ($temp_menus->toBool() && count($temp_menus->data)) return true;
49 49
 		
50 50
 		// 2015. 06. 15 add column desc
51
-		if(!$oDB->isColumnExists('menu_item', 'desc'))
51
+		if (!$oDB->isColumnExists('menu_item', 'desc'))
52 52
 		{
53 53
 			return true;
54 54
 		}
@@ -63,25 +63,25 @@  discard block
 block discarded – undo
63 63
 	function moduleUpdate() {
64 64
 		$oDB = &DB::getInstance();
65 65
 		// 2009. 02. 11 menu added to the table site_srl
66
-		if(!$oDB->isColumnExists('menu', 'site_srl'))
66
+		if (!$oDB->isColumnExists('menu', 'site_srl'))
67 67
 		{
68
-			$oDB->addColumn('menu','site_srl','number',11,0,true);
68
+			$oDB->addColumn('menu', 'site_srl', 'number', 11, 0, true);
69 69
 		}
70 70
 
71 71
 		// 2012. 02. 01 title index check
72
-		if(!$oDB->isIndexExists("menu","idx_title"))
72
+		if (!$oDB->isIndexExists("menu", "idx_title"))
73 73
 		{
74 74
 			$oDB->addIndex('menu', 'idx_title', array('title'));
75 75
 		}
76 76
 		
77 77
 		// 2015. 06. 15 add column desc
78
-		if(!$oDB->isColumnExists('menu_item', 'desc'))
78
+		if (!$oDB->isColumnExists('menu_item', 'desc'))
79 79
 		{
80
-			$oDB->addColumn('menu_item', 'desc','varchar',250,"",true);
80
+			$oDB->addColumn('menu_item', 'desc', 'varchar', 250, "", true);
81 81
 		}
82 82
 
83 83
 		// 1.7(maserati) shortcut column add and mirgration
84
-		if(!$oDB->isColumnExists('menu_item', 'is_shortcut'))
84
+		if (!$oDB->isColumnExists('menu_item', 'is_shortcut'))
85 85
 		{
86 86
 			$oDB->addColumn('menu_item', 'is_shortcut', 'char', 1, 'N');
87 87
 
@@ -89,27 +89,27 @@  discard block
 block discarded – undo
89 89
 			$oMenuAdminModel = getAdminModel('menu');
90 90
 			$output = $oMenuAdminModel->getMenus();
91 91
 
92
-			if(is_array($output))
92
+			if (is_array($output))
93 93
 			{
94 94
 				$menuItemUniqueList = array();
95 95
 				$menuItemAllList = array();
96
-				foreach($output  AS $key=>$value)
96
+				foreach ($output  AS $key=>$value)
97 97
 				{
98 98
 					unset($args);
99 99
 					$args->menu_srl = $value->menu_srl;
100 100
 					$output2 = executeQueryArray('menu.getMenuItems', $args);
101
-					if(is_array($output2->data))
101
+					if (is_array($output2->data))
102 102
 					{
103
-						foreach($output2->data AS $key2=>$value2)
103
+						foreach ($output2->data AS $key2=>$value2)
104 104
 						{
105 105
 							$menuItemAllList[$value2->menu_item_srl] = $value2->url;
106
-							if(!in_array($value2->url, $menuItemUniqueList))
106
+							if (!in_array($value2->url, $menuItemUniqueList))
107 107
 							{
108 108
 								$menuItemUniqueList[$value2->menu_item_srl] = $value2->url;
109 109
 							}
110 110
 
111 111
 							// if url is empty, change type to shortcurt
112
-							if($value2->is_shortcut == 'N' && (!$value2->url || strncasecmp('http', $value2->url, 4) === 0))
112
+							if ($value2->is_shortcut == 'N' && (!$value2->url || strncasecmp('http', $value2->url, 4) === 0))
113 113
 							{
114 114
 								$value2->is_shortcut = 'Y';
115 115
 								$output3 = executeQuery('menu.updateMenuItem', $value2);
@@ -121,29 +121,29 @@  discard block
 block discarded – undo
121 121
 				$oModuleModel = getModel('module');
122 122
 				// if duplicate reference, change type to shortcut
123 123
 				$shortcutItemList = array_diff_assoc($menuItemAllList, $menuItemUniqueList);
124
-				foreach($output AS $key=>$value)
124
+				foreach ($output AS $key=>$value)
125 125
 				{
126 126
 					unset($args);
127 127
 					$args->menu_srl = $value->menu_srl;
128 128
 					$output2 = executeQueryArray('menu.getMenuItems', $args);
129
-					if(is_array($output2->data))
129
+					if (is_array($output2->data))
130 130
 					{
131
-						foreach($output2->data AS $key2=>$value2)
131
+						foreach ($output2->data AS $key2=>$value2)
132 132
 						{
133
-							if(!empty($value2->url) && strncasecmp('http', $value2->url, 4) !== 0)
133
+							if (!empty($value2->url) && strncasecmp('http', $value2->url, 4) !== 0)
134 134
 							{
135 135
 								$moduleInfo = $oModuleModel->getModuleInfoByMid($value2->url);
136
-								if(!$moduleInfo->module_srl)
136
+								if (!$moduleInfo->module_srl)
137 137
 								{
138 138
 									$value2->url = Context::getDefaultUrl();
139
-									if(!$value2->url) $value2->url = '#';
139
+									if (!$value2->url) $value2->url = '#';
140 140
 									$value2->is_shortcut = 'Y';
141 141
 
142 142
 									$updateOutput = executeQuery('menu.updateMenuItem', $value2);
143 143
 								}
144 144
 							}
145 145
 
146
-							if($shortcutItemList[$value2->menu_item_srl])
146
+							if ($shortcutItemList[$value2->menu_item_srl])
147 147
 							{
148 148
 								$value2->is_shortcut = 'Y';
149 149
 								$output3 = executeQuery('menu.updateMenuItem', $value2);
@@ -163,17 +163,17 @@  discard block
 block discarded – undo
163 163
 		$temp_menus = executeQueryArray('menu.getMenuByTitle', $args);
164 164
 		
165 165
 		$args = new stdClass();
166
-		if($temp_menus->toBool() && count($temp_menus->data))
166
+		if ($temp_menus->toBool() && count($temp_menus->data))
167 167
 		{
168 168
 			
169 169
 			$oMenuAdminController = getAdminController('menu');
170
-			foreach($temp_menus->data as $menu)
170
+			foreach ($temp_menus->data as $menu)
171 171
 			{
172 172
 				$args->current_menu_srl = $menu->menu_srl;
173 173
 				$args->menu_srl = $oMenuAdminController->getUnlinkedMenu();
174 174
 				$output3 = executeQuery('menu.updateMenuItems', $args);
175 175
 					
176
-				if($output3->toBool())
176
+				if ($output3->toBool())
177 177
 				{
178 178
 					// delete
179 179
 					$oMenuAdminController->deleteMenu($menu->menu_srl);
@@ -205,23 +205,23 @@  discard block
 block discarded – undo
205 205
 		// Wanted list of all the blog module
206 206
 		$output = executeQueryArray("menu.getMenus");
207 207
 		$list = $output->data;
208
-		if(!count($list)) return;
208
+		if (!count($list)) return;
209 209
 		// The menu module is used in the re-create all the menu list
210
-		foreach($list as $menu_item)
210
+		foreach ($list as $menu_item)
211 211
 		{
212 212
 			$menu_srl = $menu_item->menu_srl;
213 213
 			$oMenuAdminController->makeXmlFile($menu_srl);
214 214
 
215 215
 			// for homeSitemap.php regenrate
216
-			if(!$homeMenuSrl)
216
+			if (!$homeMenuSrl)
217 217
 			{
218 218
 				$menuItemList = $oMenuAdminModel->getMenuItems($menu_srl);
219 219
 
220
-				if(is_array($menuItemList->data))
220
+				if (is_array($menuItemList->data))
221 221
 				{
222
-					foreach($menuItemList->data AS $key=>$value)
222
+					foreach ($menuItemList->data AS $key=>$value)
223 223
 					{
224
-						if($homeModuleMid == $value->url)
224
+						if ($homeModuleMid == $value->url)
225 225
 						{
226 226
 							$homeMenuSrl = $menu_srl;
227 227
 							break;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 			}
232 232
 		}
233 233
 
234
-		if($homeMenuSrl)
234
+		if ($homeMenuSrl)
235 235
 		{
236 236
 			$oMenuAdminController->makeHomemenuCacheFile($homeMenuSrl);
237 237
 		}
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,14 @@  discard block
 block discarded – undo
30 30
 	{
31 31
 		$oDB = &DB::getInstance();
32 32
 		// 2009. 02. 11 menu added to the table site_srl
33
-		if(!$oDB->isColumnExists('menu', 'site_srl')) return true;
33
+		if(!$oDB->isColumnExists('menu', 'site_srl')) {
34
+			return true;
35
+		}
34 36
 
35 37
 		// 2012. 02. 01 title index check
36
-		if(!$oDB->isIndexExists("menu", "idx_title")) return true;
38
+		if(!$oDB->isIndexExists("menu", "idx_title")) {
39
+			return true;
40
+		}
37 41
 
38 42
 		if(!$oDB->isColumnExists('menu_item', 'is_shortcut'))
39 43
 		{
@@ -45,7 +49,9 @@  discard block
 block discarded – undo
45 49
 		$args = new stdClass();
46 50
 		$args->title = array("Temporary menu");
47 51
 		$temp_menus = executeQueryArray('menu.getMenuByTitle', $args);
48
-		if($temp_menus->toBool() && count($temp_menus->data)) return true;
52
+		if($temp_menus->toBool() && count($temp_menus->data)) {
53
+			return true;
54
+		}
49 55
 		
50 56
 		// 2015. 06. 15 add column desc
51 57
 		if(!$oDB->isColumnExists('menu_item', 'desc'))
@@ -136,7 +142,9 @@  discard block
 block discarded – undo
136 142
 								if(!$moduleInfo->module_srl)
137 143
 								{
138 144
 									$value2->url = Context::getDefaultUrl();
139
-									if(!$value2->url) $value2->url = '#';
145
+									if(!$value2->url) {
146
+										$value2->url = '#';
147
+									}
140 148
 									$value2->is_shortcut = 'Y';
141 149
 
142 150
 									$updateOutput = executeQuery('menu.updateMenuItem', $value2);
@@ -205,7 +213,9 @@  discard block
 block discarded – undo
205 213
 		// Wanted list of all the blog module
206 214
 		$output = executeQueryArray("menu.getMenus");
207 215
 		$list = $output->data;
208
-		if(!count($list)) return;
216
+		if(!count($list)) {
217
+			return;
218
+		}
209 219
 		// The menu module is used in the re-create all the menu list
210 220
 		foreach($list as $menu_item)
211 221
 		{
Please login to merge, or discard this patch.
modules/message/message.admin.controller.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 /**
4
- * @class  messageAdminController
5
- * @author NAVER ([email protected])
6
- * @brief admin controller class of message module
7
- */
4
+	 * @class  messageAdminController
5
+	 * @author NAVER ([email protected])
6
+	 * @brief admin controller class of message module
7
+	 */
8 8
 class messageAdminController extends message
9 9
 {
10 10
 	/**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
 		$args = Context::gets('skin', 'mskin', 'colorset', 'mcolorset');
24 24
 		// Create a module Controller object
25 25
 		$oModuleController = getController('module');
26
-		$output = $oModuleController->insertModuleConfig('message',$args);
27
-		if(!$output->toBool()) return $output;
26
+		$output = $oModuleController->insertModuleConfig('message', $args);
27
+		if (!$output->toBool()) return $output;
28 28
 
29 29
 		$this->setMessage('success_updated');
30 30
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
 		// Create a module Controller object
25 25
 		$oModuleController = getController('module');
26 26
 		$output = $oModuleController->insertModuleConfig('message',$args);
27
-		if(!$output->toBool()) return $output;
27
+		if(!$output->toBool()) {
28
+			return $output;
29
+		}
28 30
 
29 31
 		$this->setMessage('success_updated');
30 32
 
Please login to merge, or discard this patch.