r93881 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93880‎ | r93881 | r93882 >
Date:12:40, 4 August 2011
Author:macbre
Status:ok
Tags:
Comment:
Modified paths:
  • /trunk/extensions/LinkSuggest/LinkSuggest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LinkSuggest/LinkSuggest.php
@@ -158,10 +158,10 @@
159159 }
160160 }
161161
162 - // comma separated list of namespaces to search in
 162+ // list of namespaces to search in
163163 if ( empty( $namespace ) ) {
164164 // search only within content namespaces - default behaviour
165 - $namespaces = implode( ',', $wgContentNamespaces );
 165+ $namespaces = $wgContentNamespaces;
166166 } else {
167167 // search only within a namespace from query
168168 $namespaces = $namespace;
@@ -181,7 +181,7 @@
182182 'page_is_redirect = 0',
183183 'qc_type' => 'Mostlinked',
184184 "LOWER(qc_title) LIKE '{$query}%'",
185 - "qc_namespace IN ({$namespaces})"
 185+ 'qc_namespace' => $namespaces
186186 ),
187187 __METHOD__,
188188 array( 'ORDER BY' => 'qc_value DESC', 'LIMIT' => 10 )
@@ -197,7 +197,7 @@
198198 array(
199199 "LOWER(page_title) LIKE '{$query}%'",
200200 'page_is_redirect' => 0,
201 - "page_namespace IN ({$namespaces})"
 201+ 'page_namespace' => $namespaces
202202 ),
203203 __METHOD__,
204204 array(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93876LinkSuggest: search in content namespaces by default (not only within NS_MAIN)macbre09:59, 4 August 2011

Status & tagging log