GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( b119a5...2262ef )
by gyeong-won
19:32 queued 13:26
created
modules/install/script/ko.install.php 2 patches
Braces   +31 added lines, -12 removed lines patch added patch discarded remove patch
@@ -140,8 +140,7 @@  discard block
 block discarded – undo
140 140
 		{
141 141
 			Context::set('is_shortcut', $item['is_shortcut'], TRUE);
142 142
 			Context::set('shortcut_target', $item['shortcut_target'], TRUE);
143
-		}
144
-		else
143
+		} else
145 144
 		{
146 145
 			Context::set('is_shortcut', 'N', TRUE);
147 146
 			Context::set('shortcut_target', null, TRUE);
@@ -155,7 +154,9 @@  discard block
 block discarded – undo
155 154
 		$menu_srl = $oMenuAdminController->get('menu_item_srl');
156 155
 		$item['menu_srl'] = $menu_srl;
157 156
 
158
-		if($item['list']) __makeMenu($item['list'], $menu_srl);
157
+		if($item['list']) {
158
+			__makeMenu($item['list'], $menu_srl);
159
+		}
159 160
 	}
160 161
 }
161 162
 
@@ -191,12 +192,16 @@  discard block
 block discarded – undo
191 192
 
192 193
 $oLayoutAdminController = getAdminController('layout');
193 194
 $output = $oLayoutAdminController->insertLayout($args);
194
-if(!$output->toBool()) return $output;
195
+if(!$output->toBool()) {
196
+	return $output;
197
+}
195 198
 
196 199
 // update Layout (PC)
197 200
 $args->extra_vars = serialize($extra_vars);
198 201
 $output = $oLayoutAdminController->updateLayout($args);
199
-if(!$output->toBool()) return $output;
202
+if(!$output->toBool()) {
203
+	return $output;
204
+}
200 205
 
201 206
 //create mobile layout
202 207
 $mlayout_srl = $args->layout_srl = getNextSequence();
@@ -206,12 +211,16 @@  discard block
 block discarded – undo
206 211
 $extra_vars->main_menu = $sitemap['GNB']['menu_srl'];
207 212
 
208 213
 $output = $oLayoutAdminController->insertLayout($args);
209
-if(!$output->toBool()) return $output;
214
+if(!$output->toBool()) {
215
+	return $output;
216
+}
210 217
 
211 218
 // update mobile Layout
212 219
 $args->extra_vars = serialize($extra_vars);
213 220
 $output = $oLayoutAdminController->updateLayout($args);
214
-if(!$output->toBool()) return $output;
221
+if(!$output->toBool()) {
222
+	return $output;
223
+}
215 224
 
216 225
 
217 226
 $siteDesignPath = _XE_PATH_.'files/site_design/';
@@ -274,14 +283,18 @@  discard block
 block discarded – undo
274 283
 $obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/welcome_content', 'welcome_content_'.$lang);
275 284
 
276 285
 $output = $oDocumentController->insertDocument($obj, true);
277
-if(!$output->toBool()) return $output;
286
+if(!$output->toBool()) {
287
+	return $output;
288
+}
278 289
 
279 290
 $document_srl = $output->get('document_srl');
280 291
 
281 292
 unset($obj->document_srl);
282 293
 $obj->title = 'Welcome mobile XE';
283 294
 $output = $oDocumentController->insertDocument($obj, true);
284
-if(!$output->toBool()) return $output;
295
+if(!$output->toBool()) {
296
+	return $output;
297
+}
285 298
 
286 299
 // save PageWidget
287 300
 $oModuleController = getController('module'); /* @var $oModuleController moduleController */
@@ -290,7 +303,9 @@  discard block
 block discarded – undo
290 303
 $module_info->content = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$document_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0"  />';
291 304
 $module_info->mcontent = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$mdocument_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0"  />';
292 305
 $output = $oModuleController->updateModule($module_info);
293
-if(!$output->toBool()) return $output;
306
+if(!$output->toBool()) {
307
+	return $output;
308
+}
294 309
 
295 310
 // insertFirstModule
296 311
 $site_args = new stdClass();
@@ -311,7 +326,9 @@  discard block
 block discarded – undo
311 326
 	$obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/xeicon_content', 'xeicon_content_ko_' . $i);
312 327
 
313 328
 	$output = $oDocumentController->insertDocument($obj, true);
314
-	if(!$output->toBool()) return $output;
329
+	if(!$output->toBool()) {
330
+		return $output;
331
+	}
315 332
 
316 333
 	$xeicon_document_srl[$i] = $output->get('document_srl');
317 334
 }
@@ -321,7 +338,9 @@  discard block
 block discarded – undo
321 338
 $module_info = $oModuleModel->getModuleInfoByModuleSrl($xeicon_module_srl);
322 339
 $module_info->content = '<div widget="widgetBox" style="float:left;width:100%;" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" css_class="XEicon" ><div><div><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[1].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[2].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[3].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[4].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /></div></div></div>';
323 340
 $output = $oModuleController->updateModule($module_info);
324
-if(!$output->toBool()) return $output;
341
+if(!$output->toBool()) {
342
+	return $output;
343
+}
325 344
 
326 345
 
327 346
 // create menu cache
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
 function __makeMenu(&$list, $parent_srl)
131 131
 {
132 132
 	$oMenuAdminController = getAdminController('menu');
133
-	foreach($list as $idx => &$item)
133
+	foreach ($list as $idx => &$item)
134 134
 	{
135 135
 		Context::set('parent_srl', $parent_srl, TRUE);
136 136
 		Context::set('menu_name', $item['menu_name'], TRUE);
137 137
 		Context::set('module_type', $item['module_type'], TRUE);
138 138
 		Context::set('module_id', $item['module_id'], TRUE);
139
-		if($item['is_shortcut'] === 'Y')
139
+		if ($item['is_shortcut'] === 'Y')
140 140
 		{
141 141
 			Context::set('is_shortcut', $item['is_shortcut'], TRUE);
142 142
 			Context::set('shortcut_target', $item['shortcut_target'], TRUE);
@@ -148,23 +148,23 @@  discard block
 block discarded – undo
148 148
 		}
149 149
 
150 150
 		$output = $oMenuAdminController->procMenuAdminInsertItem();
151
-		if($output instanceof BaseObject && !$output->toBool())
151
+		if ($output instanceof BaseObject && !$output->toBool())
152 152
 		{
153 153
 			return $output;
154 154
 		}
155 155
 		$menu_srl = $oMenuAdminController->get('menu_item_srl');
156 156
 		$item['menu_srl'] = $menu_srl;
157 157
 
158
-		if($item['list']) __makeMenu($item['list'], $menu_srl);
158
+		if ($item['list']) __makeMenu($item['list'], $menu_srl);
159 159
 	}
160 160
 }
161 161
 
162 162
 
163 163
 // 사이트맵 생성
164
-foreach($sitemap as $id => &$val)
164
+foreach ($sitemap as $id => &$val)
165 165
 {
166 166
 	$output = $oMenuAdminController->addMenu($val['title']);
167
-	if(!$output->toBool())
167
+	if (!$output->toBool())
168 168
 	{
169 169
 		return $output;
170 170
 	}
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 191
 
192 192
 $oLayoutAdminController = getAdminController('layout');
193 193
 $output = $oLayoutAdminController->insertLayout($args);
194
-if(!$output->toBool()) return $output;
194
+if (!$output->toBool()) return $output;
195 195
 
196 196
 // update Layout (PC)
197 197
 $args->extra_vars = serialize($extra_vars);
198 198
 $output = $oLayoutAdminController->updateLayout($args);
199
-if(!$output->toBool()) return $output;
199
+if (!$output->toBool()) return $output;
200 200
 
201 201
 //create mobile layout
202 202
 $mlayout_srl = $args->layout_srl = getNextSequence();
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
 $extra_vars->main_menu = $sitemap['GNB']['menu_srl'];
207 207
 
208 208
 $output = $oLayoutAdminController->insertLayout($args);
209
-if(!$output->toBool()) return $output;
209
+if (!$output->toBool()) return $output;
210 210
 
211 211
 // update mobile Layout
212 212
 $args->extra_vars = serialize($extra_vars);
213 213
 $output = $oLayoutAdminController->updateLayout($args);
214
-if(!$output->toBool()) return $output;
214
+if (!$output->toBool()) return $output;
215 215
 
216 216
 
217 217
 $siteDesignPath = _XE_PATH_.'files/site_design/';
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 $moduleList = array('page', 'board', 'editor');
226 226
 $moutput = ModuleHandler::triggerCall('menu.getModuleListInSitemap', 'after', $moduleList);
227
-if($moutput->toBool())
227
+if ($moutput->toBool())
228 228
 {
229 229
 	$moduleList = array_unique($moduleList);
230 230
 }
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
 $designInfo->module = new stdClass();
235 235
 
236 236
 $oModuleModel = getModel('module'); /* @var $oModuleModel moduleModel */
237
-foreach($skinTypes as $key => $dir)
237
+foreach ($skinTypes as $key => $dir)
238 238
 {
239 239
 	$skinType = $key == 'skin' ? 'P' : 'M';
240
-	foreach($moduleList as $moduleName)
240
+	foreach ($moduleList as $moduleName)
241 241
 	{
242 242
 		$designInfo->module->{$moduleName} = new stdClass();
243 243
 		$designInfo->module->{$moduleName}->{$key} = $oModuleModel->getModuleDefaultSkin($moduleName, $skinType, 0, false);
@@ -271,17 +271,17 @@  discard block
 block discarded – undo
271 271
 Context::set('version', __XE_VERSION__);
272 272
 $obj->title = 'Welcome XE';
273 273
 
274
-$obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/welcome_content', 'welcome_content_'.$lang);
274
+$obj->content = $oTemplateHandler->compile(_XE_PATH_.'modules/install/script/welcome_content', 'welcome_content_'.$lang);
275 275
 
276 276
 $output = $oDocumentController->insertDocument($obj, true);
277
-if(!$output->toBool()) return $output;
277
+if (!$output->toBool()) return $output;
278 278
 
279 279
 $document_srl = $output->get('document_srl');
280 280
 
281 281
 unset($obj->document_srl);
282 282
 $obj->title = 'Welcome mobile XE';
283 283
 $output = $oDocumentController->insertDocument($obj, true);
284
-if(!$output->toBool()) return $output;
284
+if (!$output->toBool()) return $output;
285 285
 
286 286
 // save PageWidget
287 287
 $oModuleController = getController('module'); /* @var $oModuleController moduleController */
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 $module_info->content = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$document_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0"  />';
291 291
 $module_info->mcontent = '<img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="width: 100%; float: left;" body="" document_srl="'.$mdocument_srl.'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0"  />';
292 292
 $output = $oModuleController->updateModule($module_info);
293
-if(!$output->toBool()) return $output;
293
+if (!$output->toBool()) return $output;
294 294
 
295 295
 // insertFirstModule
296 296
 $site_args = new stdClass();
@@ -304,14 +304,14 @@  discard block
 block discarded – undo
304 304
 $xeicon_module_srl = $moduleInfo->module_srl;
305 305
 
306 306
 $xeicon_document_srl = array();
307
-for($i = 1; $i <=4; $i++)
307
+for ($i = 1; $i <= 4; $i++)
308 308
 {
309 309
 	unset($obj->document_srl);
310 310
 	$obj->title = "XEIcon ({$i})";
311
-	$obj->content = $oTemplateHandler->compile(_XE_PATH_ . 'modules/install/script/xeicon_content', 'xeicon_content_ko_' . $i);
311
+	$obj->content = $oTemplateHandler->compile(_XE_PATH_.'modules/install/script/xeicon_content', 'xeicon_content_ko_'.$i);
312 312
 
313 313
 	$output = $oDocumentController->insertDocument($obj, true);
314
-	if(!$output->toBool()) return $output;
314
+	if (!$output->toBool()) return $output;
315 315
 
316 316
 	$xeicon_document_srl[$i] = $output->get('document_srl');
317 317
 }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 $module_info = $oModuleModel->getModuleInfoByModuleSrl($xeicon_module_srl);
322 322
 $module_info->content = '<div widget="widgetBox" style="float:left;width:100%;" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" css_class="XEicon" ><div><div><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[1].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[2].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[3].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /><img hasContent="true" class="zbxe_widget_output" widget="widgetContent" style="float:left;padding:none;margin:none;width:100%;" document_srl="'.$xeicon_document_srl[4].'" widget_padding_left="0" widget_padding_right="0" widget_padding_top="0" widget_padding_bottom="0" /></div></div></div>';
323 323
 $output = $oModuleController->updateModule($module_info);
324
-if(!$output->toBool()) return $output;
324
+if (!$output->toBool()) return $output;
325 325
 
326 326
 
327 327
 // create menu cache
Please login to merge, or discard this patch.
modules/integration_search/integration_search.admin.controller.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@  discard block
 block discarded – undo
31 31
 		$args->skin = Context::get('skin');
32 32
 		$args->target = Context::get('target');
33 33
 		$args->target_module_srl = Context::get('target_module_srl');
34
-		if(!$args->target_module_srl) $args->target_module_srl = '';
34
+		if(!$args->target_module_srl) {
35
+			$args->target_module_srl = '';
36
+		}
35 37
 		$args->skin_vars = $config->skin_vars;
36 38
 
37 39
 		$oModuleController = getController('module');
@@ -67,7 +69,9 @@  discard block
 block discarded – undo
67 69
 		{
68 70
 			foreach($skin_info->extra_vars as $vars)
69 71
 			{
70
-				if($vars->type!='image') continue;
72
+				if($vars->type!='image') {
73
+					continue;
74
+				}
71 75
 
72 76
 				$image_obj = $obj->{$vars->name};
73 77
 				// Get a variable on a request to delete
@@ -99,7 +103,9 @@  discard block
 block discarded – undo
99 103
 				// Upload the file to a path
100 104
 				$path = sprintf("./files/attach/images/%s/", $module_srl);
101 105
 				// Create a directory
102
-				if(!FileHandler::makeDir($path)) return false;
106
+				if(!FileHandler::makeDir($path)) {
107
+					return false;
108
+				}
103 109
 
104 110
 				$filename = $path.$image_obj['name'];
105 111
 				// Move the file
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 		$args->skin = Context::get('skin');
32 32
 		$args->target = Context::get('target');
33 33
 		$args->target_module_srl = Context::get('target_module_srl');
34
-		if(!$args->target_module_srl) $args->target_module_srl = '';
34
+		if (!$args->target_module_srl) $args->target_module_srl = '';
35 35
 		$args->skin_vars = $config->skin_vars;
36 36
 
37 37
 		$oModuleController = getController('module');
38
-		$output = $oModuleController->insertModuleConfig('integration_search',$args);
38
+		$output = $oModuleController->insertModuleConfig('integration_search', $args);
39 39
 
40 40
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminContent');
41 41
 		return $this->setRedirectUrl($returnUrl, $output);
@@ -63,35 +63,35 @@  discard block
 block discarded – undo
63 63
 		unset($obj->module_srl);
64 64
 		unset($obj->page);
65 65
 		// Separately handle if the extra_vars is an image type in the original skin_info
66
-		if($skin_info->extra_vars)
66
+		if ($skin_info->extra_vars)
67 67
 		{
68
-			foreach($skin_info->extra_vars as $vars)
68
+			foreach ($skin_info->extra_vars as $vars)
69 69
 			{
70
-				if($vars->type!='image') continue;
70
+				if ($vars->type != 'image') continue;
71 71
 
72 72
 				$image_obj = $obj->{$vars->name};
73 73
 				// Get a variable on a request to delete
74 74
 				$del_var = $obj->{"del_".$vars->name};
75 75
 				unset($obj->{"del_".$vars->name});
76
-				if($del_var == 'Y')
76
+				if ($del_var == 'Y')
77 77
 				{
78 78
 					FileHandler::removeFile($module_info->{$vars->name});
79 79
 					continue;
80 80
 				}
81 81
 				// Use the previous data if not uploaded
82
-				if(!$image_obj['tmp_name'])
82
+				if (!$image_obj['tmp_name'])
83 83
 				{
84 84
 					$obj->{$vars->name} = $module_info->{$vars->name};
85 85
 					continue;
86 86
 				}
87 87
 				// Ignore if the file is not successfully uploaded, and check uploaded file
88
-				if(!is_uploaded_file($image_obj['tmp_name']) || !checkUploadedFile($image_obj['tmp_name']))
88
+				if (!is_uploaded_file($image_obj['tmp_name']) || !checkUploadedFile($image_obj['tmp_name']))
89 89
 				{
90 90
 					unset($obj->{$vars->name});
91 91
 					continue;
92 92
 				}
93 93
 				// Ignore if the file is not an image
94
-				if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name']))
94
+				if (!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name']))
95 95
 				{
96 96
 					unset($obj->{$vars->name});
97 97
 					continue;
@@ -99,11 +99,11 @@  discard block
 block discarded – undo
99 99
 				// Upload the file to a path
100 100
 				$path = sprintf("./files/attach/images/%s/", $module_srl);
101 101
 				// Create a directory
102
-				if(!FileHandler::makeDir($path)) return false;
102
+				if (!FileHandler::makeDir($path)) return false;
103 103
 
104 104
 				$filename = $path.$image_obj['name'];
105 105
 				// Move the file
106
-				if(!move_uploaded_file($image_obj['tmp_name'], $filename))
106
+				if (!move_uploaded_file($image_obj['tmp_name'], $filename))
107 107
 				{
108 108
 					unset($obj->{$vars->name});
109 109
 					continue;
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		$args->skin_vars = serialize($obj);
118 118
 
119 119
 		$oModuleController = getController('module');
120
-		$output = $oModuleController->insertModuleConfig('integration_search',$args);
120
+		$output = $oModuleController->insertModuleConfig('integration_search', $args);
121 121
 
122 122
 		$this->setMessage('success_updated', 'info');
123 123
 
Please login to merge, or discard this patch.
modules/integration_search/integration_search.admin.view.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,9 @@
 block discarded – undo
86 86
 				$name = $val->name;
87 87
 				$type = $val->type;
88 88
 				$value = $skin_vars->{$name};
89
-				if($type=="checkbox"&&!$value) $value = array();
89
+				if($type=="checkbox"&&!$value) {
90
+					$value = array();
91
+				}
90 92
 				$skin_info->extra_vars[$key]->value= $value;
91 93
 			}
92 94
 		}
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		// Get configurations (using module model object)
25 25
 		$oModuleModel = getModel('module');
26 26
 		$this->config = $oModuleModel->getModuleConfig('integration_search');
27
-		Context::set('config',$this->config);
27
+		Context::set('config', $this->config);
28 28
 
29 29
 		$this->setTemplatePath($this->module_path."/tpl/");
30 30
 	}
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		// Get a list of skins(themes)
40 40
 		$oModuleModel = getModel('module');
41 41
 		$skin_list = $oModuleModel->getSkins($this->module_path);
42
-		Context::set('skin_list',$skin_list);
42
+		Context::set('skin_list', $skin_list);
43 43
 		// Get a list of module categories
44 44
 		$module_categories = $oModuleModel->getModuleCategories();
45 45
 		// Generated mid Wanted list
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$security->encodeHTML('skin_list..title');
64 64
 
65 65
 		// Sample Code
66
-		Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword"  value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false) );
66
+		Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword"  value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>', ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
67 67
 
68 68
 		$this->setTemplateFile("index");
69 69
 	}
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
 		$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin);
80 80
 		$skin_vars = unserialize($this->config->skin_vars);
81 81
 		// value for skin_info extra_vars
82
-		if(count($skin_info->extra_vars))
82
+		if (count($skin_info->extra_vars))
83 83
 		{
84
-			foreach($skin_info->extra_vars as $key => $val)
84
+			foreach ($skin_info->extra_vars as $key => $val)
85 85
 			{
86 86
 				$name = $val->name;
87 87
 				$type = $val->type;
88 88
 				$value = $skin_vars->{$name};
89
-				if($type=="checkbox"&&!$value) $value = array();
90
-				$skin_info->extra_vars[$key]->value= $value;
89
+				if ($type == "checkbox" && !$value) $value = array();
90
+				$skin_info->extra_vars[$key]->value = $value;
91 91
 			}
92 92
 		}
93 93
 		Context::set('skin_info', $skin_info);
Please login to merge, or discard this patch.
modules/member/member.admin.controller.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1284,7 +1284,7 @@
 block discarded – undo
1284 1284
 	/**
1285 1285
 	 * Delete cached group data
1286 1286
 	 * @return void
1287
-	*/
1287
+	 */
1288 1288
 	function _deleteMemberGroupCache($site_srl = 0)
1289 1289
 	{
1290 1290
 		//remove from cache
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
 	/**
778 778
 	 * Move up/down the member join form and modify it
779 779
 	 * @deprecated
780
-	 * @return void
780
+	 * @return BaseObject|null
781 781
 	 */
782 782
 	function procMemberAdminUpdateJoinForm()
783 783
 	{
@@ -1114,7 +1114,7 @@  discard block
 block discarded – undo
1114 1114
 
1115 1115
 	/**
1116 1116
 	 * Insert a group
1117
-	 * @param object $args
1117
+	 * @param null|stdClass $args
1118 1118
 	 * @return BaseObject
1119 1119
 	 */
1120 1120
 	function insertGroup($args)
@@ -1311,6 +1311,9 @@  discard block
 block discarded – undo
1311 1311
 		return executeQuery('member.insertDeniedID', $args);
1312 1312
 	}
1313 1313
 
1314
+	/**
1315
+	 * @param string $nick_name
1316
+	 */
1314 1317
 	function insertDeniedNickName($nick_name, $description = '')
1315 1318
 	{
1316 1319
 		$args = new stdClass();
Please login to merge, or discard this patch.
Spacing   +177 added lines, -177 removed lines patch added patch discarded remove patch
@@ -24,31 +24,31 @@  discard block
 block discarded – undo
24 24
 		// if(Context::getRequestMethod() == "GET") return new BaseObject(-1, "msg_invalid_request");
25 25
 		// Extract the necessary information in advance
26 26
 		$logged_info = Context::get('logged_info');
27
-		if($logged_info->is_admin != 'Y' || !checkCSRF())
27
+		if ($logged_info->is_admin != 'Y' || !checkCSRF())
28 28
 		{
29 29
 			return new BaseObject(-1, 'msg_invalid_request');
30 30
 		}
31 31
 
32
-		$args = Context::gets('member_srl','email_address','find_account_answer', 'allow_mailing','allow_message','denied','is_admin','description','group_srl_list','limit_date');
33
-		$oMemberModel = &getModel ('member');
32
+		$args = Context::gets('member_srl', 'email_address', 'find_account_answer', 'allow_mailing', 'allow_message', 'denied', 'is_admin', 'description', 'group_srl_list', 'limit_date');
33
+		$oMemberModel = &getModel('member');
34 34
 		$config = $oMemberModel->getMemberConfig();
35 35
 		$getVars = array();
36
-		if($config->signupForm)
36
+		if ($config->signupForm)
37 37
 		{
38
-			foreach($config->signupForm as $formInfo)
38
+			foreach ($config->signupForm as $formInfo)
39 39
 			{
40
-				if($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired))
40
+				if ($formInfo->isDefaultForm && ($formInfo->isUse || $formInfo->required || $formInfo->mustRequired))
41 41
 				{
42 42
 					$getVars[] = $formInfo->name;
43 43
 				}
44 44
 			}
45 45
 		}
46
-		foreach($getVars as $val)
46
+		foreach ($getVars as $val)
47 47
 		{
48 48
 			$args->{$val} = Context::get($val);
49 49
 		}
50 50
 		$args->member_srl = Context::get('member_srl');
51
-		if(Context::get('reset_password'))
51
+		if (Context::get('reset_password'))
52 52
 			$args->password = Context::get('reset_password');
53 53
 		else unset($args->password);
54 54
 
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
 		unset($all_args->password2);
65 65
 		unset($all_args->reset_password);
66 66
 
67
-		if(!isset($args->limit_date)) $args->limit_date = "";
68
-		if(!isset($args->description)) $args->description = "";
67
+		if (!isset($args->limit_date)) $args->limit_date = "";
68
+		if (!isset($args->description)) $args->description = "";
69 69
 
70 70
 		// Add extra vars after excluding necessary information from all the requested arguments
71 71
 		$extra_vars = delObjectVars($all_args, $args);
72 72
 		$args->extra_vars = serialize($extra_vars);
73 73
 		// Check if an original member exists having the member_srl
74
-		if($args->member_srl)
74
+		if ($args->member_srl)
75 75
 		{
76 76
 			// Create a member model object
77 77
 			$oMemberModel = getModel('member');
@@ -79,14 +79,14 @@  discard block
 block discarded – undo
79 79
 			$columnList = array('member_srl');
80 80
 			$member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList);
81 81
 			// If no original member exists, make a new one
82
-			if($member_info->member_srl != $args->member_srl) unset($args->member_srl);
82
+			if ($member_info->member_srl != $args->member_srl) unset($args->member_srl);
83 83
 		}
84 84
 
85 85
 		// remove whitespace
86 86
 		$checkInfos = array('user_id', 'user_name', 'nick_name', 'email_address');
87
-		foreach($checkInfos as $val)
87
+		foreach ($checkInfos as $val)
88 88
 		{
89
-			if(isset($args->{$val}))
89
+			if (isset($args->{$val}))
90 90
 			{
91 91
 				$args->{$val} = preg_replace('/[\pZ\pC]+/u', '', html_entity_decode($args->{$val}));
92 92
 			}
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 		$oMemberController = getController('member');
96 96
 		// Execute insert or update depending on the value of member_srl
97
-		if(!$args->member_srl)
97
+		if (!$args->member_srl)
98 98
 		{
99 99
 			$args->password = Context::get('password');
100 100
 			$output = $oMemberController->insertMember($args);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			$msg_code = 'success_updated';
107 107
 		}
108 108
 
109
-		if(!$output->toBool()) return $output;
109
+		if (!$output->toBool()) return $output;
110 110
 		// Save Signature
111 111
 		$signature = Context::get('signature');
112 112
 		$oMemberController->putSignature($args->member_srl, $signature);
@@ -115,24 +115,24 @@  discard block
 block discarded – undo
115 115
 		$this->setMessage($msg_code);
116 116
 
117 117
 		$profile_image = Context::get('profile_image');
118
-		if(is_uploaded_file($profile_image['tmp_name']))
118
+		if (is_uploaded_file($profile_image['tmp_name']))
119 119
 		{
120 120
 			$output = $oMemberController->insertProfileImage($args->member_srl, $profile_image['tmp_name']);
121
-			if(!$output->toBool()) return $output;
121
+			if (!$output->toBool()) return $output;
122 122
 		}
123 123
 
124 124
 		$image_mark = Context::get('image_mark');
125
-		if(is_uploaded_file($image_mark['tmp_name']))
125
+		if (is_uploaded_file($image_mark['tmp_name']))
126 126
 		{
127 127
 			$output = $oMemberController->insertImageMark($args->member_srl, $image_mark['tmp_name']);
128
-			if(!$output->toBool()) return $output;
128
+			if (!$output->toBool()) return $output;
129 129
 		}
130 130
 
131 131
 		$image_name = Context::get('image_name');
132 132
 		if (is_uploaded_file($image_name['tmp_name']))
133 133
 		{
134 134
 			$output = $oMemberController->insertImageName($args->member_srl, $image_name['tmp_name']);
135
-			if(!$output->toBool()) return $output;
135
+			if (!$output->toBool()) return $output;
136 136
 		}
137 137
 
138 138
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminList');
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
 
151 151
 		$oMemberController = getController('member');
152 152
 		$output = $oMemberController->deleteMember($member_srl);
153
-		if(!$output->toBool()) return $output;
153
+		if (!$output->toBool()) return $output;
154 154
 
155
-		$this->add('page',Context::get('page'));
155
+		$this->add('page', Context::get('page'));
156 156
 		$this->setMessage("success_deleted");
157 157
 	}
158 158
 
@@ -171,26 +171,26 @@  discard block
 block discarded – undo
171 171
 		);
172 172
 
173 173
 		$oPassword = new Password();
174
-		if(!array_key_exists($args->password_hashing_algorithm, $oPassword->getSupportedAlgorithms()))
174
+		if (!array_key_exists($args->password_hashing_algorithm, $oPassword->getSupportedAlgorithms()))
175 175
 		{
176 176
 			$args->password_hashing_algorithm = 'md5';
177 177
 		}
178 178
 
179 179
 		$args->password_hashing_work_factor = intval($args->password_hashing_work_factor, 10);
180
-		if($args->password_hashing_work_factor < 4)
180
+		if ($args->password_hashing_work_factor < 4)
181 181
 		{
182 182
 			$args->password_hashing_work_factor = 4;
183 183
 		}
184
-		if($args->password_hashing_work_factor > 16)
184
+		if ($args->password_hashing_work_factor > 16)
185 185
 		{
186 186
 			$args->password_hashing_work_factor = 16;
187 187
 		}
188
-		if($args->password_hashing_auto_upgrade != 'Y')
188
+		if ($args->password_hashing_auto_upgrade != 'Y')
189 189
 		{
190 190
 			$args->password_hashing_auto_upgrade = 'N';
191 191
 		}
192 192
 
193
-		if((!$args->webmaster_name || !$args->webmaster_email) && $args->enable_confirm == 'Y')
193
+		if ((!$args->webmaster_name || !$args->webmaster_email) && $args->enable_confirm == 'Y')
194 194
 		{
195 195
 			return new BaseObject(-1, 'msg_mail_authorization');
196 196
 		}
@@ -225,20 +225,20 @@  discard block
 block discarded – undo
225 225
 		$usable_list = Context::get('usable_list');
226 226
 		$all_args = Context::getRequestVars();
227 227
 
228
-		$args->limit_day = (int)$args->limit_day;
229
-		if(!trim(strip_tags($args->agreement)))
228
+		$args->limit_day = (int) $args->limit_day;
229
+		if (!trim(strip_tags($args->agreement)))
230 230
 		{
231
-			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
231
+			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt';
232 232
 			FileHandler::removeFile($agreement_file);
233 233
 			$args->agreement = NULL;
234 234
 		}
235 235
 
236
-		if($args->redirect_url)
236
+		if ($args->redirect_url)
237 237
 		{
238 238
 			$oModuleModel = getModel('module');
239 239
 			$redirectModuleInfo = $oModuleModel->getModuleInfoByModuleSrl($args->redirect_url, array('mid'));
240 240
 
241
-			if(!$redirectModuleInfo)
241
+			if (!$redirectModuleInfo)
242 242
 			{
243 243
 				return new BaseObject('-1', 'msg_exist_selected_module');
244 244
 			}
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 		$mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question');
278 278
 		$extendItems = $oMemberModel->getJoinFormList();
279 279
 
280
-		foreach($list_order as $key)
280
+		foreach ($list_order as $key)
281 281
 		{
282 282
 			$signupItem = new stdClass();
283 283
 			$signupItem->isIdentifier = ($key == $all_args->identifier);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 			$signupItem->isUse = in_array($key, $usable_list) || $signupItem->required;
291 291
 			$signupItem->isPublic = ($all_args->{'is_'.$key.'_public'} == 'Y' && $signupItem->isUse) ? 'Y' : 'N';
292 292
 
293
-			if($signupItem->imageType)
293
+			if ($signupItem->imageType)
294 294
 			{
295 295
 				$signupItem->max_width = $all_args->{$key.'_max_width'};
296 296
 				$signupItem->max_height = $all_args->{$key.'_max_height'};
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 			}
300 300
 
301 301
 			// set extends form
302
-			if(!$signupItem->isDefaultForm)
302
+			if (!$signupItem->isDefaultForm)
303 303
 			{
304 304
 				$extendItem = $extendItems[$all_args->{$key.'_member_join_form_srl'}];
305 305
 				$signupItem->type = $extendItem->column_type;
@@ -308,13 +308,13 @@  discard block
 block discarded – undo
308 308
 				$signupItem->description = $extendItem->description;
309 309
 
310 310
 				// check usable value change, required/option
311
-				if($signupItem->isUse != ($extendItem->is_active == 'Y') || $signupItem->required != ($extendItem->required == 'Y'))
311
+				if ($signupItem->isUse != ($extendItem->is_active == 'Y') || $signupItem->required != ($extendItem->required == 'Y'))
312 312
 				{
313 313
 					unset($update_args);
314 314
 					$update_args = new stdClass;
315 315
 					$update_args->member_join_form_srl = $extendItem->member_join_form_srl;
316
-					$update_args->is_active = $signupItem->isUse?'Y':'N';
317
-					$update_args->required = $signupItem->required?'Y':'N';
316
+					$update_args->is_active = $signupItem->isUse ? 'Y' : 'N';
317
+					$update_args->required = $signupItem->required ? 'Y' : 'N';
318 318
 
319 319
 					$update_output = executeQuery('member.updateJoinForm', $update_args);
320 320
 				}
@@ -331,9 +331,9 @@  discard block
 block discarded – undo
331 331
 		$this->_createFindAccountByQuestion($args->identifier);
332 332
 
333 333
 		// check agreement value exist
334
-		if($args->agreement)
334
+		if ($args->agreement)
335 335
 		{
336
-			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_' . Context::get('lang_type') . '.txt';
336
+			$agreement_file = _XE_PATH_.'files/member_extra_info/agreement_'.Context::get('lang_type').'.txt';
337 337
 			$output = FileHandler::writeFile($agreement_file, $args->agreement);
338 338
 
339 339
 			unset($args->agreement);
@@ -361,16 +361,16 @@  discard block
 block discarded – undo
361 361
 			'after_logout_url'
362 362
 		);
363 363
 
364
-		if(!$args->change_password_date)
364
+		if (!$args->change_password_date)
365 365
 		{
366 366
 			$args->change_password_date = 0;
367 367
 		}
368 368
 
369
-		if(!trim(strip_tags($args->after_login_url)))
369
+		if (!trim(strip_tags($args->after_login_url)))
370 370
 		{
371 371
 			$args->after_login_url = NULL;
372 372
 		}
373
-		if(!trim(strip_tags($args->after_logout_url)))
373
+		if (!trim(strip_tags($args->after_logout_url)))
374 374
 		{
375 375
 			$args->after_logout_url = NULL;
376 376
 		}
@@ -397,17 +397,17 @@  discard block
 block discarded – undo
397 397
 		);
398 398
 
399 399
 		$args->layout_srl = $args->layout_srl ? $args->layout_srl : NULL;
400
-		if(!$args->skin)
400
+		if (!$args->skin)
401 401
 		{
402 402
 			$args->skin = 'default';
403 403
 		}
404
-		if(!$args->colorset)
404
+		if (!$args->colorset)
405 405
 		{
406 406
 			$args->colorset = 'white';
407 407
 		}
408 408
 
409 409
 		$args->mlayout_srl = $args->mlayout_srl ? $args->mlayout_srl : NULL;
410
-		if(!$args->mskin)
410
+		if (!$args->mskin)
411 411
 		{
412 412
 			$args->mskin = 'default';
413 413
 		}
@@ -430,12 +430,12 @@  discard block
 block discarded – undo
430 430
 		$extendItems = $oMemberModel->getJoinFormList();
431 431
 
432 432
 		$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark');
433
-		$mustRequireds = array('email_address', 'nick_name','password', 'find_account_question');
433
+		$mustRequireds = array('email_address', 'nick_name', 'password', 'find_account_question');
434 434
 		$orgRequireds = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name');
435 435
 		$orgUse = array('email_address', 'password', 'find_account_question', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday');
436 436
 		$list_order = array();
437 437
 
438
-		foreach($items as $key)
438
+		foreach ($items as $key)
439 439
 		{
440 440
 			unset($signupItem);
441 441
 			$signupItem = new stdClass;
@@ -447,23 +447,23 @@  discard block
 block discarded – undo
447 447
 			$signupItem->required = in_array($key, $orgRequireds);
448 448
 			$signupItem->isUse = ($config->{$key} == 'Y') || in_array($key, $orgUse);
449 449
 			$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
450
-			if(in_array($key, array('find_account_question', 'password', 'email_address')))
450
+			if (in_array($key, array('find_account_question', 'password', 'email_address')))
451 451
 			{
452 452
 				$signupItem->isPublic = 'N';
453 453
 			}
454 454
 			$signupItem->isIdentifier = ($key == $identifier);
455
-			if ($signupItem->imageType){
455
+			if ($signupItem->imageType) {
456 456
 				$signupItem->max_width = $config->{$key.'_max_width'};
457 457
 				$signupItem->max_height = $config->{$key.'_max_height'};
458 458
 			}
459
-			if($signupItem->isIdentifier)
459
+			if ($signupItem->isIdentifier)
460 460
 				array_unshift($list_order, $signupItem);
461 461
 			else
462 462
 				$list_order[] = $signupItem;
463 463
 		}
464
-		if(is_array($extendItems))
464
+		if (is_array($extendItems))
465 465
 		{
466
-			foreach($extendItems as $form_srl=>$item_info)
466
+			foreach ($extendItems as $form_srl=>$item_info)
467 467
 			{
468 468
 				unset($signupItem);
469 469
 				$signupItem = new stdClass;
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
 				$signupItem->isUse = ($item_info->is_active == 'Y');
477 477
 				$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
478 478
 				$signupItem->description = $item_info->description;
479
-				if($signupItem->imageType)
479
+				if ($signupItem->imageType)
480 480
 				{
481 481
 					$signupItem->max_width = $config->{$key.'_max_width'};
482 482
 					$signupItem->max_height = $config->{$key.'_max_height'};
@@ -494,13 +494,13 @@  discard block
 block discarded – undo
494 494
 	 * @param string $agreement
495 495
 	 * @return void
496 496
 	 */
497
-	function _createSignupRuleset($signupForm, $agreement = null){
497
+	function _createSignupRuleset($signupForm, $agreement = null) {
498 498
 		$xml_file = './files/ruleset/insertMember.xml';
499
-		$buff = '<?xml version="1.0" encoding="utf-8"?>' . PHP_EOL.
500
-			'<ruleset version="1.5.0">' . PHP_EOL.
501
-			'<customrules>' . PHP_EOL.
502
-			'</customrules>' . PHP_EOL.
503
-			'<fields>' . PHP_EOL . '%s' . PHP_EOL . '</fields>' . PHP_EOL.
499
+		$buff = '<?xml version="1.0" encoding="utf-8"?>'.PHP_EOL.
500
+			'<ruleset version="1.5.0">'.PHP_EOL.
501
+			'<customrules>'.PHP_EOL.
502
+			'</customrules>'.PHP_EOL.
503
+			'<fields>'.PHP_EOL.'%s'.PHP_EOL.'</fields>'.PHP_EOL.
504 504
 			'</ruleset>';
505 505
 
506 506
 		$fields = array();
@@ -509,41 +509,41 @@  discard block
 block discarded – undo
509 509
 		{
510 510
 			$fields[] = '<field name="accept_agreement"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /></field>';
511 511
 		}
512
-		foreach($signupForm as $formInfo)
512
+		foreach ($signupForm as $formInfo)
513 513
 		{
514
-			if($formInfo->required || $formInfo->mustRequired)
514
+			if ($formInfo->required || $formInfo->mustRequired)
515 515
 			{
516
-				if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip')
516
+				if ($formInfo->type == 'tel' || $formInfo->type == 'kr_zip')
517 517
 				{
518 518
 					$fields[] = sprintf('<field name="%s[]" required="true" />', $formInfo->name);
519 519
 				}
520
-				else if($formInfo->name == 'password')
520
+				else if ($formInfo->name == 'password')
521 521
 				{
522 522
 					$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:60" /></field>';
523 523
 					$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
524 524
 				}
525
-				else if($formInfo->name == 'find_account_question')
525
+				else if ($formInfo->name == 'find_account_question')
526 526
 				{
527 527
 					$fields[] = '<field name="find_account_question"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
528 528
 					$fields[] = '<field name="find_account_answer" length=":250"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
529 529
 				}
530
-				else if($formInfo->name == 'email_address')
530
+				else if ($formInfo->name == 'email_address')
531 531
 				{
532 532
 					$fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name);
533 533
 				}
534
-				else if($formInfo->name == 'user_id')
534
+				else if ($formInfo->name == 'user_id')
535 535
 				{
536 536
 					$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
537 537
 				}
538
-				else if($formInfo->name == 'nick_name')
538
+				else if ($formInfo->name == 'nick_name')
539 539
 				{
540 540
 					$fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name);
541 541
 				}
542
-				else if(strpos($formInfo->name, 'image') !== false)
542
+				else if (strpos($formInfo->name, 'image') !== false)
543 543
 				{
544 544
 					$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' &amp;&amp; $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
545 545
 				}
546
-				else if($formInfo->name == 'signature')
546
+				else if ($formInfo->name == 'signature')
547 547
 				{
548 548
 					$fields[] = '<field name="signature"><if test="$member_srl" attr="required" value="true" /></field>';
549 549
 				}
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 		FileHandler::writeFile($xml_file, $xml_buff);
559 559
 		unset($xml_buff);
560 560
 
561
-		$validator   = new Validator($xml_file);
561
+		$validator = new Validator($xml_file);
562 562
 		$validator->setCacheDir('files/cache');
563 563
 		$validator->getJsPath();
564 564
 	}
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		$xml_buff = sprintf($buff, implode('', $fields));
587 587
 		Filehandler::writeFile($xml_file, $xml_buff);
588 588
 
589
-		$validator   = new Validator($xml_file);
589
+		$validator = new Validator($xml_file);
590 590
 		$validator->setCacheDir('files/cache');
591 591
 		$validator->getJsPath();
592 592
 	}
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
 			'</ruleset>';
608 608
 
609 609
 		$fields = array();
610
-		if($identifier == 'user_id')
610
+		if ($identifier == 'user_id')
611 611
 			$fields[] = '<field name="user_id" required="true" rule="userid" />';
612 612
 
613 613
 		$fields[] = '<field name="email_address" required="true" rule="email" />';
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
 		$xml_buff = sprintf($buff, implode('', $fields));
618 618
 		Filehandler::writeFile($xml_file, $xml_buff);
619 619
 
620
-		$validator   = new Validator($xml_file);
620
+		$validator = new Validator($xml_file);
621 621
 		$validator->setCacheDir('files/cache');
622 622
 		$validator->getJsPath();
623 623
 	}
@@ -628,12 +628,12 @@  discard block
 block discarded – undo
628 628
 	 */
629 629
 	function procMemberAdminInsertGroup()
630 630
 	{
631
-		$args = Context::gets('title','description','is_default','image_mark');
631
+		$args = Context::gets('title', 'description', 'is_default', 'image_mark');
632 632
 		$output = $this->insertGroup($args);
633
-		if(!$output->toBool()) return $output;
633
+		if (!$output->toBool()) return $output;
634 634
 
635
-		$this->add('group_srl','');
636
-		$this->add('page',Context::get('page'));
635
+		$this->add('group_srl', '');
636
+		$this->add('page', Context::get('page'));
637 637
 		$this->setMessage('success_registed');
638 638
 
639 639
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
@@ -648,13 +648,13 @@  discard block
 block discarded – undo
648 648
 	{
649 649
 		$group_srl = Context::get('group_srl');
650 650
 
651
-		$args = Context::gets('group_srl','title','description','is_default','image_mark');
651
+		$args = Context::gets('group_srl', 'title', 'description', 'is_default', 'image_mark');
652 652
 		$args->site_srl = 0;
653 653
 		$output = $this->updateGroup($args);
654
-		if(!$output->toBool()) return $output;
654
+		if (!$output->toBool()) return $output;
655 655
 
656
-		$this->add('group_srl','');
657
-		$this->add('page',Context::get('page'));
656
+		$this->add('group_srl', '');
657
+		$this->add('page', Context::get('page'));
658 658
 		$this->setMessage('success_updated');
659 659
 
660 660
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
@@ -670,10 +670,10 @@  discard block
 block discarded – undo
670 670
 		$group_srl = Context::get('group_srl');
671 671
 
672 672
 		$output = $this->deleteGroup($group_srl);
673
-		if(!$output->toBool()) return $output;
673
+		if (!$output->toBool()) return $output;
674 674
 
675
-		$this->add('group_srl','');
676
-		$this->add('page',Context::get('page'));
675
+		$this->add('group_srl', '');
676
+		$this->add('page', Context::get('page'));
677 677
 		$this->setMessage('success_deleted');
678 678
 
679 679
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminGroupList');
@@ -695,10 +695,10 @@  discard block
 block discarded – undo
695 695
 		$args->default_value = explode("\n", str_replace("\r", '', Context::get('default_value')));
696 696
 		$args->required = Context::get('required');
697 697
 		$args->is_active = (isset($args->required));
698
-		if(!in_array(strtoupper($args->required), array('Y','N')))$args->required = 'N';
698
+		if (!in_array(strtoupper($args->required), array('Y', 'N')))$args->required = 'N';
699 699
 		$args->description = Context::get('description') ? Context::get('description') : '';
700 700
 		// Default values
701
-		if(in_array($args->column_type, array('checkbox','select','radio')) && count($args->default_value))
701
+		if (in_array($args->column_type, array('checkbox', 'select', 'radio')) && count($args->default_value))
702 702
 		{
703 703
 			$args->default_value = serialize($args->default_value);
704 704
 		}
@@ -710,17 +710,17 @@  discard block
 block discarded – undo
710 710
 		// Check ID duplicated
711 711
 		$oMemberModel = getModel('member');
712 712
 		$config = $oMemberModel->getMemberConfig();
713
-		foreach($config->signupForm as $item)
713
+		foreach ($config->signupForm as $item)
714 714
 		{
715
-			if($item->name == $args->column_name)
715
+			if ($item->name == $args->column_name)
716 716
 			{
717
-				if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue;
718
-				return new BaseObject(-1,'msg_exists_user_id');
717
+				if ($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue;
718
+				return new BaseObject(-1, 'msg_exists_user_id');
719 719
 			}
720 720
 		}
721 721
 		// Fix if member_join_form_srl exists. Add if not exists.
722 722
 		$isInsert;
723
-		if(!$args->member_join_form_srl)
723
+		if (!$args->member_join_form_srl)
724 724
 		{
725 725
 			$isInsert = true;
726 726
 			$args->list_order = $args->member_join_form_srl = getNextSequence();
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
 			$output = executeQuery('member.updateJoinForm', $args);
732 732
 		}
733 733
 
734
-		if(!$output->toBool()) return $output;
734
+		if (!$output->toBool()) return $output;
735 735
 
736 736
 		// memberConfig update
737 737
 		$signupItem = new stdClass();
@@ -748,15 +748,15 @@  discard block
 block discarded – undo
748 748
 		$config = $oMemberModel->getMemberConfig();
749 749
 		unset($config->agreement);
750 750
 
751
-		if($isInsert)
751
+		if ($isInsert)
752 752
 		{
753 753
 			$config->signupForm[] = $signupItem;
754 754
 		}
755 755
 		else
756 756
 		{
757
-			foreach($config->signupForm as $key=>$val)
757
+			foreach ($config->signupForm as $key=>$val)
758 758
 			{
759
-				if($val->member_join_form_srl == $signupItem->member_join_form_srl)
759
+				if ($val->member_join_form_srl == $signupItem->member_join_form_srl)
760 760
 				{
761 761
 					$config->signupForm[$key] = $signupItem;
762 762
 				}
@@ -784,9 +784,9 @@  discard block
 block discarded – undo
784 784
 		$config = $oMemberModel->getMemberConfig();
785 785
 		unset($config->agreement);
786 786
 
787
-		foreach($config->signupForm as $key=>$val)
787
+		foreach ($config->signupForm as $key=>$val)
788 788
 		{
789
-			if($val->member_join_form_srl == $member_join_form_srl)
789
+			if ($val->member_join_form_srl == $member_join_form_srl)
790 790
 			{
791 791
 				unset($config->signupForm[$key]);
792 792
 				break;
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
 		$member_join_form_srl = Context::get('member_join_form_srl');
807 807
 		$mode = Context::get('mode');
808 808
 
809
-		switch($mode)
809
+		switch ($mode)
810 810
 		{
811 811
 			case 'up' :
812 812
 				$output = $this->moveJoinFormUp($member_join_form_srl);
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 			case 'update' :
824 824
 				break;
825 825
 		}
826
-		if(!$output->toBool()) return $output;
826
+		if (!$output->toBool()) return $output;
827 827
 
828 828
 		$this->setMessage($msg_code);
829 829
 	}
@@ -842,40 +842,40 @@  discard block
 block discarded – undo
842 842
 		$oDB->begin();
843 843
 
844 844
 		$oMemberController = getController('member');
845
-		foreach($members as $key=>$member_srl)
845
+		foreach ($members as $key=>$member_srl)
846 846
 		{
847 847
 			$args = new stdClass();
848 848
 			$args->member_srl = $member_srl;
849
-			switch($var->type)
849
+			switch ($var->type)
850 850
 			{
851 851
 				case 'modify':
852 852
 					{
853
-						if(count($groups) > 0)
853
+						if (count($groups) > 0)
854 854
 						{
855 855
 							$args->site_srl = 0;
856 856
 							// One of its members to delete all the group
857 857
 							$output = executeQuery('member.deleteMemberGroupMember', $args);
858
-							if(!$output->toBool())
858
+							if (!$output->toBool())
859 859
 							{
860 860
 								$oDB->rollback();
861 861
 								return $output;
862 862
 							}
863 863
 							// Enter one of the loop a
864
-							foreach($groups as $group_srl)
864
+							foreach ($groups as $group_srl)
865 865
 							{
866
-								$output = $oMemberController->addMemberToGroup($args->member_srl,$group_srl);
867
-								if(!$output->toBool())
866
+								$output = $oMemberController->addMemberToGroup($args->member_srl, $group_srl);
867
+								if (!$output->toBool())
868 868
 								{
869 869
 									$oDB->rollback();
870 870
 									return $output;
871 871
 								}
872 872
 							}
873 873
 						}
874
-						if($var->denied)
874
+						if ($var->denied)
875 875
 						{
876 876
 							$args->denied = $var->denied;
877 877
 							$output = executeQuery('member.updateMemberDeniedInfo', $args);
878
-							if(!$output->toBool())
878
+							if (!$output->toBool())
879 879
 							{
880 880
 								$oDB->rollback();
881 881
 								return $output;
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
 					{
889 889
 						$oMemberController->memberInfo = null;
890 890
 						$output = $oMemberController->deleteMember($member_srl);
891
-						if(!$output->toBool())
891
+						if (!$output->toBool())
892 892
 						{
893 893
 							$oDB->rollback();
894 894
 							return $output;
@@ -901,15 +901,15 @@  discard block
 block discarded – undo
901 901
 
902 902
 		$message = $var->message;
903 903
 		// Send a message
904
-		if($message)
904
+		if ($message)
905 905
 		{
906 906
 			$oCommunicationController = getController('communication');
907 907
 
908 908
 			$logged_info = Context::get('logged_info');
909
-			$title = cut_str($message,10,'...');
909
+			$title = cut_str($message, 10, '...');
910 910
 			$sender_member_srl = $logged_info->member_srl;
911 911
 
912
-			foreach($members as $member_srl)
912
+			foreach ($members as $member_srl)
913 913
 			{
914 914
 				$oCommunicationController->sendMessage($sender_member_srl, $member_srl, $title, $message, false);
915 915
 			}
@@ -926,14 +926,14 @@  discard block
 block discarded – undo
926 926
 	function procMemberAdminDeleteMembers()
927 927
 	{
928 928
 		$target_member_srls = Context::get('target_member_srls');
929
-		if(!$target_member_srls) return new BaseObject(-1, 'msg_invalid_request');
929
+		if (!$target_member_srls) return new BaseObject(-1, 'msg_invalid_request');
930 930
 		$member_srls = explode(',', $target_member_srls);
931 931
 		$oMemberController = getController('member');
932 932
 
933
-		foreach($member_srls as $member)
933
+		foreach ($member_srls as $member)
934 934
 		{
935 935
 			$output = $oMemberController->deleteMember($member);
936
-			if(!$output->toBool())
936
+			if (!$output->toBool())
937 937
 			{
938 938
 				$this->setMessage('failed_deleted');
939 939
 				return $output;
@@ -950,11 +950,11 @@  discard block
 block discarded – undo
950 950
 	function procMemberAdminUpdateMembersGroup()
951 951
 	{
952 952
 		$member_srl = Context::get('member_srl');
953
-		if(!$member_srl) return new BaseObject(-1,'msg_invalid_request');
954
-		$member_srls = explode(',',$member_srl);
953
+		if (!$member_srl) return new BaseObject(-1, 'msg_invalid_request');
954
+		$member_srls = explode(',', $member_srl);
955 955
 
956 956
 		$group_srl = Context::get('group_srls');
957
-		if(!is_array($group_srl)) $group_srls = explode('|@|', $group_srl);
957
+		if (!is_array($group_srl)) $group_srls = explode('|@|', $group_srl);
958 958
 		else $group_srls = $group_srl;
959 959
 
960 960
 		$oDB = &DB::getInstance();
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
 		$args = new stdClass;
964 964
 		$args->member_srl = $member_srl;
965 965
 		$output = executeQuery('member.deleteMembersGroup', $args);
966
-		if(!$output->toBool())
966
+		if (!$output->toBool())
967 967
 		{
968 968
 			$oDB->rollback();
969 969
 			return $output;
@@ -971,21 +971,21 @@  discard block
 block discarded – undo
971 971
 		// Add to a selected group
972 972
 		$group_count = count($group_srls);
973 973
 		$member_count = count($member_srls);
974
-		for($j=0;$j<$group_count;$j++)
974
+		for ($j = 0; $j < $group_count; $j++)
975 975
 		{
976
-			$group_srl = (int)trim($group_srls[$j]);
977
-			if(!$group_srl) continue;
978
-			for($i=0;$i<$member_count;$i++)
976
+			$group_srl = (int) trim($group_srls[$j]);
977
+			if (!$group_srl) continue;
978
+			for ($i = 0; $i < $member_count; $i++)
979 979
 			{
980
-				$member_srl = (int)trim($member_srls[$i]);
981
-				if(!$member_srl) continue;
980
+				$member_srl = (int) trim($member_srls[$i]);
981
+				if (!$member_srl) continue;
982 982
 
983 983
 				$args = new stdClass;
984 984
 				$args->member_srl = $member_srl;
985 985
 				$args->group_srl = $group_srl;
986 986
 
987 987
 				$output = executeQuery('member.addMemberToGroup', $args);
988
-				if(!$output->toBool())
988
+				if (!$output->toBool())
989 989
 				{
990 990
 					$oDB->rollback();
991 991
 					return $output;
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
 
999 999
 		$this->setMessage('success_updated');
1000 1000
 
1001
-		if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
1001
+		if (!in_array(Context::getRequestMethod(), array('XMLRPC', 'JSON')))
1002 1002
 		{
1003 1003
 			global $lang;
1004 1004
 			htmlHeader();
@@ -1019,19 +1019,19 @@  discard block
 block discarded – undo
1019 1019
 	{
1020 1020
 		$user_ids = Context::get('user_id');
1021 1021
 
1022
-		$user_ids = explode(',',$user_ids);
1022
+		$user_ids = explode(',', $user_ids);
1023 1023
 		$success_ids = array();
1024 1024
 
1025
-		foreach($user_ids as $val)
1025
+		foreach ($user_ids as $val)
1026 1026
 		{
1027 1027
 			$val = trim($val);
1028
-			if(!$val) continue;
1028
+			if (!$val) continue;
1029 1029
 
1030 1030
 			$output = $this->insertDeniedID($val, '');
1031
-			if($output->toBool()) $success_ids[] = $val;
1031
+			if ($output->toBool()) $success_ids[] = $val;
1032 1032
 		}
1033 1033
 
1034
-		$this->add('user_ids', implode(',',$success_ids));
1034
+		$this->add('user_ids', implode(',', $success_ids));
1035 1035
 
1036 1036
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminDeniedIDList');
1037 1037
 		$this->setRedirectUrl($returnUrl);
@@ -1048,10 +1048,10 @@  discard block
 block discarded – undo
1048 1048
 		$mode = Context::get('mode');
1049 1049
 		$mode = $mode ? $mode : 'insert';
1050 1050
 
1051
-		if($mode == 'delete')
1051
+		if ($mode == 'delete')
1052 1052
 		{
1053 1053
 			$output = $this->deleteDeniedNickName($nick_name);
1054
-			if(!$output->toBool())
1054
+			if (!$output->toBool())
1055 1055
 			{
1056 1056
 				return $output;
1057 1057
 			}
@@ -1060,19 +1060,19 @@  discard block
 block discarded – undo
1060 1060
 		}
1061 1061
 		else
1062 1062
 		{
1063
-			$nick_names = explode(',',$nick_name);
1063
+			$nick_names = explode(',', $nick_name);
1064 1064
 			$success_nick_names = array();
1065 1065
 
1066
-			foreach($nick_names as $val)
1066
+			foreach ($nick_names as $val)
1067 1067
 			{
1068 1068
 				$val = trim($val);
1069
-				if(!$val) continue;
1069
+				if (!$val) continue;
1070 1070
 
1071 1071
 				$output = $this->insertDeniedNickName($val, '');
1072
-				if($output->toBool()) $success_nick_names[] = $val;
1072
+				if ($output->toBool()) $success_nick_names[] = $val;
1073 1073
 			}
1074 1074
 
1075
-			$this->add('nick_names', implode(',',$success_nick_names));
1075
+			$this->add('nick_names', implode(',', $success_nick_names));
1076 1076
 		}
1077 1077
 	}
1078 1078
 
@@ -1085,16 +1085,16 @@  discard block
 block discarded – undo
1085 1085
 		$user_id = Context::get('user_id');
1086 1086
 		$mode = Context::get('mode');
1087 1087
 
1088
-		switch($mode)
1088
+		switch ($mode)
1089 1089
 		{
1090 1090
 			case 'delete' :
1091 1091
 				$output = $this->deleteDeniedID($user_id);
1092
-				if(!$output->toBool()) return $output;
1092
+				if (!$output->toBool()) return $output;
1093 1093
 				$msg_code = 'success_deleted';
1094 1094
 				break;
1095 1095
 		}
1096 1096
 
1097
-		$this->add('page',Context::get('page'));
1097
+		$this->add('page', Context::get('page'));
1098 1098
 		$this->setMessage($msg_code);
1099 1099
 	}
1100 1100
 
@@ -1141,24 +1141,24 @@  discard block
 block discarded – undo
1141 1141
 	 */
1142 1142
 	function insertGroup($args)
1143 1143
 	{
1144
-		if(!$args->site_srl) $args->site_srl = 0;
1144
+		if (!$args->site_srl) $args->site_srl = 0;
1145 1145
 		// Check the value of is_default.
1146
-		if($args->is_default != 'Y')
1146
+		if ($args->is_default != 'Y')
1147 1147
 		{
1148 1148
 			$args->is_default = 'N';
1149 1149
 		}
1150 1150
 		else
1151 1151
 		{
1152 1152
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1153
-			if(!$output->toBool()) return $output;
1153
+			if (!$output->toBool()) return $output;
1154 1154
 		}
1155 1155
 
1156
-		if(!isset($args->list_order) || $args->list_order=='')
1156
+		if (!isset($args->list_order) || $args->list_order == '')
1157 1157
 		{
1158 1158
 			$args->list_order = $args->group_srl;
1159 1159
 		}
1160 1160
 
1161
-		if(!$args->group_srl) $args->group_srl = getNextSequence();
1161
+		if (!$args->group_srl) $args->group_srl = getNextSequence();
1162 1162
 		$args->list_order = $args->group_srl;
1163 1163
 		$output = executeQuery('member.insertGroup', $args);
1164 1164
 		$this->_deleteMemberGroupCache($args->site_srl);
@@ -1173,17 +1173,17 @@  discard block
 block discarded – undo
1173 1173
 	 */
1174 1174
 	function updateGroup($args)
1175 1175
 	{
1176
-		if(!$args->site_srl) $args->site_srl = 0;
1176
+		if (!$args->site_srl) $args->site_srl = 0;
1177 1177
 		// Check the value of is_default.
1178
-		if(!$args->group_srl) return new BaseObject(-1, 'lang->msg_not_founded');
1179
-		if($args->is_default!='Y')
1178
+		if (!$args->group_srl) return new BaseObject(-1, 'lang->msg_not_founded');
1179
+		if ($args->is_default != 'Y')
1180 1180
 		{
1181 1181
 			$args->is_default = 'N';
1182 1182
 		}
1183 1183
 		else
1184 1184
 		{
1185 1185
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1186
-			if(!$output->toBool()) return $output;
1186
+			if (!$output->toBool()) return $output;
1187 1187
 		}
1188 1188
 
1189 1189
 		$output = executeQuery('member.updateGroup', $args);
@@ -1206,8 +1206,8 @@  discard block
 block discarded – undo
1206 1206
 		$columnList = array('group_srl', 'is_default');
1207 1207
 		$group_info = $oMemberModel->getGroup($group_srl, $columnList);
1208 1208
 
1209
-		if(!$group_info) return new BaseObject(-1, 'lang->msg_not_founded');
1210
-		if($group_info->is_default == 'Y') return new BaseObject(-1, 'msg_not_delete_default');
1209
+		if (!$group_info) return new BaseObject(-1, 'lang->msg_not_founded');
1210
+		if ($group_info->is_default == 'Y') return new BaseObject(-1, 'msg_not_delete_default');
1211 1211
 
1212 1212
 		// Get groups where is_default == 'Y'
1213 1213
 		$columnList = array('site_srl', 'group_srl');
@@ -1244,7 +1244,7 @@  discard block
 block discarded – undo
1244 1244
 		$defaultGroup = $oMemberModel->getDefaultGroup(0);
1245 1245
 		$defaultGroupSrl = $defaultGroup->group_srl;
1246 1246
 		$group_srls = $vars->group_srls;
1247
-		foreach($group_srls as $order=>$group_srl)
1247
+		foreach ($group_srls as $order=>$group_srl)
1248 1248
 		{
1249 1249
 			$isInsert = false;
1250 1250
 			$update_args = new stdClass();
@@ -1253,9 +1253,9 @@  discard block
 block discarded – undo
1253 1253
 			$update_args->image_mark = $vars->image_marks[$order];
1254 1254
 			$update_args->list_order = $order + 1;
1255 1255
 
1256
-			if(!$update_args->title) continue;
1256
+			if (!$update_args->title) continue;
1257 1257
 
1258
-			if(is_numeric($group_srl)) {
1258
+			if (is_numeric($group_srl)) {
1259 1259
 				$update_args->group_srl = $group_srl;
1260 1260
 				$output = $this->updateGroup($update_args);
1261 1261
 			}
@@ -1264,7 +1264,7 @@  discard block
 block discarded – undo
1264 1264
 				$output = $this->insertGroup($update_args);
1265 1265
 			}
1266 1266
 
1267
-			if($vars->defaultGroup == $group_srl) {
1267
+			if ($vars->defaultGroup == $group_srl) {
1268 1268
 				$defaultGroupSrl = $update_args->group_srl;
1269 1269
 			}
1270 1270
 		}
@@ -1290,7 +1290,7 @@  discard block
 block discarded – undo
1290 1290
 	{
1291 1291
 		$vars = Context::getRequestVars();
1292 1292
 
1293
-		foreach($vars->group_srls as $key => $val)
1293
+		foreach ($vars->group_srls as $key => $val)
1294 1294
 		{
1295 1295
 			$args = new stdClass;
1296 1296
 			$args->group_srl = $val;
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 	{
1312 1312
 		//remove from cache
1313 1313
 		$oCacheHandler = CacheHandler::getInstance('object', null, true);
1314
-		if($oCacheHandler->isSupport())
1314
+		if ($oCacheHandler->isSupport())
1315 1315
 		{
1316 1316
 			$oCacheHandler->invalidateGroupKey('member');
1317 1317
 		}
@@ -1328,7 +1328,7 @@  discard block
 block discarded – undo
1328 1328
 		$args = new stdClass();
1329 1329
 		$args->user_id = $user_id;
1330 1330
 		$args->description = $description;
1331
-		$args->list_order = -1*getNextSequence();
1331
+		$args->list_order = -1 * getNextSequence();
1332 1332
 
1333 1333
 		return executeQuery('member.insertDeniedID', $args);
1334 1334
 	}
@@ -1349,7 +1349,7 @@  discard block
 block discarded – undo
1349 1349
 	 */
1350 1350
 	function deleteDeniedID($user_id)
1351 1351
 	{
1352
-		if(!$user_id) unset($user_id);
1352
+		if (!$user_id) unset($user_id);
1353 1353
 
1354 1354
 		$args = new stdClass;
1355 1355
 		$args->user_id = $user_id;
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
 	 */
1364 1364
 	function deleteDeniedNickName($nick_name)
1365 1365
 	{
1366
-		if(!$nick_name) unset($nick_name);
1366
+		if (!$nick_name) unset($nick_name);
1367 1367
 
1368 1368
 		$args = new stdClass;
1369 1369
 		$args->nick_name = $nick_name;
@@ -1402,16 +1402,16 @@  discard block
 block discarded – undo
1402 1402
 		// Get a list of all join forms
1403 1403
 		$join_form_list = $oMemberModel->getJoinFormList();
1404 1404
 		$join_form_srl_list = array_keys($join_form_list);
1405
-		if(count($join_form_srl_list)<2) return new BaseObject();
1405
+		if (count($join_form_srl_list) < 2) return new BaseObject();
1406 1406
 
1407 1407
 		$prev_member_join_form = NULL;
1408
-		foreach($join_form_list as $key => $val)
1408
+		foreach ($join_form_list as $key => $val)
1409 1409
 		{
1410
-			if($val->member_join_form_srl == $member_join_form_srl) break;
1410
+			if ($val->member_join_form_srl == $member_join_form_srl) break;
1411 1411
 			$prev_member_join_form = $val;
1412 1412
 		}
1413 1413
 		// Return if no previous join form exists
1414
-		if(!$prev_member_join_form) return new BaseObject();
1414
+		if (!$prev_member_join_form) return new BaseObject();
1415 1415
 		// Information of the join form
1416 1416
 		$cur_args = new stdClass;
1417 1417
 		$cur_args->member_join_form_srl = $member_join_form_srl;
@@ -1422,10 +1422,10 @@  discard block
 block discarded – undo
1422 1422
 		$prev_args->list_order = $list_order;
1423 1423
 		// Execute Query
1424 1424
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1425
-		if(!$output->toBool()) return $output;
1425
+		if (!$output->toBool()) return $output;
1426 1426
 
1427 1427
 		executeQuery('member.updateMemberJoinFormListorder', $prev_args);
1428
-		if(!$output->toBool()) return $output;
1428
+		if (!$output->toBool()) return $output;
1429 1429
 
1430 1430
 		return new BaseObject();
1431 1431
 	}
@@ -1449,16 +1449,16 @@  discard block
 block discarded – undo
1449 1449
 		// Get information of all join forms
1450 1450
 		$join_form_list = $oMemberModel->getJoinFormList();
1451 1451
 		$join_form_srl_list = array_keys($join_form_list);
1452
-		if(count($join_form_srl_list)<2) return new BaseObject();
1452
+		if (count($join_form_srl_list) < 2) return new BaseObject();
1453 1453
 
1454
-		for($i=0;$i<count($join_form_srl_list);$i++)
1454
+		for ($i = 0; $i < count($join_form_srl_list); $i++)
1455 1455
 		{
1456
-			if($join_form_srl_list[$i]==$member_join_form_srl) break;
1456
+			if ($join_form_srl_list[$i] == $member_join_form_srl) break;
1457 1457
 		}
1458 1458
 
1459
-		$next_member_join_form_srl = $join_form_srl_list[$i+1];
1459
+		$next_member_join_form_srl = $join_form_srl_list[$i + 1];
1460 1460
 		// Return if no previous join form exists
1461
-		if(!$next_member_join_form_srl) return new BaseObject();
1461
+		if (!$next_member_join_form_srl) return new BaseObject();
1462 1462
 		$next_member_join_form = $join_form_list[$next_member_join_form_srl];
1463 1463
 		// Information of the join form
1464 1464
 		$cur_args = new stdClass;
@@ -1470,10 +1470,10 @@  discard block
 block discarded – undo
1470 1470
 		$next_args->list_order = $list_order;
1471 1471
 		// Execute Query
1472 1472
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1473
-		if(!$output->toBool()) return $output;
1473
+		if (!$output->toBool()) return $output;
1474 1474
 
1475 1475
 		$output = executeQuery('member.updateMemberJoinFormListorder', $next_args);
1476
-		if(!$output->toBool()) return $output;
1476
+		if (!$output->toBool()) return $output;
1477 1477
 
1478 1478
 		return new BaseObject();
1479 1479
 	}
Please login to merge, or discard this patch.
Braces   +169 added lines, -88 removed lines patch added patch discarded remove patch
@@ -48,9 +48,11 @@  discard block
 block discarded – undo
48 48
 			$args->{$val} = Context::get($val);
49 49
 		}
50 50
 		$args->member_srl = Context::get('member_srl');
51
-		if(Context::get('reset_password'))
52
-			$args->password = Context::get('reset_password');
53
-		else unset($args->password);
51
+		if(Context::get('reset_password')) {
52
+					$args->password = Context::get('reset_password');
53
+		} else {
54
+			unset($args->password);
55
+		}
54 56
 
55 57
 		// Remove some unnecessary variables from all the vars
56 58
 		$all_args = Context::getRequestVars();
@@ -64,8 +66,12 @@  discard block
 block discarded – undo
64 66
 		unset($all_args->password2);
65 67
 		unset($all_args->reset_password);
66 68
 
67
-		if(!isset($args->limit_date)) $args->limit_date = "";
68
-		if(!isset($args->description)) $args->description = "";
69
+		if(!isset($args->limit_date)) {
70
+			$args->limit_date = "";
71
+		}
72
+		if(!isset($args->description)) {
73
+			$args->description = "";
74
+		}
69 75
 
70 76
 		// Add extra vars after excluding necessary information from all the requested arguments
71 77
 		$extra_vars = delObjectVars($all_args, $args);
@@ -79,7 +85,9 @@  discard block
 block discarded – undo
79 85
 			$columnList = array('member_srl');
80 86
 			$member_info = $oMemberModel->getMemberInfoByMemberSrl($args->member_srl, 0, $columnList);
81 87
 			// If no original member exists, make a new one
82
-			if($member_info->member_srl != $args->member_srl) unset($args->member_srl);
88
+			if($member_info->member_srl != $args->member_srl) {
89
+				unset($args->member_srl);
90
+			}
83 91
 		}
84 92
 
85 93
 		// remove whitespace
@@ -99,14 +107,15 @@  discard block
 block discarded – undo
99 107
 			$args->password = Context::get('password');
100 108
 			$output = $oMemberController->insertMember($args);
101 109
 			$msg_code = 'success_registed';
102
-		}
103
-		else
110
+		} else
104 111
 		{
105 112
 			$output = $oMemberController->updateMember($args);
106 113
 			$msg_code = 'success_updated';
107 114
 		}
108 115
 
109
-		if(!$output->toBool()) return $output;
116
+		if(!$output->toBool()) {
117
+			return $output;
118
+		}
110 119
 		// Save Signature
111 120
 		$signature = Context::get('signature');
112 121
 		$oMemberController->putSignature($args->member_srl, $signature);
@@ -118,21 +127,27 @@  discard block
 block discarded – undo
118 127
 		if(is_uploaded_file($profile_image['tmp_name']))
119 128
 		{
120 129
 			$output = $oMemberController->insertProfileImage($args->member_srl, $profile_image['tmp_name']);
121
-			if(!$output->toBool()) return $output;
130
+			if(!$output->toBool()) {
131
+				return $output;
132
+			}
122 133
 		}
123 134
 
124 135
 		$image_mark = Context::get('image_mark');
125 136
 		if(is_uploaded_file($image_mark['tmp_name']))
126 137
 		{
127 138
 			$output = $oMemberController->insertImageMark($args->member_srl, $image_mark['tmp_name']);
128
-			if(!$output->toBool()) return $output;
139
+			if(!$output->toBool()) {
140
+				return $output;
141
+			}
129 142
 		}
130 143
 
131 144
 		$image_name = Context::get('image_name');
132 145
 		if (is_uploaded_file($image_name['tmp_name']))
133 146
 		{
134 147
 			$output = $oMemberController->insertImageName($args->member_srl, $image_name['tmp_name']);
135
-			if(!$output->toBool()) return $output;
148
+			if(!$output->toBool()) {
149
+				return $output;
150
+			}
136 151
 		}
137 152
 
138 153
 		$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispMemberAdminList');
@@ -150,7 +165,9 @@  discard block
 block discarded – undo
150 165
 
151 166
 		$oMemberController = getController('member');
152 167
 		$output = $oMemberController->deleteMember($member_srl);
153
-		if(!$output->toBool()) return $output;
168
+		if(!$output->toBool()) {
169
+			return $output;
170
+		}
154 171
 
155 172
 		$this->add('page',Context::get('page'));
156 173
 		$this->setMessage("success_deleted");
@@ -456,10 +473,11 @@  discard block
 block discarded – undo
456 473
 				$signupItem->max_width = $config->{$key.'_max_width'};
457 474
 				$signupItem->max_height = $config->{$key.'_max_height'};
458 475
 			}
459
-			if($signupItem->isIdentifier)
460
-				array_unshift($list_order, $signupItem);
461
-			else
462
-				$list_order[] = $signupItem;
476
+			if($signupItem->isIdentifier) {
477
+							array_unshift($list_order, $signupItem);
478
+			} else {
479
+							$list_order[] = $signupItem;
480
+			}
463 481
 		}
464 482
 		if(is_array($extendItems))
465 483
 		{
@@ -516,38 +534,30 @@  discard block
 block discarded – undo
516 534
 				if($formInfo->type == 'tel' || $formInfo->type == 'kr_zip')
517 535
 				{
518 536
 					$fields[] = sprintf('<field name="%s[]" required="true" />', $formInfo->name);
519
-				}
520
-				else if($formInfo->name == 'password')
537
+				} else if($formInfo->name == 'password')
521 538
 				{
522 539
 					$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="4:60" /></field>';
523 540
 					$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
524
-				}
525
-				else if($formInfo->name == 'find_account_question')
541
+				} else if($formInfo->name == 'find_account_question')
526 542
 				{
527 543
 					$fields[] = '<field name="find_account_question"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
528 544
 					$fields[] = '<field name="find_account_answer" length=":250"><if test="$modify_find_account_answer" attr="required" value="true" /></field>';
529
-				}
530
-				else if($formInfo->name == 'email_address')
545
+				} else if($formInfo->name == 'email_address')
531 546
 				{
532 547
 					$fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name);
533
-				}
534
-				else if($formInfo->name == 'user_id')
548
+				} else if($formInfo->name == 'user_id')
535 549
 				{
536 550
 					$fields[] = sprintf('<field name="%s" required="true" rule="userid" length="3:20" />', $formInfo->name);
537
-				}
538
-				else if($formInfo->name == 'nick_name')
551
+				} else if($formInfo->name == 'nick_name')
539 552
 				{
540 553
 					$fields[] = sprintf('<field name="%s" required="true" length="2:20" />', $formInfo->name);
541
-				}
542
-				else if(strpos($formInfo->name, 'image') !== false)
554
+				} else if(strpos($formInfo->name, 'image') !== false)
543 555
 				{
544 556
 					$fields[] = sprintf('<field name="%s"><if test="$act != \'procMemberAdminInsert\' &amp;&amp; $__%s_exist != \'true\'" attr="required" value="true" /></field>', $formInfo->name, $formInfo->name);
545
-				}
546
-				else if($formInfo->name == 'signature')
557
+				} else if($formInfo->name == 'signature')
547 558
 				{
548 559
 					$fields[] = '<field name="signature"><if test="$member_srl" attr="required" value="true" /></field>';
549
-				}
550
-				else
560
+				} else
551 561
 				{
552 562
 					$fields[] = sprintf('<field name="%s" required="true" />', $formInfo->name);
553 563
 				}
@@ -607,8 +617,9 @@  discard block
 block discarded – undo
607 617
 			'</ruleset>';
608 618
 
609 619
 		$fields = array();
610
-		if($identifier == 'user_id')
611
-			$fields[] = '<field name="user_id" required="true" rule="userid" />';
620
+		if($identifier == 'user_id') {
621
+					$fields[] = '<field name="user_id" required="true" rule="userid" />';
622
+		}
612 623
 
613 624
 		$fields[] = '<field name="email_address" required="true" rule="email" />';
614 625
 		$fields[] = '<field name="find_account_question" required="true" />';
@@ -630,7 +641,9 @@  discard block
 block discarded – undo
630 641
 	{
631 642
 		$args = Context::gets('title','description','is_default','image_mark');
632 643
 		$output = $this->insertGroup($args);
633
-		if(!$output->toBool()) return $output;
644
+		if(!$output->toBool()) {
645
+			return $output;
646
+		}
634 647
 
635 648
 		$this->add('group_srl','');
636 649
 		$this->add('page',Context::get('page'));
@@ -651,7 +664,9 @@  discard block
 block discarded – undo
651 664
 		$args = Context::gets('group_srl','title','description','is_default','image_mark');
652 665
 		$args->site_srl = 0;
653 666
 		$output = $this->updateGroup($args);
654
-		if(!$output->toBool()) return $output;
667
+		if(!$output->toBool()) {
668
+			return $output;
669
+		}
655 670
 
656 671
 		$this->add('group_srl','');
657 672
 		$this->add('page',Context::get('page'));
@@ -670,7 +685,9 @@  discard block
 block discarded – undo
670 685
 		$group_srl = Context::get('group_srl');
671 686
 
672 687
 		$output = $this->deleteGroup($group_srl);
673
-		if(!$output->toBool()) return $output;
688
+		if(!$output->toBool()) {
689
+			return $output;
690
+		}
674 691
 
675 692
 		$this->add('group_srl','');
676 693
 		$this->add('page',Context::get('page'));
@@ -695,14 +712,15 @@  discard block
 block discarded – undo
695 712
 		$args->default_value = explode("\n", str_replace("\r", '', Context::get('default_value')));
696 713
 		$args->required = Context::get('required');
697 714
 		$args->is_active = (isset($args->required));
698
-		if(!in_array(strtoupper($args->required), array('Y','N')))$args->required = 'N';
715
+		if(!in_array(strtoupper($args->required), array('Y','N'))) {
716
+			$args->required = 'N';
717
+		}
699 718
 		$args->description = Context::get('description') ? Context::get('description') : '';
700 719
 		// Default values
701 720
 		if(in_array($args->column_type, array('checkbox','select','radio')) && count($args->default_value))
702 721
 		{
703 722
 			$args->default_value = serialize($args->default_value);
704
-		}
705
-		else
723
+		} else
706 724
 		{
707 725
 			$args->default_value = '';
708 726
 		}
@@ -714,7 +732,9 @@  discard block
 block discarded – undo
714 732
 		{
715 733
 			if($item->name == $args->column_name)
716 734
 			{
717
-				if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) continue;
735
+				if($args->member_join_form_srl && $args->member_join_form_srl == $item->member_join_form_srl) {
736
+					continue;
737
+				}
718 738
 				return new BaseObject(-1,'msg_exists_user_id');
719 739
 			}
720 740
 		}
@@ -725,13 +745,14 @@  discard block
 block discarded – undo
725 745
 			$isInsert = true;
726 746
 			$args->list_order = $args->member_join_form_srl = getNextSequence();
727 747
 			$output = executeQuery('member.insertJoinForm', $args);
728
-		}
729
-		else
748
+		} else
730 749
 		{
731 750
 			$output = executeQuery('member.updateJoinForm', $args);
732 751
 		}
733 752
 
734
-		if(!$output->toBool()) return $output;
753
+		if(!$output->toBool()) {
754
+			return $output;
755
+		}
735 756
 
736 757
 		// memberConfig update
737 758
 		$signupItem = new stdClass();
@@ -751,8 +772,7 @@  discard block
 block discarded – undo
751 772
 		if($isInsert)
752 773
 		{
753 774
 			$config->signupForm[] = $signupItem;
754
-		}
755
-		else
775
+		} else
756 776
 		{
757 777
 			foreach($config->signupForm as $key=>$val)
758 778
 			{
@@ -823,7 +843,9 @@  discard block
 block discarded – undo
823 843
 			case 'update' :
824 844
 				break;
825 845
 		}
826
-		if(!$output->toBool()) return $output;
846
+		if(!$output->toBool()) {
847
+			return $output;
848
+		}
827 849
 
828 850
 		$this->setMessage($msg_code);
829 851
 	}
@@ -926,7 +948,9 @@  discard block
 block discarded – undo
926 948
 	function procMemberAdminDeleteMembers()
927 949
 	{
928 950
 		$target_member_srls = Context::get('target_member_srls');
929
-		if(!$target_member_srls) return new BaseObject(-1, 'msg_invalid_request');
951
+		if(!$target_member_srls) {
952
+			return new BaseObject(-1, 'msg_invalid_request');
953
+		}
930 954
 		$member_srls = explode(',', $target_member_srls);
931 955
 		$oMemberController = getController('member');
932 956
 
@@ -950,12 +974,17 @@  discard block
 block discarded – undo
950 974
 	function procMemberAdminUpdateMembersGroup()
951 975
 	{
952 976
 		$member_srl = Context::get('member_srl');
953
-		if(!$member_srl) return new BaseObject(-1,'msg_invalid_request');
977
+		if(!$member_srl) {
978
+			return new BaseObject(-1,'msg_invalid_request');
979
+		}
954 980
 		$member_srls = explode(',',$member_srl);
955 981
 
956 982
 		$group_srl = Context::get('group_srls');
957
-		if(!is_array($group_srl)) $group_srls = explode('|@|', $group_srl);
958
-		else $group_srls = $group_srl;
983
+		if(!is_array($group_srl)) {
984
+			$group_srls = explode('|@|', $group_srl);
985
+		} else {
986
+			$group_srls = $group_srl;
987
+		}
959 988
 
960 989
 		$oDB = &DB::getInstance();
961 990
 		$oDB->begin();
@@ -974,11 +1003,15 @@  discard block
 block discarded – undo
974 1003
 		for($j=0;$j<$group_count;$j++)
975 1004
 		{
976 1005
 			$group_srl = (int)trim($group_srls[$j]);
977
-			if(!$group_srl) continue;
1006
+			if(!$group_srl) {
1007
+				continue;
1008
+			}
978 1009
 			for($i=0;$i<$member_count;$i++)
979 1010
 			{
980 1011
 				$member_srl = (int)trim($member_srls[$i]);
981
-				if(!$member_srl) continue;
1012
+				if(!$member_srl) {
1013
+					continue;
1014
+				}
982 1015
 
983 1016
 				$args = new stdClass;
984 1017
 				$args->member_srl = $member_srl;
@@ -1025,10 +1058,14 @@  discard block
 block discarded – undo
1025 1058
 		foreach($user_ids as $val)
1026 1059
 		{
1027 1060
 			$val = trim($val);
1028
-			if(!$val) continue;
1061
+			if(!$val) {
1062
+				continue;
1063
+			}
1029 1064
 
1030 1065
 			$output = $this->insertDeniedID($val, '');
1031
-			if($output->toBool()) $success_ids[] = $val;
1066
+			if($output->toBool()) {
1067
+				$success_ids[] = $val;
1068
+			}
1032 1069
 		}
1033 1070
 
1034 1071
 		$this->add('user_ids', implode(',',$success_ids));
@@ -1057,8 +1094,7 @@  discard block
 block discarded – undo
1057 1094
 			}
1058 1095
 			$msg_code = 'success_deleted';
1059 1096
 			$this->setMessage($msg_code);
1060
-		}
1061
-		else
1097
+		} else
1062 1098
 		{
1063 1099
 			$nick_names = explode(',',$nick_name);
1064 1100
 			$success_nick_names = array();
@@ -1066,10 +1102,14 @@  discard block
 block discarded – undo
1066 1102
 			foreach($nick_names as $val)
1067 1103
 			{
1068 1104
 				$val = trim($val);
1069
-				if(!$val) continue;
1105
+				if(!$val) {
1106
+					continue;
1107
+				}
1070 1108
 
1071 1109
 				$output = $this->insertDeniedNickName($val, '');
1072
-				if($output->toBool()) $success_nick_names[] = $val;
1110
+				if($output->toBool()) {
1111
+					$success_nick_names[] = $val;
1112
+				}
1073 1113
 			}
1074 1114
 
1075 1115
 			$this->add('nick_names', implode(',',$success_nick_names));
@@ -1089,7 +1129,9 @@  discard block
 block discarded – undo
1089 1129
 		{
1090 1130
 			case 'delete' :
1091 1131
 				$output = $this->deleteDeniedID($user_id);
1092
-				if(!$output->toBool()) return $output;
1132
+				if(!$output->toBool()) {
1133
+					return $output;
1134
+				}
1093 1135
 				$msg_code = 'success_deleted';
1094 1136
 				break;
1095 1137
 		}
@@ -1141,16 +1183,19 @@  discard block
 block discarded – undo
1141 1183
 	 */
1142 1184
 	function insertGroup($args)
1143 1185
 	{
1144
-		if(!$args->site_srl) $args->site_srl = 0;
1186
+		if(!$args->site_srl) {
1187
+			$args->site_srl = 0;
1188
+		}
1145 1189
 		// Check the value of is_default.
1146 1190
 		if($args->is_default != 'Y')
1147 1191
 		{
1148 1192
 			$args->is_default = 'N';
1149
-		}
1150
-		else
1193
+		} else
1151 1194
 		{
1152 1195
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1153
-			if(!$output->toBool()) return $output;
1196
+			if(!$output->toBool()) {
1197
+				return $output;
1198
+			}
1154 1199
 		}
1155 1200
 
1156 1201
 		if(!isset($args->list_order) || $args->list_order=='')
@@ -1158,7 +1203,9 @@  discard block
 block discarded – undo
1158 1203
 			$args->list_order = $args->group_srl;
1159 1204
 		}
1160 1205
 
1161
-		if(!$args->group_srl) $args->group_srl = getNextSequence();
1206
+		if(!$args->group_srl) {
1207
+			$args->group_srl = getNextSequence();
1208
+		}
1162 1209
 		$args->list_order = $args->group_srl;
1163 1210
 		$output = executeQuery('member.insertGroup', $args);
1164 1211
 		$this->_deleteMemberGroupCache($args->site_srl);
@@ -1173,17 +1220,22 @@  discard block
 block discarded – undo
1173 1220
 	 */
1174 1221
 	function updateGroup($args)
1175 1222
 	{
1176
-		if(!$args->site_srl) $args->site_srl = 0;
1223
+		if(!$args->site_srl) {
1224
+			$args->site_srl = 0;
1225
+		}
1177 1226
 		// Check the value of is_default.
1178
-		if(!$args->group_srl) return new BaseObject(-1, 'lang->msg_not_founded');
1227
+		if(!$args->group_srl) {
1228
+			return new BaseObject(-1, 'lang->msg_not_founded');
1229
+		}
1179 1230
 		if($args->is_default!='Y')
1180 1231
 		{
1181 1232
 			$args->is_default = 'N';
1182
-		}
1183
-		else
1233
+		} else
1184 1234
 		{
1185 1235
 			$output = executeQuery('member.updateGroupDefaultClear', $args);
1186
-			if(!$output->toBool()) return $output;
1236
+			if(!$output->toBool()) {
1237
+				return $output;
1238
+			}
1187 1239
 		}
1188 1240
 
1189 1241
 		$output = executeQuery('member.updateGroup', $args);
@@ -1206,8 +1258,12 @@  discard block
 block discarded – undo
1206 1258
 		$columnList = array('group_srl', 'is_default');
1207 1259
 		$group_info = $oMemberModel->getGroup($group_srl, $columnList);
1208 1260
 
1209
-		if(!$group_info) return new BaseObject(-1, 'lang->msg_not_founded');
1210
-		if($group_info->is_default == 'Y') return new BaseObject(-1, 'msg_not_delete_default');
1261
+		if(!$group_info) {
1262
+			return new BaseObject(-1, 'lang->msg_not_founded');
1263
+		}
1264
+		if($group_info->is_default == 'Y') {
1265
+			return new BaseObject(-1, 'msg_not_delete_default');
1266
+		}
1211 1267
 
1212 1268
 		// Get groups where is_default == 'Y'
1213 1269
 		$columnList = array('site_srl', 'group_srl');
@@ -1253,13 +1309,14 @@  discard block
 block discarded – undo
1253 1309
 			$update_args->image_mark = $vars->image_marks[$order];
1254 1310
 			$update_args->list_order = $order + 1;
1255 1311
 
1256
-			if(!$update_args->title) continue;
1312
+			if(!$update_args->title) {
1313
+				continue;
1314
+			}
1257 1315
 
1258 1316
 			if(is_numeric($group_srl)) {
1259 1317
 				$update_args->group_srl = $group_srl;
1260 1318
 				$output = $this->updateGroup($update_args);
1261
-			}
1262
-			else {
1319
+			} else {
1263 1320
 				$update_args->group_srl = getNextSequence();
1264 1321
 				$output = $this->insertGroup($update_args);
1265 1322
 			}
@@ -1349,7 +1406,9 @@  discard block
 block discarded – undo
1349 1406
 	 */
1350 1407
 	function deleteDeniedID($user_id)
1351 1408
 	{
1352
-		if(!$user_id) unset($user_id);
1409
+		if(!$user_id) {
1410
+			unset($user_id);
1411
+		}
1353 1412
 
1354 1413
 		$args = new stdClass;
1355 1414
 		$args->user_id = $user_id;
@@ -1363,7 +1422,9 @@  discard block
 block discarded – undo
1363 1422
 	 */
1364 1423
 	function deleteDeniedNickName($nick_name)
1365 1424
 	{
1366
-		if(!$nick_name) unset($nick_name);
1425
+		if(!$nick_name) {
1426
+			unset($nick_name);
1427
+		}
1367 1428
 
1368 1429
 		$args = new stdClass;
1369 1430
 		$args->nick_name = $nick_name;
@@ -1402,16 +1463,22 @@  discard block
 block discarded – undo
1402 1463
 		// Get a list of all join forms
1403 1464
 		$join_form_list = $oMemberModel->getJoinFormList();
1404 1465
 		$join_form_srl_list = array_keys($join_form_list);
1405
-		if(count($join_form_srl_list)<2) return new BaseObject();
1466
+		if(count($join_form_srl_list)<2) {
1467
+			return new BaseObject();
1468
+		}
1406 1469
 
1407 1470
 		$prev_member_join_form = NULL;
1408 1471
 		foreach($join_form_list as $key => $val)
1409 1472
 		{
1410
-			if($val->member_join_form_srl == $member_join_form_srl) break;
1473
+			if($val->member_join_form_srl == $member_join_form_srl) {
1474
+				break;
1475
+			}
1411 1476
 			$prev_member_join_form = $val;
1412 1477
 		}
1413 1478
 		// Return if no previous join form exists
1414
-		if(!$prev_member_join_form) return new BaseObject();
1479
+		if(!$prev_member_join_form) {
1480
+			return new BaseObject();
1481
+		}
1415 1482
 		// Information of the join form
1416 1483
 		$cur_args = new stdClass;
1417 1484
 		$cur_args->member_join_form_srl = $member_join_form_srl;
@@ -1422,10 +1489,14 @@  discard block
 block discarded – undo
1422 1489
 		$prev_args->list_order = $list_order;
1423 1490
 		// Execute Query
1424 1491
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1425
-		if(!$output->toBool()) return $output;
1492
+		if(!$output->toBool()) {
1493
+			return $output;
1494
+		}
1426 1495
 
1427 1496
 		executeQuery('member.updateMemberJoinFormListorder', $prev_args);
1428
-		if(!$output->toBool()) return $output;
1497
+		if(!$output->toBool()) {
1498
+			return $output;
1499
+		}
1429 1500
 
1430 1501
 		return new BaseObject();
1431 1502
 	}
@@ -1449,16 +1520,22 @@  discard block
 block discarded – undo
1449 1520
 		// Get information of all join forms
1450 1521
 		$join_form_list = $oMemberModel->getJoinFormList();
1451 1522
 		$join_form_srl_list = array_keys($join_form_list);
1452
-		if(count($join_form_srl_list)<2) return new BaseObject();
1523
+		if(count($join_form_srl_list)<2) {
1524
+			return new BaseObject();
1525
+		}
1453 1526
 
1454 1527
 		for($i=0;$i<count($join_form_srl_list);$i++)
1455 1528
 		{
1456
-			if($join_form_srl_list[$i]==$member_join_form_srl) break;
1529
+			if($join_form_srl_list[$i]==$member_join_form_srl) {
1530
+				break;
1531
+			}
1457 1532
 		}
1458 1533
 
1459 1534
 		$next_member_join_form_srl = $join_form_srl_list[$i+1];
1460 1535
 		// Return if no previous join form exists
1461
-		if(!$next_member_join_form_srl) return new BaseObject();
1536
+		if(!$next_member_join_form_srl) {
1537
+			return new BaseObject();
1538
+		}
1462 1539
 		$next_member_join_form = $join_form_list[$next_member_join_form_srl];
1463 1540
 		// Information of the join form
1464 1541
 		$cur_args = new stdClass;
@@ -1470,10 +1547,14 @@  discard block
 block discarded – undo
1470 1547
 		$next_args->list_order = $list_order;
1471 1548
 		// Execute Query
1472 1549
 		$output = executeQuery('member.updateMemberJoinFormListorder', $cur_args);
1473
-		if(!$output->toBool()) return $output;
1550
+		if(!$output->toBool()) {
1551
+			return $output;
1552
+		}
1474 1553
 
1475 1554
 		$output = executeQuery('member.updateMemberJoinFormListorder', $next_args);
1476
-		if(!$output->toBool()) return $output;
1555
+		if(!$output->toBool()) {
1556
+			return $output;
1557
+		}
1477 1558
 
1478 1559
 		return new BaseObject();
1479 1560
 	}
Please login to merge, or discard this patch.
modules/member/member.admin.model.php 2 patches
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.
Spacing   +41 added lines, -41 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,22 +110,22 @@  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 131
 			$args->sort_index = "member.".$sort_index;
@@ -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,7 +202,7 @@  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();
@@ -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 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.
modules/member/member.mobile.php 2 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -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.
modules/menu/menu.admin.model.php 3 patches
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
@@ -579,7 +579,7 @@
 block discarded – undo
579 579
 
580 580
 	/**
581 581
 	 * Get module's detail setup contents
582
-	 * @return void
582
+	 * @return BaseObject|null
583 583
 	 */
584 584
 	public function getMenuAdminDetailSetup()
585 585
 	{
Please login to merge, or discard this patch.
Spacing   +90 added lines, -90 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
 			}
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 		$oTemplate = &TemplateHandler::getInstance();
328 328
 		$tpl = $oTemplate->compile($this->module_path.'tpl', 'menu_item_info');
329 329
 
330
-		$this->add('tpl', str_replace("\n"," ",$tpl));
330
+		$this->add('tpl', str_replace("\n", " ", $tpl));
331 331
 	}
332 332
 
333 333
 	/**
@@ -346,10 +346,10 @@  discard block
 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);
@@ -361,10 +361,10 @@  discard block
 block discarded – undo
361 361
 			$module->defaultMobileSkin->skin = $defaultMobileSkin;
362 362
 			$module->defaultMobileSkin->title = $mobileSkinInfo->title ? $mobileSkinInfo->title : $defaultMobileSkin;
363 363
 
364
-			$module->package_srl = $oAutoinstallModel->getPackageSrlByPath('./modules/' . $module_name);
365
-			$module->url = _XE_LOCATION_SITE_ . '?mid=download&package_srl=' . $module->package_srl;
364
+			$module->package_srl = $oAutoinstallModel->getPackageSrlByPath('./modules/'.$module_name);
365
+			$module->url = _XE_LOCATION_SITE_.'?mid=download&package_srl='.$module->package_srl;
366 366
 
367
-			if($module_name == 'page')
367
+			if ($module_name == 'page')
368 368
 			{
369 369
 				$pageTypeName = Context::getLang('page_type_name');
370 370
 				$module->title = $pageTypeName['ARTICLE'];
@@ -401,11 +401,11 @@  discard block
 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 BaseObject(-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 BaseObject(-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.
modules/menu/menu.admin.view.php 2 patches
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.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
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
 						}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 		// choice theme file
100 100
 		$theme_file = _XE_PATH_.'files/theme/theme_info.php';
101
-		if(is_readable($theme_file))
101
+		if (is_readable($theme_file))
102 102
 		{
103 103
 			include($theme_file);
104 104
 			Context::set('current_layout', $theme_info->layout);
@@ -113,10 +113,10 @@  discard block
 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.
modules/message/message.admin.controller.php 2 patches
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.