Work around regression in r28524: spewed PHP warnings due to mystery parameter added...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Dec 2007 07:03:28 +0000 (07:03 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 28 Dec 2007 07:03:28 +0000 (07:03 +0000)
Made it optional so updateSpecialPages.php doesn't barf when going through the list.

includes/SpecialNewpages.php

index e847ddd..63e218a 100644 (file)
@@ -23,14 +23,14 @@ class NewPagesPage extends QueryPage {
        protected $nondefaults = array();
        protected $specialPage;
 
-       public function __construct( $specialPage ) {
+       public function __construct( $specialPage=null ) {
                $this->specialPage = $specialPage;
        }
 
        public function execute( $par ) {
                global $wgRequest, $wgLang;
 
-               $shownavigation = !$this->specialPage->including();
+               $shownavigation = is_object( $this->specialPage ) && !$this->specialPage->including();
 
                $defaults = array(
                        /* bool */ 'hideliu' => false,