jenkins-bot has submitted this change and it was merged.

Change subject: Revert "EditPage: Show EditFilterMergedContent hook errors in 
an errorbox"
......................................................................


Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox"

This reverts commit a02a7ff8eab9d589d77c03d4b4c58fc4a05e65c8.

Bug: T149473
Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
---
M includes/EditPage.php
1 file changed, 2 insertions(+), 22 deletions(-)

Approvals:
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 4aa87d6..0f27e78 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1646,7 +1646,7 @@
                                // being set. This is used by ConfirmEdit to 
display a captcha
                                // without any error message cruft.
                        } else {
-                               $this->hookError = $this->formatStatusErrors( 
$status );
+                               $this->hookError = $status->getWikiText();
                        }
                        // Use the existing $status->value if the hook set it
                        if ( !$status->value ) {
@@ -1656,33 +1656,13 @@
                } elseif ( !$status->isOK() ) {
                        # ...or the hook could be expecting us to produce an 
error
                        // FIXME this sucks, we should just use the Status 
object throughout
-                       $this->hookError = $this->formatStatusErrors( $status );
+                       $this->hookError = $status->getWikiText();
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR_EXPECTED;
                        return false;
                }
 
                return true;
-       }
-
-       /**
-        * Wrap status errors in an errorbox for increased visiblity
-        *
-        * @param Status $status
-        * @return string
-        */
-       private function formatStatusErrors( Status $status ) {
-               $errmsg = $status->getHTML(
-                       'edit-error-short',
-                       'edit-error-long',
-                       $this->context->getLanguage()
-               );
-               return <<<ERROR
-<div class="errorbox">
-{$errmsg}
-</div>
-<br clear="all" />
-ERROR;
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/318770
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Bartosz DziewoƄski <matma....@gmail.com>
Gerrit-Reviewer: Dereckson <dereck...@espace-win.org>
Gerrit-Reviewer: Jackmcbarn <jackmcb...@gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: Tpt <thoma...@hotmail.fr>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to