@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | $this->search_helper = $phpbb_container->get('anavaro.pmsearch.search.helper'); |
| 31 | 31 | |
| 32 | - switch($mode) |
|
| 32 | + switch ($mode) |
|
| 33 | 33 | { |
| 34 | 34 | default: |
| 35 | 35 | //Let's see indexing |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $config->set('pmsearch_search', 1); |
| 57 | 57 | } |
| 58 | - $this->tpl_name = 'acp_pmsearch'; |
|
| 59 | - $this->page_title = 'PMSEARCH_ADMIN'; |
|
| 58 | + $this->tpl_name = 'acp_pmsearch'; |
|
| 59 | + $this->page_title = 'PMSEARCH_ADMIN'; |
|
| 60 | 60 | |
| 61 | 61 | $template->assign_var('PM_INDEX', $config['pmsearch_pm_index']); |
| 62 | 62 | $template->assign_var('PM_SEARCH', $config['pmsearch_search']); |
| 63 | - $template->assign_var('U_ACTION', append_sid("index.php?i=".$id."&mode=".$mode)); |
|
| 63 | + $template->assign_var('U_ACTION', append_sid("index.php?i=" . $id . "&mode=" . $mode)); |
|
| 64 | 64 | |
| 65 | - if($config['pmsearch_pm_index']) |
|
| 65 | + if ($config['pmsearch_pm_index']) |
|
| 66 | 66 | { |
| 67 | 67 | $action_index = $request->variable('action_index', ''); |
| 68 | 68 | $this->state = explode(',', $config['search_pm_indexing_state']); |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | // Handle +, - without preceeding whitespace character |
| 222 | - $match = array('#(\S)\+#', '#(\S)-#'); |
|
| 223 | - $replace = array('$1 +', '$1 +'); |
|
| 222 | + $match = array('#(\S)\+#', '#(\S)-#'); |
|
| 223 | + $replace = array('$1 +', '$1 +'); |
|
| 224 | 224 | |
| 225 | 225 | $keywords = preg_replace($match, $replace, $keywords); |
| 226 | 226 | |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | |
| 914 | 914 | if (sizeof($title_word_ids)) |
| 915 | 915 | { |
| 916 | - $sql = 'UPDATE ' . PRIVMSGS_TABLE . '_swl' . ' |
|
| 916 | + $sql = 'UPDATE ' . PRIVMSGS_TABLE . '_swl' . ' |
|
| 917 | 917 | SET word_count = word_count - 1 |
| 918 | 918 | WHERE ' . $this->db->sql_in_set('word_id', $title_word_ids) . ' |
| 919 | 919 | AND word_count > 0'; |
@@ -1070,8 +1070,8 @@ discard block |
||
| 1070 | 1070 | |
| 1071 | 1071 | protected function get_stats() |
| 1072 | 1072 | { |
| 1073 | - $this->stats['total_words'] = $this->db->get_estimated_row_count(PRIVMSGS_TABLE . '_swl'); |
|
| 1074 | - $this->stats['total_matches'] = $this->db->get_estimated_row_count(PRIVMSGS_TABLE . '_swm'); |
|
| 1073 | + $this->stats['total_words'] = $this->db->get_estimated_row_count(PRIVMSGS_TABLE . '_swl'); |
|
| 1074 | + $this->stats['total_matches'] = $this->db->get_estimated_row_count(PRIVMSGS_TABLE . '_swm'); |
|
| 1075 | 1075 | } |
| 1076 | 1076 | |
| 1077 | 1077 | /** |
@@ -1103,7 +1103,7 @@ discard block |
||
| 1103 | 1103 | $messages_to_table => 'mt', |
| 1104 | 1104 | ), |
| 1105 | 1105 | |
| 1106 | - 'WHERE' => 'msg.msg_id = mt.msg_id AND (((msg.author_id = ' . $this->user->data['user_id'] . ' AND msg.to_address LIKE \'u_' . $target_id .'\') OR (msg.author_id = ' . $target_id . ' AND msg.to_address LIKE \'u_' . $this->user->data['user_id'] .'\')) AND mt.user_id = ' . $this->user->data['user_id'] . ')', |
|
| 1106 | + 'WHERE' => 'msg.msg_id = mt.msg_id AND (((msg.author_id = ' . $this->user->data['user_id'] . ' AND msg.to_address LIKE \'u_' . $target_id . '\') OR (msg.author_id = ' . $target_id . ' AND msg.to_address LIKE \'u_' . $this->user->data['user_id'] . '\')) AND mt.user_id = ' . $this->user->data['user_id'] . ')', |
|
| 1107 | 1107 | |
| 1108 | 1108 | ); |
| 1109 | 1109 | |
@@ -35,9 +35,9 @@ discard block |
||
| 35 | 35 | switch ($mode) |
| 36 | 36 | { |
| 37 | 37 | case 'search': |
| 38 | - $this->tpl_name = 'ucp_pmsearch'; |
|
| 38 | + $this->tpl_name = 'ucp_pmsearch'; |
|
| 39 | 39 | $template->assign_vars(array( |
| 40 | - 'S_UCP_ACTION' => append_sid("ucp.php?i=".$id."&mode=".$mode) |
|
| 40 | + 'S_UCP_ACTION' => append_sid("ucp.php?i=" . $id . "&mode=" . $mode) |
|
| 41 | 41 | )); |
| 42 | 42 | |
| 43 | 43 | $terms = $request->variable('terms', 'any'); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $search_count = $this->search->user_search($keywords, $id_ary, $startFrom, $this->config['search_block_size']); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if ($search_count > 0 ) |
|
| 84 | + if ($search_count > 0) |
|
| 85 | 85 | { |
| 86 | 86 | // Let's get additional info |
| 87 | 87 | $page_array = array(); |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $db->sql_freeresult($result); |
| 121 | 121 | // ... one for the authors on this page |
| 122 | 122 | $authors_array = array(); |
| 123 | - $sql = 'SELECT user_id, username, user_colour FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $author_uid_arrray); |
|
| 123 | + $sql = 'SELECT user_id, username, user_colour FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $author_uid_arrray); |
|
| 124 | 124 | $result = $db->sql_query($sql); |
| 125 | 125 | while ($row = $db->sql_fetchrow($result)) |
| 126 | 126 | { |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | 'SENT_TIME' => $user->format_date($VAR['msg_time']), |
| 141 | 141 | 'MESSAGE_AUTHOR_FULL' => ($authors_array[$VAR['msg_author']]['user_colour'] ? '<a href="./memberlist.php?mode=viewprofile&u=' . $VAR['msg_author'] . '" class="username-coloured" style="color: #' . $authors_array[$VAR['msg_author']]['user_colour'] . ';">' . $authors_array[$VAR['msg_author']]['username'] . '</a>' : '<a href="./memberlist.php?mode=viewprofile&u=' . $VAR['msg_author'] . '" class="username">' . $authors_array[$VAR['msg_author']]['username'] . '</a>'), |
| 142 | 142 | )); |
| 143 | - $count ++; |
|
| 143 | + $count++; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | $pagination = $phpbb_container->get('pagination'); |