r70681 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70680‎ | r70681 | r70682 >
Date:09:55, 8 August 2010
Author:ialex
Status:ok
Tags:
Comment:
* fixed doxygen warnings
* @addtogroup -> @ingroup
* removed incorrect copyright notice
* added a file description sentence
Modified paths:
  • /trunk/phase3/includes/search/SearchMssql.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/search/SearchMssql.php
@@ -1,25 +1,28 @@
22 <?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+ */
2023
2124 /**
2225 * Search engine hook base class for Mssql (ConText).
23 - * @addtogroup Search
 26+ * @ingroup Search
2427 */
2528 class SearchMssql extends SearchEngine {
2629
@@ -30,7 +33,7 @@
3134 /**
3235 * Perform a full text search query and return a result set.
3336 *
34 - * @param string $term - Raw search term
 37+ * @param $term String: raw search term
3538 * @return MssqlSearchResultSet
3639 * @access public
3740 */
@@ -42,7 +45,7 @@
4346 /**
4447 * Perform a title-only search query and return a result set.
4548 *
46 - * @param string $term - Raw search term
 49+ * @param $term String: raw search term
4750 * @return MssqlSearchResultSet
4851 * @access public
4952 */
@@ -54,7 +57,8 @@
5558
5659 /**
5760 * Return a partial WHERE clause to exclude redirects, if so set
58 - * @return string
 61+ *
 62+ * @return String
5963 * @private
6064 */
6165 function queryRedirect() {
@@ -67,7 +71,8 @@
6872
6973 /**
7074 * Return a partial WHERE clause to limit the search to the given namespaces
71 - * @return string
 75+ *
 76+ * @return String
7277 * @private
7378 */
7479 function queryNamespaces() {
@@ -80,7 +85,8 @@
8186
8287 /**
8388 * Return a LIMIT clause to limit results on the query.
84 - * @return string
 89+ *
 90+ * @return String
8591 * @private
8692 */
8793 function queryLimit( $sql ) {
@@ -90,7 +96,8 @@
9197 /**
9298 * Does not do anything for generic search engine
9399 * subclasses may define this though
94 - * @return string
 100+ *
 101+ * @return String
95102 * @private
96103 */
97104 function queryRanking( $filteredTerm, $fulltext ) {
@@ -100,8 +107,9 @@
101108 /**
102109 * Construct the full SQL query to do the search.
103110 * The guts shoulds be constructed in queryMain()
104 - * @param string $filteredTerm
105 - * @param bool $fulltext
 111+ *
 112+ * @param $filteredTerm String
 113+ * @param $fulltext Boolean
106114 * @private
107115 */
108116 function getQuery( $filteredTerm, $fulltext ) {
@@ -114,7 +122,8 @@
115123
116124 /**
117125 * Picks which field to index on, depending on what type of query.
118 - * @param bool $fulltext
 126+ *
 127+ * @param $fulltext Boolean
119128 * @return string
120129 */
121130 function getIndexField( $fulltext ) {
@@ -124,9 +133,9 @@
125134 /**
126135 * Get the base part of the search query.
127136 *
128 - * @param string $filteredTerm
129 - * @param bool $fulltext
130 - * @return string
 137+ * @param $filteredTerm String
 138+ * @param $fulltext Boolean
 139+ * @return String
131140 * @private
132141 */
133142 function queryMain( $filteredTerm, $fulltext ) {
@@ -174,9 +183,9 @@
175184 * Create or update the search index record for the given page.
176185 * Title and text should be pre-processed.
177186 *
178 - * @param int $id
179 - * @param string $title
180 - * @param string $text
 187+ * @param $id Integer
 188+ * @param $title String
 189+ * @param $text String
181190 */
182191 function update( $id, $title, $text ) {
183192 // We store the column data as UTF-8 byte order marked binary stream
@@ -197,8 +206,8 @@
198207 * Update a search index record's title only.
199208 * Title should be pre-processed.
200209 *
201 - * @param int $id
202 - * @param string $title
 210+ * @param $id Integer
 211+ * @param $title String
203212 */
204213 function updateTitle( $id, $title ) {
205214 $table = $this->db->tableName( 'searchindex' );
@@ -213,7 +222,7 @@
214223 }
215224
216225 /**
217 - * @addtogroup Search
 226+ * @ingroup Search
218227 */
219228 class MssqlSearchResultSet extends SearchResultSet {
220229 function __construct( $resultSet, $terms ) {

Status & tagging log