r50708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50707‎ | r50708 | r50709 >
Date:20:39, 17 May 2009
Author:siebrand
Status:ok
Tags:
Comment:
* replace hard coded namespace numbers by the php define
* remove leading spaces, and replace leading space blocks by tabs

Inspired by a patch by jidanni in bug 18273.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWantedpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWantedpages.php
@@ -27,19 +27,19 @@
2828 $pagelinks = $dbr->tableName( 'pagelinks' );
2929 $page = $dbr->tableName( 'page' );
3030 $sql = "SELECT 'Wantedpages' AS type,
31 - pl_namespace AS namespace,
32 - pl_title AS title,
33 - COUNT(*) AS value
34 - FROM $pagelinks
35 - LEFT JOIN $page AS pg1
36 - ON pl_namespace = pg1.page_namespace AND pl_title = pg1.page_title
37 - LEFT JOIN $page AS pg2
38 - ON pl_from = pg2.page_id
39 - WHERE pg1.page_namespace IS NULL
40 - AND pl_namespace NOT IN ( 2, 3 )
41 - AND pg2.page_namespace != 8
42 - GROUP BY pl_namespace, pl_title
43 - HAVING COUNT(*) > $count";
 31+ pl_namespace AS namespace,
 32+ pl_title AS title,
 33+ COUNT(*) AS value
 34+ FROM $pagelinks
 35+ LEFT JOIN $page AS pg1
 36+ ON pl_namespace = pg1.page_namespace AND pl_title = pg1.page_title
 37+ LEFT JOIN $page AS pg2
 38+ ON pl_from = pg2.page_id
 39+ WHERE pg1.page_namespace IS NULL
 40+ AND pl_namespace NOT IN ( " . NS_USER . ", ". NS_USER_TALK . ")
 41+ AND pg2.page_namespace != " . NS_MEDIAWIKI . "
 42+ GROUP BY pl_namespace, pl_title
 43+ HAVING COUNT(*) > $count";
4444
4545 wfRunHooks( 'WantedPages::getSQL', array( &$this, &$sql ) );
4646 return $sql;

Status & tagging log