From: Kunal Mehta Date: Wed, 17 Aug 2016 05:59:14 +0000 (-0700) Subject: EditPage: Fix display of errors with multiple messages X-Git-Tag: 1.31.0-rc.0~6026^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/fiche.php?a=commitdiff_plain;h=9b530b2b5a5008765ab0a226df8b5ec5f7182bd2;p=lhc%2Fweb%2Fwiklou.git 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 --- 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; }