[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Revert "EditPage: Show EditFilterMergedContent hook errors i...

2016-10-31 Thread jenkins-bot (Code Review)
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:
  Thcipriani: Looks good to me, approved
  jenkins-bot: Verified



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 <<
-{$errmsg}
-
-
-ERROR;
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a650c6ec478542351824e8ae8a8d8354ffa50f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Revert "EditPage: Show EditFilterMergedContent hook errors i...

2016-10-31 Thread Thcipriani (Code Review)
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 <<
-{$errmsg}
-
-
-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 
Gerrit-Reviewer: Paladox 

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