* Add typehint to debug Call to a member function getTitle() on a non-object in ...
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 4 Jan 2012 06:52:59 +0000 (06:52 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Wed, 4 Jan 2012 06:52:59 +0000 (06:52 +0000)
* Remove @todo from constructor, because it's a constructor
* Some typos and code style

includes/EditPage.php

index c895048..487f2e8 100644 (file)
@@ -113,10 +113,9 @@ class EditPage {
        public $suppressIntro = false;
 
        /**
-        * @todo document
         * @param $article Article
         */
-       public function __construct( $article ) {
+       public function __construct( Article $article ) {
                $this->mArticle = $article;
                $this->mTitle = $article->getTitle();
        }
@@ -235,7 +234,7 @@ class EditPage {
                        return;
                }
 
-               $wgOut->addModules( array( 'mediawiki.action.edit' ) );
+               $wgOut->addModules( 'mediawiki.action.edit' );
 
                if ( $wgUser->getOption( 'uselivepreview', false ) ) {
                        $wgOut->addModules( 'mediawiki.legacy.preview' );
@@ -346,7 +345,7 @@ class EditPage {
        /**
         * Display a permissions error page, like OutputPage::showPermissionsErrorPage(),
         * but with the following differences:
-        * - If redlink=1, the user will be redirect to the page
+        * - If redlink=1, the user will be redirected to the page
         * - If there is content to display or the error occurs while either saving,
         *   previewing or showing the difference, it will be a
         *   "View source for ..." page displaying the source code after the error message.