From 9b530b2b5a5008765ab0a226df8b5ec5f7182bd2 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 16 Aug 2016 22:59:14 -0700 Subject: [PATCH] EditPage: Fix display of errors with multiple messages If a status object returns failure with multiple messages (like in Content::prepareSave()), then previously the first list item would have a raw asterisk in front of it instead of being a list item because the
tag was on the same line. Adding a newline before the status object's wikitext will ensure that the first item is interpreted as part of the list. Change-Id: If42b3e745f1bd57c6e7964c8e297dab2bf742d4c --- includes/EditPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index ee0699383f..9b862b932e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1474,7 +1474,7 @@ class EditPage { case self::AS_CANNOT_USE_CUSTOM_MODEL: case self::AS_PARSE_ERROR: - $wgOut->addWikiText( '
' . $status->getWikiText() . '
' ); + $wgOut->addWikiText( '
' . "\n" . $status->getWikiText() . '
' ); return true; case self::AS_SUCCESS_NEW_ARTICLE: @@ -1551,7 +1551,7 @@ class EditPage { // is if an extension hook aborted from inside ArticleSave. // Render the status object into $this->hookError // FIXME this sucks, we should just use the Status object throughout - $this->hookError = '
' . $status->getWikiText() . + $this->hookError = '
' ."\n" . $status->getWikiText() . '
'; return true; } -- 2.20.1