Fix 5 PHPCS warnings in WikiPage.php
[lhc/web/wiklou.git] / includes / EditPage.php
index 85a3014..9059987 100644 (file)
@@ -655,6 +655,9 @@ class EditPage {
                        $this->getContextTitle()->getPrefixedText()
                ) );
                $wgOut->addBacklinkSubtitle( $this->getContextTitle() );
+               $wgOut->addHTML( $this->editFormPageTop );
+               $wgOut->addHTML( $this->editFormTextTop );
+
                $wgOut->addWikiText( $wgOut->formatPermissionsErrorMessage( $permErrors, 'edit' ) );
                $wgOut->addHTML( "<hr />\n" );
 
@@ -668,13 +671,16 @@ class EditPage {
                        $wgOut->addWikiMsg( 'viewsourcetext' );
                }
 
+               $wgOut->addHTML( $this->editFormTextBeforeContent );
                $this->showTextbox( $text, 'wpTextbox1', array( 'readonly' ) );
+               $wgOut->addHTML( $this->editFormTextAfterContent );
 
                $wgOut->addHTML( Html::rawElement( 'div', array( 'class' => 'templatesUsed' ),
                        Linker::formatTemplates( $this->getTemplates() ) ) );
 
                $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
 
+               $wgOut->addHTML( $this->editFormTextBottom );
                if ( $this->mTitle->exists() ) {
                        $wgOut->returnToMain( null, $this->mTitle );
                }
@@ -974,7 +980,7 @@ class EditPage {
                global $wgUser;
                $this->edittime = $this->mArticle->getTimestamp();
 
-               $content = $this->getContentObject( false ); #TODO: track content object?!
+               $content = $this->getContentObject( false ); # TODO: track content object?!
                if ( $content === false ) {
                        return false;
                }
@@ -1222,7 +1228,7 @@ class EditPage {
                $title = Title::newFromText( $preload );
                # Check for existence to avoid getting MediaWiki:Noarticletext
                if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
-                       //TODO: somehow show a warning to the user!
+                       // TODO: somehow show a warning to the user!
                        return $handler->makeEmptyContent();
                }
 
@@ -1231,7 +1237,7 @@ class EditPage {
                        $title = $page->getRedirectTarget();
                        # Same as before
                        if ( $title === null || !$title->exists() || !$title->userCan( 'read', $wgUser ) ) {
-                               //TODO: somehow show a warning to the user!
+                               // TODO: somehow show a warning to the user!
                                return $handler->makeEmptyContent();
                        }
                        $page = WikiPage::factory( $title );
@@ -1241,7 +1247,7 @@ class EditPage {
                $content = $page->getContent( Revision::RAW );
 
                if ( !$content ) {
-                       //TODO: somehow show a warning to the user!
+                       // TODO: somehow show a warning to the user!
                        return $handler->makeEmptyContent();
                }
 
@@ -1249,7 +1255,7 @@ class EditPage {
                        $converted = $content->convert( $handler->getModelID() );
 
                        if ( !$converted ) {
-                               //TODO: somehow show a warning to the user!
+                               // TODO: somehow show a warning to the user!
                                wfDebug( "Attempt to preload incompatible content: " .
                                        "can't convert " . $content->getModel() .
                                        " to " . $handler->getModelID() );
@@ -2508,7 +2514,7 @@ class EditPage {
                # user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the
                # user being bounced back more than once in the event that a summary
                # is not required.
-               #####
+               # ####
                # For a bit more sophisticated detection of blank summaries, hash the
                # automatic one and pass that in the hidden field wpAutoSummary.
                if ( $this->missingSummary || ( $this->section == 'new' && $this->nosummary ) ) {
@@ -2675,7 +2681,7 @@ class EditPage {
 
                        if ( $this->section != '' && $this->section != 'new' ) {
                                if ( !$this->summary && !$this->preview && !$this->diff ) {
-                                       $sectionTitle = self::extractSectionTitle( $this->textbox1 ); //FIXME: use Content object
+                                       $sectionTitle = self::extractSectionTitle( $this->textbox1 ); // FIXME: use Content object
                                        if ( $sectionTitle !== false ) {
                                                $this->summary = "/* $sectionTitle */ ";
                                        }
@@ -3699,7 +3705,7 @@ HTML
                $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos );
                $showSignature = true;
                if ( $title ) {
-                        $showSignature = MWNamespace::wantSignatures( $title->getNamespace() );
+                       $showSignature = MWNamespace::wantSignatures( $title->getNamespace() );
                }
 
                /**