* (bug 22918) Feed cache keys now use $wgRenderHashAppend
* (bug 21916) Last-Modified header is now correct when outputting cached feed
* (bug 20049) Fixed PHP notice in search highlighter that occurs in some cases
+* (bug 23017) Special:Disambiguations now list pages in content namespaces
+ rather than only main namespace
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent
}
function getSQL() {
+ global $wgContentNamespaces;
+
$dbr = wfGetDB( DB_SLAVE );
$dMsgText = wfMsgForContent('disambiguationspage');
list( $page, $pagelinks, $templatelinks) = $dbr->tableNamesN( 'page', 'pagelinks', 'templatelinks' );
+ if ( $wgContentNamespaces ) {
+ $nsclause = 'IN (' . $dbr->makeList( $wgContentNamespaces ) . ')';
+ } else {
+ $nsclause = '= ' . NS_MAIN;
+ }
+
$sql = "SELECT 'Disambiguations' AS \"type\", pb.page_namespace AS namespace,"
." pb.page_title AS title, la.pl_from AS value"
." FROM {$templatelinks} AS lb, {$page} AS pb, {$pagelinks} AS la, {$page} AS pa"
." WHERE $set" # disambiguation template(s)
.' AND pa.page_id = la.pl_from'
- .' AND pa.page_namespace = ' . NS_MAIN # Limit to just articles in the main namespace
+ .' AND pa.page_namespace ' . $nsclause
.' AND pb.page_id = lb.tl_from'
.' AND pb.page_namespace = la.pl_namespace'
.' AND pb.page_title = la.pl_title'