From: Chad Horohoe Date: Thu, 5 Mar 2009 13:38:17 +0000 (+0000) Subject: (bug 17799) Special:Random no longer throws a database error when a non-namespace... X-Git-Tag: 1.31.0-rc.0~42602 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=2b81656916109468aebf6ad608567b0fc0918c59;p=lhc%2Fweb%2Fwiklou.git (bug 17799) Special:Random no longer throws a database error when a non-namespace is given, now silently falls back to NS_MAIN --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 87af9fe717..35d484dfc9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -239,6 +239,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17761) "show/hide" link in page history in now works for the first displayed revision if it's not the current one * (bug 17722) Fix regression where users are unable to change temporary passwords +* (bug 17799) Special:Random no longer throws a database error when a non- + namespace is given, silently falls back to NS_MAIN == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index f4bff30bfd..31199b2399 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -23,7 +23,7 @@ class RandomPage extends SpecialPage { } public function setNamespace ( $ns ) { - if( $ns < NS_MAIN ) $ns = NS_MAIN; + if( !$ns || $ns < NS_MAIN ) $ns = NS_MAIN; $this->namespaces = array( $ns ); }