GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — develop (#1957)
by
unknown
39:18 queued 26:49
created
modules/comment/comment.admin.view.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		// get a list by using comment->getCommentList. 
53 53
 		$oCommentModel = getModel('comment');
54 54
 		$secretNameList = $oCommentModel->getSecretNameList();
55
-		$columnList = array('comment_srl', 'document_srl','module_srl','is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
55
+		$columnList = array('comment_srl', 'document_srl', 'module_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
56 56
 		$output = $oCommentModel->getTotalCommentList($args, $columnList);
57 57
 
58 58
 		// $modules = $oCommentModel->getDistinctModules();
@@ -70,20 +70,20 @@  discard block
 block discarded – undo
70 70
 		$oModuleModel = getModel('module');
71 71
 		$module_list = array();
72 72
 		$mod_srls = array();
73
-		foreach($output->data as $val)
73
+		foreach ($output->data as $val)
74 74
 		{
75 75
 			$mod_srls[] = $val->module_srl;
76 76
 		}
77 77
 		$mod_srls = array_unique($mod_srls);
78 78
 		// Module List
79 79
 		$mod_srls_count = count($mod_srls);
80
-		if($mod_srls_count)
80
+		if ($mod_srls_count)
81 81
 		{
82 82
 			$columnList = array('module_srl', 'mid', 'browser_title');
83 83
 			$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
84
-			if($module_output && is_array($module_output))
84
+			if ($module_output && is_array($module_output))
85 85
 			{
86
-				foreach($module_output as $module)
86
+				foreach ($module_output as $module)
87 87
 				{
88 88
 					$module_list[$module->module_srl] = $module;
89 89
 				}
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		Context::set('module_list', $module_list);
93 93
 
94 94
 		// set the template 
95
-		$this->setTemplatePath($this->module_path . 'tpl');
95
+		$this->setTemplatePath($this->module_path.'tpl');
96 96
 		$this->setTemplateFile('comment_list');
97 97
 	}
98 98
 
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
 		$declared_output = executeQuery('comment.getDeclaredList', $args);
115 115
 		$oCommentModel = getModel('comment');
116 116
 
117
-		if($declared_output->data && count($declared_output->data))
117
+		if ($declared_output->data && count($declared_output->data))
118 118
 		{
119 119
 			$comment_list = array();
120 120
 
121
-			foreach($declared_output->data as $key => $comment)
121
+			foreach ($declared_output->data as $key => $comment)
122 122
 			{
123 123
 				$comment_list[$key] = new commentItem();
124 124
 				$comment_list[$key]->setAttribute($comment);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 		Context::set('page_navigation', $declared_output->page_navigation);
137 137
 		Context::set('secret_name_list', $secretNameList);
138 138
 		// set the template
139
-		$this->setTemplatePath($this->module_path . 'tpl');
139
+		$this->setTemplatePath($this->module_path.'tpl');
140 140
 		$this->setTemplateFile('declared_list');
141 141
 	}
142 142
 
Please login to merge, or discard this patch.
modules/spamfilter/spamfilter.admin.view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 		// Get configurations (using module model object)
32 32
 		$config = $oModuleModel->getModuleConfig('message');
33
-		Context::set('config',$config);
33
+		Context::set('config', $config);
34 34
 
35 35
 		// Set a template file
36 36
 		$this->setTemplatePath($this->module_path.'tpl');
Please login to merge, or discard this patch.
classes/security/htmlpurifier/library/HTMLPurifier.path.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
  * This is a stub include that automatically configures the include path.
5 5
  */
6 6
 
7
-set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path() );
7
+set_include_path(dirname(__FILE__).PATH_SEPARATOR.get_include_path());
8 8
 require_once 'HTMLPurifier/Bootstrap.php';
9 9
 require_once 'HTMLPurifier.autoload.php';
10 10
 
Please login to merge, or discard this patch.
modules/comment/comment.class.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /* Copyright (C) NAVER <http://www.navercorp.com> */
3 3
 
4
-require_once(_XE_PATH_ . 'modules/comment/comment.item.php');
4
+require_once(_XE_PATH_.'modules/comment/comment.item.php');
5 5
 
6 6
 /**
7 7
  * comment
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		// 2008. 02. 22 add comment setting when a new module added
37 37
 		$oModuleController->insertTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before');
38 38
 
39
-		if(!is_dir('./files/cache/tmp'))
39
+		if (!is_dir('./files/cache/tmp'))
40 40
 		{
41 41
 			FileHandler::makeDir('./files/cache/tmp');
42 42
 		}
@@ -53,55 +53,55 @@  discard block
 block discarded – undo
53 53
 		$oDB = DB::getInstance();
54 54
 		$oModuleModel = getModel('module');
55 55
 		// 2007. 10. 17 add a trigger to delete comments together with posting deleted
56
-		if(!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
56
+		if (!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
57 57
 		{
58 58
 			return TRUE;
59 59
 		}
60 60
 		// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
61
-		if(!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
61
+		if (!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
62 62
 		{
63 63
 			return TRUE;
64 64
 		}
65 65
 		// 2007. 10. 23 add a column for recommendation votes or notification of the comments
66
-		if(!$oDB->isColumnExists("comments", "voted_count"))
66
+		if (!$oDB->isColumnExists("comments", "voted_count"))
67 67
 		{
68 68
 			return TRUE;
69 69
 		}
70
-		if(!$oDB->isColumnExists("comments", "notify_message"))
70
+		if (!$oDB->isColumnExists("comments", "notify_message"))
71 71
 		{
72 72
 			return TRUE;
73 73
 		}
74 74
 		// 2008. 02. 22 add comment setting when a new module added
75
-		if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
75
+		if (!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
76 76
 		{
77 77
 			return TRUE;
78 78
 		}
79 79
 		// 2008. 05. 14 add a column for blamed count
80
-		if(!$oDB->isColumnExists("comments", "blamed_count"))
80
+		if (!$oDB->isColumnExists("comments", "blamed_count"))
81 81
 		{
82 82
 			return TRUE;
83 83
 		}
84
-		if(!$oDB->isColumnExists("comment_voted_log", "point"))
84
+		if (!$oDB->isColumnExists("comment_voted_log", "point"))
85 85
 		{
86 86
 			return TRUE;
87 87
 		}
88 88
 
89
-		if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
89
+		if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
90 90
 		{
91 91
 			return TRUE;
92 92
 		}
93 93
 		//2012. 02. 24 add comment published status column and index
94
-		if(!$oDB->isColumnExists("comments", "status"))
94
+		if (!$oDB->isColumnExists("comments", "status"))
95 95
 		{
96 96
 			return TRUE;
97 97
 		}
98
-		if(!$oDB->isIndexExists("comments", "idx_status"))
98
+		if (!$oDB->isIndexExists("comments", "idx_status"))
99 99
 		{
100 100
 			return TRUE;
101 101
 		}
102 102
 
103 103
 		// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied 
104
-		if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
104
+		if (!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
105 105
 		{
106 106
 			return TRUE;
107 107
 		}
@@ -119,43 +119,43 @@  discard block
 block discarded – undo
119 119
 		$oModuleModel = getModel('module');
120 120
 		$oModuleController = getController('module');
121 121
 		// 2007. 10. 17 add a trigger to delete comments together with posting deleted
122
-		if(!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
122
+		if (!$oModuleModel->getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
123 123
 		{
124 124
 			$oModuleController->insertTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after');
125 125
 		}
126 126
 		// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
127
-		if(!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
127
+		if (!$oModuleModel->getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
128 128
 		{
129 129
 			$oModuleController->insertTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after');
130 130
 		}
131 131
 		// 2007. 10. 23 add a column for recommendation votes or notification of the comments
132
-		if(!$oDB->isColumnExists("comments", "voted_count"))
132
+		if (!$oDB->isColumnExists("comments", "voted_count"))
133 133
 		{
134 134
 			$oDB->addColumn("comments", "voted_count", "number", "11");
135 135
 			$oDB->addIndex("comments", "idx_voted_count", array("voted_count"));
136 136
 		}
137 137
 
138
-		if(!$oDB->isColumnExists("comments", "notify_message"))
138
+		if (!$oDB->isColumnExists("comments", "notify_message"))
139 139
 		{
140 140
 			$oDB->addColumn("comments", "notify_message", "char", "1");
141 141
 		}
142 142
 		// 2008. 02. 22 add comment setting when a new module added
143
-		if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
143
+		if (!$oModuleModel->getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
144 144
 		{
145 145
 			$oModuleController->insertTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before');
146 146
 		}
147 147
 		// 2008. 05. 14 add a column for blamed count
148
-		if(!$oDB->isColumnExists("comments", "blamed_count"))
148
+		if (!$oDB->isColumnExists("comments", "blamed_count"))
149 149
 		{
150 150
 			$oDB->addColumn('comments', 'blamed_count', 'number', 11, 0, TRUE);
151 151
 			$oDB->addIndex('comments', 'idx_blamed_count', array('blamed_count'));
152 152
 		}
153
-		if(!$oDB->isColumnExists("comment_voted_log", "point"))
153
+		if (!$oDB->isColumnExists("comment_voted_log", "point"))
154 154
 		{
155 155
 			$oDB->addColumn('comment_voted_log', 'point', 'number', 11, 0, TRUE);
156 156
 		}
157 157
 
158
-		if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
158
+		if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
159 159
 		{
160 160
 			$oDB->addIndex(
161 161
 					"comments", "idx_module_list_order", array("module_srl", "list_order"), TRUE
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 		}
164 164
 
165 165
 		//2012. 02. 24 add comment published status column and index
166
-		if(!$oDB->isColumnExists("comments", "status"))
166
+		if (!$oDB->isColumnExists("comments", "status"))
167 167
 		{
168 168
 			$oDB->addColumn("comments", "status", "number", 1, 1, TRUE);
169 169
 		}
170
-		if(!$oDB->isIndexExists("comments", "idx_status"))
170
+		if (!$oDB->isIndexExists("comments", "idx_status"))
171 171
 		{
172 172
 			$oDB->addIndex(
173 173
 					"comments", "idx_status", array("status", "comment_srl", "module_srl", "document_srl"), TRUE
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		}
176 176
 
177 177
 		// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied 
178
-		if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
178
+		if (!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
179 179
 		{
180 180
 			$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after');
181 181
 		}
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 	 */
190 190
 	function recompileCache()
191 191
 	{
192
-		if(!is_dir('./files/cache/tmp'))
192
+		if (!is_dir('./files/cache/tmp'))
193 193
 		{
194 194
 			FileHandler::makeDir('./files/cache/tmp');
195 195
 		}
Please login to merge, or discard this patch.
modules/comment/comment.item.php 2 patches
Braces   +17 added lines, -9 removed lines patch added patch discarded remove patch
@@ -333,8 +333,7 @@  discard block
 block discarded – undo
333 333
 					'<!--BeforeComment(%d,%d)--><div class="comment_%d_%d xe_content">%s</div><!--AfterComment(%d,%d)-->', $this->comment_srl, $memberSrl, $this->comment_srl, $memberSrl, $content, $this->comment_srl, $memberSrl
334 334
 			);
335 335
 			// xe_content class name should be specified although content access is not necessary.
336
-		}
337
-		else
336
+		} else
338 337
 		{
339 338
 			if($add_xe_content_class)
340 339
 			{
@@ -569,7 +568,9 @@  discard block
 block discarded – undo
569 568
 				}
570 569
 			}
571 570
 
572
-			if(!preg_match("!<img!is", $content)) return;
571
+			if(!preg_match("!<img!is", $content)) {
572
+				return;
573
+			}
573 574
 		}
574 575
 
575 576
 		// get thumbail generation info on the doc module configuration.
@@ -589,8 +590,7 @@  discard block
 block discarded – undo
589 590
 			if(filesize($thumbnail_file) < 1)
590 591
 			{
591 592
 				return FALSE;
592
-			}
593
-			else
593
+			} else
594 594
 			{
595 595
 				return $thumbnail_url;
596 596
 			}
@@ -608,7 +608,9 @@  discard block
 block discarded – undo
608 608
 			$first_image = null;
609 609
 			foreach($file_list as $file)
610 610
 			{
611
-				if($file->direct_download !== 'Y') continue;
611
+				if($file->direct_download !== 'Y') {
612
+					continue;
613
+				}
612 614
 
613 615
 				if($file->cover_image === 'Y' && file_exists($file->uploaded_filename))
614 616
 				{
@@ -616,7 +618,9 @@  discard block
 block discarded – undo
616 618
 					break;
617 619
 				}
618 620
 
619
-				if($first_image) continue;
621
+				if($first_image) {
622
+					continue;
623
+				}
620 624
 
621 625
 				if(preg_match("/\.(jpe?g|png|gif|bmp)$/i", $file->source_filename))
622 626
 				{
@@ -644,7 +648,9 @@  discard block
 block discarded – undo
644 648
 			foreach($matches as $target_image)
645 649
 			{
646 650
 				$target_src = trim($target_image[1]);
647
-				if(preg_match('/\/(common|modules|widgets|addons|layouts|m\.layouts)\//i', $target_src)) continue;
651
+				if(preg_match('/\/(common|modules|widgets|addons|layouts|m\.layouts)\//i', $target_src)) {
652
+					continue;
653
+				}
648 654
 
649 655
 				if(!preg_match('/^(http|https):\/\//i',$target_src))
650 656
 				{
@@ -655,7 +661,9 @@  discard block
 block discarded – undo
655 661
 
656 662
 				$tmp_file = _XE_PATH_ . 'files/cache/tmp/' . $random->createSecureSalt(32, 'hex');
657 663
 				FileHandler::getRemoteFile($target_src, $tmp_file);
658
-				if(!file_exists($tmp_file)) continue;
664
+				if(!file_exists($tmp_file)) {
665
+					continue;
666
+				}
659 667
 
660 668
 				$imageinfo = getimagesize($tmp_file);
661 669
 				list($_w, $_h) = $imageinfo;
Please login to merge, or discard this patch.
Spacing   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	function _loadFromDB()
51 51
 	{
52
-		if(!$this->comment_srl)
52
+		if (!$this->comment_srl)
53 53
 		{
54 54
 			return;
55 55
 		}
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	 */
68 68
 	function setAttribute($attribute)
69 69
 	{
70
-		if(!$attribute->comment_srl)
70
+		if (!$attribute->comment_srl)
71 71
 		{
72 72
 			$this->comment_srl = NULL;
73 73
 			return;
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
 		$this->adds($attribute);
78 78
 
79 79
 		// define vars on the object for backward compatibility of skins
80
-		if(count($attribute))
80
+		if (count($attribute))
81 81
 		{
82
-			foreach($attribute as $key => $val)
82
+			foreach ($attribute as $key => $val)
83 83
 			{
84 84
 				$this->{$key} = $val;
85 85
 			}
@@ -93,29 +93,29 @@  discard block
 block discarded – undo
93 93
 
94 94
 	function isGranted()
95 95
 	{
96
-		if($_SESSION['own_comment'][$this->comment_srl])
96
+		if ($_SESSION['own_comment'][$this->comment_srl])
97 97
 		{
98 98
 			return TRUE;
99 99
 		}
100 100
 
101
-		if(!Context::get('is_logged'))
101
+		if (!Context::get('is_logged'))
102 102
 		{
103 103
 			return FALSE;
104 104
 		}
105 105
 
106 106
 		$logged_info = Context::get('logged_info');
107
-		if($logged_info->is_admin == 'Y')
107
+		if ($logged_info->is_admin == 'Y')
108 108
 		{
109 109
 			return TRUE;
110 110
 		}
111 111
 
112 112
 		$grant = Context::get('grant');
113
-		if($grant->manager)
113
+		if ($grant->manager)
114 114
 		{
115 115
 			return TRUE;
116 116
 		}
117 117
 
118
-		if($this->get('member_srl') && ($this->get('member_srl') == $logged_info->member_srl || $this->get('member_srl') * -1 == $logged_info->member_srl))
118
+		if ($this->get('member_srl') && ($this->get('member_srl') == $logged_info->member_srl || $this->get('member_srl') * -1 == $logged_info->member_srl))
119 119
 		{
120 120
 			return TRUE;
121 121
 		}
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
 	function isEditable()
138 138
 	{
139
-		if($this->isGranted() || !$this->get('member_srl'))
139
+		if ($this->isGranted() || !$this->get('member_srl'))
140 140
 		{
141 141
 			return TRUE;
142 142
 		}
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
 
151 151
 	function isAccessible()
152 152
 	{
153
-		if($_SESSION['accessibled_comment'][$this->comment_srl])
153
+		if ($_SESSION['accessibled_comment'][$this->comment_srl])
154 154
 		{
155 155
 			return TRUE;
156 156
 		}
157 157
 
158
-		if($this->isGranted() || !$this->isSecret())
158
+		if ($this->isGranted() || !$this->isSecret())
159 159
 		{
160 160
 			$this->setAccessible();
161 161
 			return TRUE;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
 		$oDocumentModel = getModel('document');
165 165
 		$oDocument = $oDocumentModel->getDocument($this->get('document_srl'));
166
-		if($oDocument->isGranted())
166
+		if ($oDocument->isGranted())
167 167
 		{
168 168
 			$this->setAccessible();
169 169
 			return TRUE;
@@ -184,20 +184,20 @@  discard block
 block discarded – undo
184 184
 	function notify($type, $content)
185 185
 	{
186 186
 		// return if not useNotify
187
-		if(!$this->useNotify())
187
+		if (!$this->useNotify())
188 188
 		{
189 189
 			return;
190 190
 		}
191 191
 
192 192
 		// pass if the author is not logged-in user 
193
-		if(!$this->get('member_srl'))
193
+		if (!$this->get('member_srl'))
194 194
 		{
195 195
 			return;
196 196
 		}
197 197
 
198 198
 		// return if the currently logged-in user is an author of the comment.
199 199
 		$logged_info = Context::get('logged_info');
200
-		if($logged_info->member_srl == $this->get('member_srl'))
200
+		if ($logged_info->member_srl == $this->get('member_srl'))
201 201
 		{
202 202
 			return;
203 203
 		}
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 		$oDocument = $oDocumentModel->getDocument($this->get('document_srl'));
208 208
 
209 209
 		// Variables
210
-		if($type)
210
+		if ($type)
211 211
 		{
212
-			$title = "[" . $type . "] ";
212
+			$title = "[".$type."] ";
213 213
 		}
214 214
 
215 215
 		$title .= cut_str(strip_tags($content), 30, '...');
@@ -224,17 +224,17 @@  discard block
 block discarded – undo
224 224
 
225 225
 	function getIpAddress()
226 226
 	{
227
-		if($this->isGranted())
227
+		if ($this->isGranted())
228 228
 		{
229 229
 			return $this->get('ipaddress');
230 230
 		}
231 231
 
232
-		return '*' . strstr($this->get('ipaddress'), '.');
232
+		return '*'.strstr($this->get('ipaddress'), '.');
233 233
 	}
234 234
 
235 235
 	function isExistsHomepage()
236 236
 	{
237
-		if(trim($this->get('homepage')))
237
+		if (trim($this->get('homepage')))
238 238
 		{
239 239
 			return TRUE;
240 240
 		}
@@ -245,14 +245,14 @@  discard block
 block discarded – undo
245 245
 	function getHomepageUrl()
246 246
 	{
247 247
 		$url = trim($this->get('homepage'));
248
-		if(!$url)
248
+		if (!$url)
249 249
 		{
250 250
 			return;
251 251
 		}
252 252
 
253
-		if(strncasecmp('http://', $url, 7) !== 0)
253
+		if (strncasecmp('http://', $url, 7) !== 0)
254 254
 		{
255
-			$url = "http://" . $url;
255
+			$url = "http://".$url;
256 256
 		}
257 257
 
258 258
 		return htmlspecialchars($url, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
@@ -284,14 +284,14 @@  discard block
 block discarded – undo
284 284
 	 */
285 285
 	function getContentText($strlen = 0)
286 286
 	{
287
-		if($this->isSecret() && !$this->isAccessible())
287
+		if ($this->isSecret() && !$this->isAccessible())
288 288
 		{
289 289
 			return Context::getLang('msg_is_secret');
290 290
 		}
291 291
 
292 292
 		$content = $this->get('content');
293 293
 
294
-		if($strlen)
294
+		if ($strlen)
295 295
 		{
296 296
 			return cut_str(strip_tags($content), $strlen, '...');
297 297
 		}
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	 */
306 306
 	function getContent($add_popup_menu = TRUE, $add_content_info = TRUE, $add_xe_content_class = TRUE)
307 307
 	{
308
-		if($this->isSecret() && !$this->isAccessible())
308
+		if ($this->isSecret() && !$this->isAccessible())
309 309
 		{
310 310
 			return Context::getLang('msg_is_secret');
311 311
 		}
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 		stripEmbedTagForAdmin($content, $this->get('member_srl'));
315 315
 
316 316
 		// when displaying the comment on the pop-up menu
317
-		if($add_popup_menu && Context::get('is_logged'))
317
+		if ($add_popup_menu && Context::get('is_logged'))
318 318
 		{
319 319
 			$content = sprintf(
320 320
 					'%s<div class="comment_popup_menu"><a href="#popup_menu_area" class="comment_%d" onclick="return false">%s</a></div>', $content, $this->comment_srl, Context::getLang('cmd_comment_do')
@@ -322,10 +322,10 @@  discard block
 block discarded – undo
322 322
 		}
323 323
 
324 324
 		// if additional information which can access contents is set
325
-		if($add_content_info)
325
+		if ($add_content_info)
326 326
 		{
327 327
 			$memberSrl = $this->get('member_srl');
328
-			if($memberSrl < 0)
328
+			if ($memberSrl < 0)
329 329
 			{
330 330
 				$memberSrl = 0;
331 331
 			}
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 		}
337 337
 		else
338 338
 		{
339
-			if($add_xe_content_class)
339
+			if ($add_xe_content_class)
340 340
 			{
341 341
 				$content = sprintf('<div class="xe_content">%s</div>', $content);
342 342
 			}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
 	function getRegdateGM()
398 398
 	{
399
-		return $this->getRegdate('D, d M Y H:i:s') . ' ' . $GLOBALS['_time_zone'];
399
+		return $this->getRegdate('D, d M Y H:i:s').' '.$GLOBALS['_time_zone'];
400 400
 	}
401 401
 
402 402
 	function getUpdate($format = 'Y.m.d H:i:s')
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 
407 407
 	function getPermanentUrl()
408 408
 	{
409
-		return getFullUrl('', 'document_srl', $this->get('document_srl')) . '#comment_' . $this->get('comment_srl');
409
+		return getFullUrl('', 'document_srl', $this->get('document_srl')).'#comment_'.$this->get('comment_srl');
410 410
 	}
411 411
 
412 412
 	function getUpdateTime()
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 
428 428
 	function hasUploadedFiles()
429 429
 	{
430
-		if(($this->isSecret() && !$this->isAccessible()) && !$this->isGranted())
430
+		if (($this->isSecret() && !$this->isAccessible()) && !$this->isGranted())
431 431
 		{
432 432
 			return FALSE;
433 433
 		}
@@ -436,12 +436,12 @@  discard block
 block discarded – undo
436 436
 
437 437
 	function getUploadedFiles()
438 438
 	{
439
-		if(($this->isSecret() && !$this->isAccessible()) && !$this->isGranted())
439
+		if (($this->isSecret() && !$this->isAccessible()) && !$this->isGranted())
440 440
 		{
441 441
 			return;
442 442
 		}
443 443
 
444
-		if(!$this->get('uploaded_count'))
444
+		if (!$this->get('uploaded_count'))
445 445
 		{
446 446
 			return;
447 447
 		}
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 	function getEditor()
459 459
 	{
460 460
 		$module_srl = $this->get('module_srl');
461
-		if(!$module_srl)
461
+		if (!$module_srl)
462 462
 		{
463 463
 			$module_srl = Context::get('module_srl');
464 464
 		}
@@ -472,13 +472,13 @@  discard block
 block discarded – undo
472 472
 	 */
473 473
 	function getProfileImage()
474 474
 	{
475
-		if(!$this->isExists() || !$this->get('member_srl'))
475
+		if (!$this->isExists() || !$this->get('member_srl'))
476 476
 		{
477 477
 			return;
478 478
 		}
479 479
 		$oMemberModel = getModel('member');
480 480
 		$profile_info = $oMemberModel->getProfileImage($this->get('member_srl'));
481
-		if(!$profile_info)
481
+		if (!$profile_info)
482 482
 		{
483 483
 			return;
484 484
 		}
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 	function getSignature()
494 494
 	{
495 495
 		// pass if the posting not exists.
496
-		if(!$this->isExists() || !$this->get('member_srl'))
496
+		if (!$this->isExists() || !$this->get('member_srl'))
497 497
 		{
498 498
 			return;
499 499
 		}
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 		$signature = $oMemberModel->getSignature($this->get('member_srl'));
504 504
 
505 505
 		// check if max height of the signiture is specified on the member module
506
-		if(!isset($GLOBALS['__member_signature_max_height']))
506
+		if (!isset($GLOBALS['__member_signature_max_height']))
507 507
 		{
508 508
 			$oModuleModel = getModel('module');
509 509
 			$member_config = $oModuleModel->getModuleConfig('member');
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 
513 513
 		$max_signature_height = $GLOBALS['__member_signature_max_height'];
514 514
 
515
-		if($max_signature_height)
515
+		if ($max_signature_height)
516 516
 		{
517 517
 			$signature = sprintf('<div style="max-height:%dpx;overflow:auto;overflow-x:hidden;height:expression(this.scrollHeight > %d ? \'%dpx\': \'auto\')">%s</div>', $max_signature_height, $max_signature_height, $max_signature_height, $signature);
518 518
 		}
@@ -522,12 +522,12 @@  discard block
 block discarded – undo
522 522
 
523 523
 	function thumbnailExists($width = 80, $height = 0, $type = '')
524 524
 	{
525
-		if(!$this->comment_srl)
525
+		if (!$this->comment_srl)
526 526
 		{
527 527
 			return FALSE;
528 528
 		}
529 529
 
530
-		if(!$this->getThumbnail($width, $height, $type))
530
+		if (!$this->getThumbnail($width, $height, $type))
531 531
 		{
532 532
 			return FALSE;
533 533
 		}
@@ -538,42 +538,42 @@  discard block
 block discarded – undo
538 538
 	function getThumbnail($width = 80, $height = 0, $thumbnail_type = '')
539 539
 	{
540 540
 		// return false if no doc exists
541
-		if(!$this->comment_srl)
541
+		if (!$this->comment_srl)
542 542
 		{
543 543
 			return;
544 544
 		}
545 545
 
546
-		if($this->isSecret() && !$this->isGranted())
546
+		if ($this->isSecret() && !$this->isGranted())
547 547
 		{
548 548
 			return;
549 549
 		}
550 550
 
551 551
 		// If signiture height setting is omitted, create a square
552
-		if(!$height)
552
+		if (!$height)
553 553
 		{
554 554
 			$height = $width;
555 555
 		}
556 556
 
557 557
 		$content = $this->get('content');
558
-		if(!$this->hasUploadedFiles())
558
+		if (!$this->hasUploadedFiles())
559 559
 		{
560
-			if(!$content)
560
+			if (!$content)
561 561
 			{
562 562
 				$args = new stdClass();
563 563
 				$args->comment_srl = $this->comment_srl;
564 564
 				$output = executeQuery('document.getComment', $args, array('content'));
565
-				if($output->toBool() && $output->data)
565
+				if ($output->toBool() && $output->data)
566 566
 				{
567 567
 					$content = $output->data->content;
568 568
 					$this->add('content', $content);
569 569
 				}
570 570
 			}
571 571
 
572
-			if(!preg_match("!<img!is", $content)) return;
572
+			if (!preg_match("!<img!is", $content)) return;
573 573
 		}
574 574
 
575 575
 		// get thumbail generation info on the doc module configuration.
576
-		if(!in_array($thumbnail_type, array('crop', 'ratio')))
576
+		if (!in_array($thumbnail_type, array('crop', 'ratio')))
577 577
 		{
578 578
 			$thumbnail_type = 'crop';
579 579
 		}
@@ -582,12 +582,12 @@  discard block
 block discarded – undo
582 582
 		$thumbnail_path = sprintf('files/thumbnails/%s', getNumberingPath($this->comment_srl, 3));
583 583
 		$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, $width, $height, $thumbnail_type);
584 584
 		$thumbnail_lockfile = sprintf('%s%dx%d.%s.lock', $thumbnail_path, $width, $height, $thumbnail_type);
585
-		$thumbnail_url = Context::getRequestUri() . $thumbnail_file;
585
+		$thumbnail_url = Context::getRequestUri().$thumbnail_file;
586 586
 
587 587
 		// return false if a size of existing thumbnail file is 0. otherwise return the file path
588
-		if(file_exists($thumbnail_file) || file_exists($thumbnail_lockfile))
588
+		if (file_exists($thumbnail_file) || file_exists($thumbnail_lockfile))
589 589
 		{
590
-			if(filesize($thumbnail_file) < 1)
590
+			if (filesize($thumbnail_file) < 1)
591 591
 			{
592 592
 				return FALSE;
593 593
 			}
@@ -605,33 +605,33 @@  discard block
 block discarded – undo
605 605
 		$is_tmp_file = FALSE;
606 606
 
607 607
 		// find an image file among attached files
608
-		if($this->hasUploadedFiles())
608
+		if ($this->hasUploadedFiles())
609 609
 		{
610 610
 			$file_list = $this->getUploadedFiles();
611 611
 
612 612
 			$first_image = null;
613
-			foreach($file_list as $file)
613
+			foreach ($file_list as $file)
614 614
 			{
615
-				if($file->direct_download !== 'Y') continue;
615
+				if ($file->direct_download !== 'Y') continue;
616 616
 
617
-				if($file->cover_image === 'Y' && file_exists($file->uploaded_filename))
617
+				if ($file->cover_image === 'Y' && file_exists($file->uploaded_filename))
618 618
 				{
619 619
 					$source_file = $file->uploaded_filename;
620 620
 					break;
621 621
 				}
622 622
 
623
-				if($first_image) continue;
623
+				if ($first_image) continue;
624 624
 
625
-				if(preg_match("/\.(jpe?g|png|gif|bmp)$/i", $file->source_filename))
625
+				if (preg_match("/\.(jpe?g|png|gif|bmp)$/i", $file->source_filename))
626 626
 				{
627
-					if(file_exists($file->uploaded_filename))
627
+					if (file_exists($file->uploaded_filename))
628 628
 					{
629 629
 						$first_image = $file->uploaded_filename;
630 630
 					}
631 631
 				}
632 632
 			}
633 633
 
634
-			if(!$source_file && $first_image)
634
+			if (!$source_file && $first_image)
635 635
 			{
636 636
 				$source_file = $first_image;
637 637
 			}
@@ -639,31 +639,31 @@  discard block
 block discarded – undo
639 639
 
640 640
 		// get an image file from the doc content if no file attached. 
641 641
 		$is_tmp_file = false;
642
-		if(!$source_file)
642
+		if (!$source_file)
643 643
 		{
644 644
 			$random = new Password();
645 645
 
646 646
 			preg_match_all("!<img[^>]*src=(?:\"|\')([^\"\']*?)(?:\"|\')!is", $content, $matches, PREG_SET_ORDER);
647 647
 
648
-			foreach($matches as $target_image)
648
+			foreach ($matches as $target_image)
649 649
 			{
650 650
 				$target_src = trim($target_image[1]);
651
-				if(preg_match('/\/(common|modules|widgets|addons|layouts|m\.layouts)\//i', $target_src)) continue;
651
+				if (preg_match('/\/(common|modules|widgets|addons|layouts|m\.layouts)\//i', $target_src)) continue;
652 652
 
653
-				if(!preg_match('/^(http|https):\/\//i',$target_src))
653
+				if (!preg_match('/^(http|https):\/\//i', $target_src))
654 654
 				{
655 655
 					$target_src = Context::getRequestUri().$target_src;
656 656
 				}
657 657
 
658 658
 				$target_src = htmlspecialchars_decode($target_src);
659 659
 
660
-				$tmp_file = _XE_PATH_ . 'files/cache/tmp/' . $random->createSecureSalt(32, 'hex');
660
+				$tmp_file = _XE_PATH_.'files/cache/tmp/'.$random->createSecureSalt(32, 'hex');
661 661
 				FileHandler::getRemoteFile($target_src, $tmp_file);
662
-				if(!file_exists($tmp_file)) continue;
662
+				if (!file_exists($tmp_file)) continue;
663 663
 
664 664
 				$imageinfo = getimagesize($tmp_file);
665 665
 				list($_w, $_h) = $imageinfo;
666
-				if($imageinfo === false || ($_w < ($width * 0.3) && $_h < ($height * 0.3))) {
666
+				if ($imageinfo === false || ($_w < ($width * 0.3) && $_h < ($height * 0.3))) {
667 667
 					FileHandler::removeFile($tmp_file);
668 668
 					continue;
669 669
 				}
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 		$output = FileHandler::createImageFile($source_file, $thumbnail_file, $width, $height, 'jpg', $thumbnail_type);
678 678
 
679 679
 		// Remove source file if it was temporary
680
-		if($is_tmp_file)
680
+		if ($is_tmp_file)
681 681
 		{
682 682
 			FileHandler::removeFile($source_file);
683 683
 		}
@@ -686,14 +686,14 @@  discard block
 block discarded – undo
686 686
 		FileHandler::removeFile($thumbnail_lockfile);
687 687
 
688 688
 		// Return the thumbnail path if it was successfully generated
689
-		if($output)
689
+		if ($output)
690 690
 		{
691 691
 			return $thumbnail_url;
692 692
 		}
693 693
 		// Create an empty file if thumbnail generation failed
694 694
 		else
695 695
 		{
696
-			FileHandler::writeFile($thumbnail_file, '','w');
696
+			FileHandler::writeFile($thumbnail_file, '', 'w');
697 697
 		}
698 698
 
699 699
 		return;
Please login to merge, or discard this patch.
libs/PEAR.1.9.5/HTTP/Request2/Observer/Download.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@
 block discarded – undo
19 19
 	{
20 20
 		$event = $subject->getLastEvent();
21 21
 
22
-		switch($event['name'])
22
+		switch ($event['name'])
23 23
 		{
24 24
 			case 'receivedHeaders':
25 25
 				$this->fp = @fopen($this->filename, 'wb');
26
-				if(!$this->fp)
26
+				if (!$this->fp)
27 27
 				{
28 28
 					throw new Exception("Cannot open target file '{$filename}'");
29 29
 				}
Please login to merge, or discard this patch.
modules/board/board.mobile.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -10,32 +10,32 @@  discard block
 block discarded – undo
10 10
 		$oSecurity = new Security();
11 11
 		$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
12 12
 
13
-		if($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
14
-		if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
15
-		if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
16
-		if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count;
17
-		if($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
18
-		if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
13
+		if ($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
14
+		if ($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
15
+		if ($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
16
+		if ($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count;
17
+		if ($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
18
+		if ($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
19 19
 		$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
20 20
 
21 21
 		// $this->_getStatusNameListecret option backward compatibility
22 22
 		$oDocumentModel = getModel('document');
23 23
 
24 24
 		$statusList = $this->_getStatusNameList($oDocumentModel);
25
-		if(isset($statusList['SECRET']))
25
+		if (isset($statusList['SECRET']))
26 26
 		{
27 27
 			$this->module_info->secret = 'Y';
28 28
 		}
29 29
 
30 30
 		// use_category <=1.5.x, hide_category >=1.7.x
31 31
 		$count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
32
-		if($count_category)
32
+		if ($count_category)
33 33
 		{
34
-			if($this->module_info->hide_category)
34
+			if ($this->module_info->hide_category)
35 35
 			{
36 36
 				$this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y';
37 37
 			}
38
-			else if($this->module_info->use_category)
38
+			else if ($this->module_info->use_category)
39 39
 			{
40 40
 				$this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y';
41 41
 			}
@@ -55,10 +55,10 @@  discard block
 block discarded – undo
55 55
 		 * check the consultation function, if the user is admin then swich off consultation function
56 56
 		 * if the user is not logged, then disppear write document/write comment./ view document
57 57
 		 **/
58
-		if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)
58
+		if ($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)
59 59
 		{
60 60
 			$this->consultation = true;
61
-			if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
61
+			if (!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
62 62
 		} else {
63 63
 			$this->consultation = false;
64 64
 		}
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
 		$extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
68 68
 		Context::set('extra_keys', $extra_keys);
69 69
 
70
-		$template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin);
71
-		if(!is_dir($template_path)||!$this->module_info->mskin)
70
+		$template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
71
+		if (!is_dir($template_path) || !$this->module_info->mskin)
72 72
 		{
73 73
 			$this->module_info->mskin = 'default';
74
-			$template_path = sprintf("%sm.skins/%s/",$this->module_path, $this->module_info->mskin);
74
+			$template_path = sprintf("%sm.skins/%s/", $this->module_path, $this->module_info->mskin);
75 75
 		}
76 76
 		$this->setTemplatePath($template_path);
77 77
 		Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml');
@@ -87,13 +87,13 @@  discard block
 block discarded – undo
87 87
 	function getBoardCommentPage()
88 88
 	{
89 89
 		$document_srl = Context::get('document_srl');
90
-		$oDocumentModel =& getModel('document');
91
-		if(!$document_srl)
90
+		$oDocumentModel = & getModel('document');
91
+		if (!$document_srl)
92 92
 		{
93 93
 			return new Object(-1, "msg_invalid_request");
94 94
 		}
95 95
 		$oDocument = $oDocumentModel->getDocument($document_srl);
96
-		if(!$oDocument->isExists())
96
+		if (!$oDocument->isExists())
97 97
 		{
98 98
 			return new Object(-1, "msg_invalid_request");
99 99
 		}
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	function dispBoardMessage($msg_code)
107 107
 	{
108 108
 		$msg = Context::getLang($msg_code);
109
-		$oMessageObject = &ModuleHandler::getModuleInstance('message','mobile');
109
+		$oMessageObject = &ModuleHandler::getModuleInstance('message', 'mobile');
110 110
 		$oMessageObject->setError(-1);
111 111
 		$oMessageObject->setMessage($msg);
112 112
 		$oMessageObject->dispMessage();
Please login to merge, or discard this patch.
Braces   +24 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,12 +10,24 @@  discard block
 block discarded – undo
10 10
 		$oSecurity = new Security();
11 11
 		$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
12 12
 
13
-		if($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
14
-		if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
15
-		if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
16
-		if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count;
17
-		if($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
18
-		if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
13
+		if($this->module_info->list_count) {
14
+			$this->list_count = $this->module_info->list_count;
15
+		}
16
+		if($this->module_info->mobile_list_count) {
17
+			$this->list_count = $this->module_info->mobile_list_count;
18
+		}
19
+		if($this->module_info->search_list_count) {
20
+			$this->search_list_count = $this->module_info->search_list_count;
21
+		}
22
+		if($this->module_info->mobile_search_list_count) {
23
+			$this->search_list_count = $this->module_info->mobile_search_list_count;
24
+		}
25
+		if($this->module_info->page_count) {
26
+			$this->page_count = $this->module_info->page_count;
27
+		}
28
+		if($this->module_info->mobile_page_count) {
29
+			$this->page_count = $this->module_info->mobile_page_count;
30
+		}
19 31
 		$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
20 32
 
21 33
 		// $this->_getStatusNameListecret option backward compatibility
@@ -34,18 +46,15 @@  discard block
 block discarded – undo
34 46
 			if($this->module_info->hide_category)
35 47
 			{
36 48
 				$this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y';
37
-			}
38
-			else if($this->module_info->use_category)
49
+			} else if($this->module_info->use_category)
39 50
 			{
40 51
 				$this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y';
41
-			}
42
-			else
52
+			} else
43 53
 			{
44 54
 				$this->module_info->hide_category = 'N';
45 55
 				$this->module_info->use_category = 'Y';
46 56
 			}
47
-		}
48
-		else
57
+		} else
49 58
 		{
50 59
 			$this->module_info->hide_category = 'Y';
51 60
 			$this->module_info->use_category = 'N';
@@ -58,7 +67,9 @@  discard block
 block discarded – undo
58 67
 		if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)
59 68
 		{
60 69
 			$this->consultation = true;
61
-			if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
70
+			if(!Context::get('is_logged')) {
71
+				$this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
72
+			}
62 73
 		} else {
63 74
 			$this->consultation = false;
64 75
 		}
Please login to merge, or discard this patch.