X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRandompage.php;h=73a88b9edc454e4492b94172adb3c5b902504068;hb=52f3af6c1165c67379f83e2bd89af4439648ac18;hp=24b363def5f50d3565b82200f7605ad064b727c8;hpb=9392d01c4e95be3c156ad594d8a8b6aa678daa7d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRandompage.php b/includes/specials/SpecialRandompage.php index 24b363def5..73a88b9edc 100644 --- a/includes/specials/SpecialRandompage.php +++ b/includes/specials/SpecialRandompage.php @@ -56,7 +56,9 @@ class RandomPage extends SpecialPage { public function execute( $par ) { global $wgContLang; - if ( $par ) { + if ( is_string( $par ) ) { + // Testing for stringiness since we want to catch + // the empty string to mean main namespace only. $this->setNamespace( $wgContLang->getNsIndex( $par ) ); } @@ -104,7 +106,7 @@ class RandomPage extends SpecialPage { $randstr = wfRandom(); $title = null; - if ( !wfRunHooks( + if ( !Hooks::run( 'SpecialRandomGetRandomTitle', array( &$randstr, &$this->isRedir, &$this->namespaces, &$this->extra, &$title ) ) ) {