From: Rob Church Date: Sat, 18 Feb 2006 04:39:20 +0000 (+0000) Subject: Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not list... X-Git-Tag: 1.6.0~318 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=f2baf718782cc8281f06d63a9ba905874eea95b4;p=lhc%2Fweb%2Fwiklou.git Introduce $wgWantedPagesThreshold per bug 5011; Special:Wantedpages will not list pages with less than this number of links. Defaults to 1. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6f1f4544e1..410b16ad7a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 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 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 7ebf727a73..f44971c526 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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 diff --git a/includes/SpecialWantedpages.php b/includes/SpecialWantedpages.php index 742113e432..f4a8f30f8d 100644 --- a/includes/SpecialWantedpages.php +++ b/includes/SpecialWantedpages.php @@ -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"; } /**