Thcipriani has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/318983

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/318983/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 770a74e..059af97 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1641,7 +1641,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 ) {
@@ -1651,33 +1651,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/318983
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Thcipriani <tcipri...@wikimedia.org>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>

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

Reply via email to