Passed
Push — master ( 76796c...626ce4 )
by Stanislav
03:45
created
event/main_listener.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,8 +105,7 @@
 block discarded – undo
105 105
 		if ($event['folder_id'] == PRIVMSGS_OUTBOX)
106 106
 		{
107 107
 			$this->fulltext_search->index_remove($event['msg_ids']);
108
-		}
109
-		else
108
+		} else
110 109
 		{
111 110
 			$sql = 'SELECT COUNT(msg_id) as count, msg_id
112 111
 				FROM ' . PRIVMSGS_TO_TABLE . '
Please login to merge, or discard this patch.
acp/acp_pmsearch_module.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
 				if ($pm_index == '1')
39 39
 				{
40 40
 					$config->set('pmsearch_pm_index', 0);
41
-				}
42
-				else if ($pm_index == '2')
41
+				} else if ($pm_index == '2')
43 42
 				{
44 43
 					$config->set('pmsearch_pm_index', 1);
45 44
 				}
@@ -50,8 +49,7 @@  discard block
 block discarded – undo
50 49
 				if ($pm_search == '1')
51 50
 				{
52 51
 					$config->set('pmsearch_search', 0);
53
-				}
54
-				else if ($pm_index == '2')
52
+				} else if ($pm_index == '2')
55 53
 				{
56 54
 					$config->set('pmsearch_search', 1);
57 55
 				}
@@ -177,8 +175,7 @@  discard block
 block discarded – undo
177 175
 										$this->save_state();
178 176
 										meta_refresh(1, append_sid($this->u_action . '&action_index=create&skip_rows=' . $post_counter));
179 177
 										trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
180
-									}
181
-									else
178
+									} else
182 179
 									{
183 180
 										$this->state = array('');
184 181
 										add_log('admin', 'LOG_PMSEARCH_INDEX_CREATED', $name);
@@ -214,8 +211,7 @@  discard block
 block discarded – undo
214 211
 						if ($n && sizeof($statistics[$n - 1]) < 3)
215 212
 						{
216 213
 							$statistics[$n - 1] += array('statistic_2' => $statistic, 'value_2' => $value);
217
-						}
218
-						else
214
+						} else
219 215
 						{
220 216
 							$statistics[] = array('statistic_1' => $statistic, 'value_1' => $value);
221 217
 						}
Please login to merge, or discard this patch.
search/pm_search_fulltext_native.php 1 patch
Braces   +13 added lines, -26 removed lines patch added patch discarded remove patch
@@ -112,8 +112,7 @@  discard block
 block discarded – undo
112 112
 						}
113 113
 					break;
114 114
 				}
115
-			}
116
-			else
115
+			} else
117 116
 			{
118 117
 				switch ($keywords[$i])
119 118
 				{
@@ -290,13 +289,11 @@  discard block
 block discarded – undo
290 289
 					{
291 290
 						$id_words[] = '\'' . $this->db->sql_escape(str_replace('*', '%', $word_part)) . '\'';
292 291
 						$non_common_words[] = $word_part;
293
-					}
294
-					else if (isset($words[$word_part]))
292
+					} else if (isset($words[$word_part]))
295 293
 					{
296 294
 						$id_words[] = $words[$word_part];
297 295
 						$non_common_words[] = $word_part;
298
-					}
299
-					else
296
+					} else
300 297
 					{
301 298
 						$len = utf8_strlen($word_part);
302 299
 						if ($len < $this->word_length['min'] || $len > $this->word_length['max'])
@@ -311,8 +308,7 @@  discard block
 block discarded – undo
311 308
 					if (sizeof($id_words) > 1)
312 309
 					{
313 310
 						$this->{$mode . '_ids'}[] = $id_words;
314
-					}
315
-					else
311
+					} else
316 312
 					{
317 313
 						$mode = ($mode == 'must_exclude_one') ? 'must_not_contain' : $mode;
318 314
 						$this->{$mode . '_ids'}[] = $id_words[0];
@@ -334,18 +330,15 @@  discard block
 block discarded – undo
334 330
 					if ($len >= $this->word_length['min'] && $len <= $this->word_length['max'])
335 331
 					{
336 332
 						$this->{$mode . '_ids'}[] = '\'' . $this->db->sql_escape(str_replace('*', '%', $word)) . '\'';
337
-					}
338
-					else
333
+					} else
339 334
 					{
340 335
 						$this->common_words[] = $word;
341 336
 					}
342
-				}
343
-				else
337
+				} else
344 338
 				{
345 339
 					$this->{$mode . '_ids'}[] = $words[$word];
346 340
 				}
347
-			}
348
-			else
341
+			} else
349 342
 			{
350 343
 				if (!isset($common_ids[$word]))
351 344
 				{
@@ -496,8 +489,7 @@  discard block
 block discarded – undo
496 489
 						$word_ids[] = "w$w_num.word_id";
497 490
 
498 491
 						$w_num++;
499
-					}
500
-					else
492
+					} else
501 493
 					{
502 494
 						$word_ids[] = $id;
503 495
 					}
@@ -507,8 +499,7 @@  discard block
 block discarded – undo
507 499
 
508 500
 				unset($word_id_sql);
509 501
 				unset($word_ids);
510
-			}
511
-			else if (is_string($subquery))
502
+			} else if (is_string($subquery))
512 503
 			{
513 504
 				$sql_array['FROM'][$swl_table][] = 'w' . $w_num;
514 505
 
@@ -517,8 +508,7 @@  discard block
 block discarded – undo
517 508
 
518 509
 				$group_by = true;
519 510
 				$w_num++;
520
-			}
521
-			else
511
+			} else
522 512
 			{
523 513
 				$sql_where[] = "m$m_num.word_id = $subquery";
524 514
 			}
@@ -771,8 +761,7 @@  discard block
 block discarded – undo
771 761
 			$words['add']['title'] = array_diff($split_title, array_keys($cur_words['title']));
772 762
 			$words['del']['post'] = array_diff(array_keys($cur_words['post']), $split_text);
773 763
 			$words['del']['title'] = array_diff(array_keys($cur_words['title']), $split_title);
774
-		}
775
-		else
764
+		} else
776 765
 		{
777 766
 			$words['add']['post'] = $split_text;
778 767
 			$words['add']['title'] = $split_title;
@@ -818,8 +807,7 @@  discard block
 block discarded – undo
818 807
 				$this->db->sql_return_on_error(false);
819 808
 			}
820 809
 			unset($new_words, $sql_ary);
821
-		}
822
-		else
810
+		} else
823 811
 		{
824 812
 			$this->db->sql_transaction('begin');
825 813
 		}
@@ -902,8 +890,7 @@  discard block
 block discarded – undo
902 890
 				if ($row['title_match'])
903 891
 				{
904 892
 					$title_word_ids[] = $row['word_id'];
905
-				}
906
-				else
893
+				} else
907 894
 				{
908 895
 					$message_word_ids[] = $row['word_id'];
909 896
 				}
Please login to merge, or discard this patch.
ucp/ucp_pmsearch_module.php 1 patch
Braces   +3 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
 						//$search_count = $this->search->keyword_search('norma', 'all', 'all', array('msg_id' => 'a'), 'msg_id', 'd', 0, array($user_id), '', $id_ary, $startFrom, 25);
66 66
 						$search_count = $this->search->keyword_search('norma', 'all', 'all', array('msg_id' => 'a'), 'msg_id', 'd', 0, array(), '', '', $user_id, '', $id_ary, $startFrom, $this->config['search_block_size']);
67 67
 
68
-					}
69
-					else
68
+					} else
70 69
 					{
71 70
 						// So do we have user_id or username?
72 71
 						if (!is_numeric($keywords))
@@ -152,8 +151,7 @@  discard block
 block discarded – undo
152 151
 							$template->assign_vars(array(
153 152
 								'S_KEYWORDS'	=> $authors_array[$keywords]['username']
154 153
 							));
155
-						}
156
-						else
154
+						} else
157 155
 						{
158 156
 							$template->assign_vars(array(
159 157
 								'S_KEYWORDS'	=>	$keywords
@@ -164,9 +162,7 @@  discard block
 block discarded – undo
164 162
 							'TOTAL_MESSAGES'	=> $search_count,
165 163
 							'HAS_RESULTS'	=> 1,
166 164
 						));
167
-					}
168
-
169
-					else
165
+					} else
170 166
 					{
171 167
 						trigger_error('NO_RESULTS_FOUND');
172 168
 					}
Please login to merge, or discard this patch.