From 022f26e9fd3ae865331f3bb1b3eec63e212240c9 Mon Sep 17 00:00:00 2001 From: Paladox Date: Sat, 29 Oct 2016 21:51:27 +0000 Subject: [PATCH] Revert "EditPage: Show EditFilterMergedContent hook errors in an errorbox" This reverts commit a02a7ff8eab9d589d77c03d4b4c58fc4a05e65c8. Bug: T149473 Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f --- includes/EditPage.php | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 4aa87d6c89..0f27e78987 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1646,7 +1646,7 @@ class EditPage { // 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,7 +1656,7 @@ class EditPage { } 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; @@ -1665,26 +1665,6 @@ class EditPage { 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 << -{$errmsg} - -
-ERROR; - } - /** * Return the summary to be used for a new section. * -- 2.20.1