Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not list...
authorRob Church <robchurch@users.mediawiki.org>
Sat, 18 Feb 2006 04:39:20 +0000 (04:39 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sat, 18 Feb 2006 04:39:20 +0000 (04:39 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/SpecialWantedpages.php

index 6f1f454..410b16a 100644 (file)
@@ -342,8 +342,10 @@ Special Pages:
 * (bug 4359) red [[user:#id]] links generated in [[special:Log]]
 * (bug 1996) Special page to list redirects
 * (bug 4334) Add "watch" links to Special:Unwatchedpages
-* Generate target user page links in Special:Ipblocklist where appropriate (i.e. not an autoblock)
-* Generate link to talk page of the blocker in Special:Ipblocklist, move contribs. link of the target next to their name
+* Generate target user page links in Special:Ipblocklist where appropriate
+  (i.e. not an autoblock)
+* Generate link to talk page of the blocker in Special:Ipblocklist, move
+  contribs. link of the target next to their name
 * (bug 2714) Backlink from special:whatlinkshere was hard set as 'existing'
 * Move parentheses out of <a> link in Special:Contributions
 * (bug 3192): properly check 'limit' parameter on Special:Contributions
@@ -352,6 +354,8 @@ Special Pages:
 * Add contributions link to block log items
 * Added optional "hide own edits" feature to Special:Recentchanges
 * (bug 5018) Anchors for each message in Special:Allmessages
+* Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not
+  list pages with less than this number of links. Defaults to 1.
 
 Misc.:
 * PHP 4.1 compatibility fix: don't use new_link parameter to mysql_connect
index 7ebf727..f44971c 100644 (file)
@@ -1056,6 +1056,8 @@ $wgDisableQueryPages = false;
 $wgUseWatchlistCache = false;
 /** The hour or so mentioned above */
 $wgWLCacheTimeout = 3600;
+/** Number of links to a page required before it is deemed "wanted" */
+$wgWantedPagesThreshold = 1;
 
 /**
  * To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of
index 742113e..f4a8f30 100644 (file)
@@ -33,6 +33,8 @@ class WantedPagesPage extends QueryPage {
        function isSyndicated() { return false; }
 
        function getSQL() {
+               global $wgWantedPagesThreshold;
+               $count = $wgWantedPagesThreshold - 1;
                $dbr =& wfGetDB( DB_SLAVE );
                $pagelinks = $dbr->tableName( 'pagelinks' );
                $page      = $dbr->tableName( 'page' );
@@ -46,7 +48,7 @@ class WantedPagesPage extends QueryPage {
                         ON pl_namespace=page_namespace AND pl_title=page_title
                         WHERE page_namespace IS NULL
                         GROUP BY pl_namespace,pl_title
-                        HAVING COUNT(*) > 1";
+                        HAVING COUNT(*) > $count";
        }
 
        /**