Index: trunk/phase3/includes/search/SearchMssql.php |
— | — | @@ -1,25 +1,28 @@ |
2 | 2 | <?php |
3 | | -# Copyright (C) 2004 Brion Vibber <brion@pobox.com> |
4 | | -# http://www.mediawiki.org/ |
5 | | -# |
6 | | -# This program is free software; you can redistribute it and/or modify |
7 | | -# it under the terms of the GNU General Public License as published by |
8 | | -# the Free Software Foundation; either version 2 of the License, or |
9 | | -# (at your option) any later version. |
10 | | -# |
11 | | -# This program is distributed in the hope that it will be useful, |
12 | | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | | -# GNU General Public License for more details. |
15 | | -# |
16 | | -# You should have received a copy of the GNU General Public License along |
17 | | -# with this program; if not, write to the Free Software Foundation, Inc., |
18 | | -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
19 | | -# http://www.gnu.org/copyleft/gpl.html |
| 3 | +/** |
| 4 | + * Mssql search engine |
| 5 | + * |
| 6 | + * This program is free software; you can redistribute it and/or modify |
| 7 | + * it under the terms of the GNU General Public License as published by |
| 8 | + * the Free Software Foundation; either version 2 of the License, or |
| 9 | + * (at your option) any later version. |
| 10 | + * |
| 11 | + * This program is distributed in the hope that it will be useful, |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + * GNU General Public License for more details. |
| 15 | + * |
| 16 | + * You should have received a copy of the GNU General Public License along |
| 17 | + * with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 19 | + * http://www.gnu.org/copyleft/gpl.html |
| 20 | + * |
| 21 | + * @file |
| 22 | + */ |
20 | 23 | |
21 | 24 | /** |
22 | 25 | * Search engine hook base class for Mssql (ConText). |
23 | | - * @addtogroup Search |
| 26 | + * @ingroup Search |
24 | 27 | */ |
25 | 28 | class SearchMssql extends SearchEngine { |
26 | 29 | |
— | — | @@ -30,7 +33,7 @@ |
31 | 34 | /** |
32 | 35 | * Perform a full text search query and return a result set. |
33 | 36 | * |
34 | | - * @param string $term - Raw search term |
| 37 | + * @param $term String: raw search term |
35 | 38 | * @return MssqlSearchResultSet |
36 | 39 | * @access public |
37 | 40 | */ |
— | — | @@ -42,7 +45,7 @@ |
43 | 46 | /** |
44 | 47 | * Perform a title-only search query and return a result set. |
45 | 48 | * |
46 | | - * @param string $term - Raw search term |
| 49 | + * @param $term String: raw search term |
47 | 50 | * @return MssqlSearchResultSet |
48 | 51 | * @access public |
49 | 52 | */ |
— | — | @@ -54,7 +57,8 @@ |
55 | 58 | |
56 | 59 | /** |
57 | 60 | * Return a partial WHERE clause to exclude redirects, if so set |
58 | | - * @return string |
| 61 | + * |
| 62 | + * @return String |
59 | 63 | * @private |
60 | 64 | */ |
61 | 65 | function queryRedirect() { |
— | — | @@ -67,7 +71,8 @@ |
68 | 72 | |
69 | 73 | /** |
70 | 74 | * Return a partial WHERE clause to limit the search to the given namespaces |
71 | | - * @return string |
| 75 | + * |
| 76 | + * @return String |
72 | 77 | * @private |
73 | 78 | */ |
74 | 79 | function queryNamespaces() { |
— | — | @@ -80,7 +85,8 @@ |
81 | 86 | |
82 | 87 | /** |
83 | 88 | * Return a LIMIT clause to limit results on the query. |
84 | | - * @return string |
| 89 | + * |
| 90 | + * @return String |
85 | 91 | * @private |
86 | 92 | */ |
87 | 93 | function queryLimit( $sql ) { |
— | — | @@ -90,7 +96,8 @@ |
91 | 97 | /** |
92 | 98 | * Does not do anything for generic search engine |
93 | 99 | * subclasses may define this though |
94 | | - * @return string |
| 100 | + * |
| 101 | + * @return String |
95 | 102 | * @private |
96 | 103 | */ |
97 | 104 | function queryRanking( $filteredTerm, $fulltext ) { |
— | — | @@ -100,8 +107,9 @@ |
101 | 108 | /** |
102 | 109 | * Construct the full SQL query to do the search. |
103 | 110 | * The guts shoulds be constructed in queryMain() |
104 | | - * @param string $filteredTerm |
105 | | - * @param bool $fulltext |
| 111 | + * |
| 112 | + * @param $filteredTerm String |
| 113 | + * @param $fulltext Boolean |
106 | 114 | * @private |
107 | 115 | */ |
108 | 116 | function getQuery( $filteredTerm, $fulltext ) { |
— | — | @@ -114,7 +122,8 @@ |
115 | 123 | |
116 | 124 | /** |
117 | 125 | * Picks which field to index on, depending on what type of query. |
118 | | - * @param bool $fulltext |
| 126 | + * |
| 127 | + * @param $fulltext Boolean |
119 | 128 | * @return string |
120 | 129 | */ |
121 | 130 | function getIndexField( $fulltext ) { |
— | — | @@ -124,9 +133,9 @@ |
125 | 134 | /** |
126 | 135 | * Get the base part of the search query. |
127 | 136 | * |
128 | | - * @param string $filteredTerm |
129 | | - * @param bool $fulltext |
130 | | - * @return string |
| 137 | + * @param $filteredTerm String |
| 138 | + * @param $fulltext Boolean |
| 139 | + * @return String |
131 | 140 | * @private |
132 | 141 | */ |
133 | 142 | function queryMain( $filteredTerm, $fulltext ) { |
— | — | @@ -174,9 +183,9 @@ |
175 | 184 | * Create or update the search index record for the given page. |
176 | 185 | * Title and text should be pre-processed. |
177 | 186 | * |
178 | | - * @param int $id |
179 | | - * @param string $title |
180 | | - * @param string $text |
| 187 | + * @param $id Integer |
| 188 | + * @param $title String |
| 189 | + * @param $text String |
181 | 190 | */ |
182 | 191 | function update( $id, $title, $text ) { |
183 | 192 | // We store the column data as UTF-8 byte order marked binary stream |
— | — | @@ -197,8 +206,8 @@ |
198 | 207 | * Update a search index record's title only. |
199 | 208 | * Title should be pre-processed. |
200 | 209 | * |
201 | | - * @param int $id |
202 | | - * @param string $title |
| 210 | + * @param $id Integer |
| 211 | + * @param $title String |
203 | 212 | */ |
204 | 213 | function updateTitle( $id, $title ) { |
205 | 214 | $table = $this->db->tableName( 'searchindex' ); |
— | — | @@ -213,7 +222,7 @@ |
214 | 223 | } |
215 | 224 | |
216 | 225 | /** |
217 | | - * @addtogroup Search |
| 226 | + * @ingroup Search |
218 | 227 | */ |
219 | 228 | class MssqlSearchResultSet extends SearchResultSet { |
220 | 229 | function __construct( $resultSet, $terms ) { |