X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FEditPage.php;h=fe0014992034ede7b65a5abf3d63eaa309a02297;hb=d6ed082b6d66adfc5f603d8b573deaef83d4e045;hp=9d897857d522a7ee92c7d61291003154538f9a1d;hpb=cc6e850520b79758fd791204d4b49715ee235c6b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/EditPage.php b/includes/EditPage.php index 9d897857d5..fe00149920 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1156,7 +1156,7 @@ class EditPage { $out->showErrorPage( 'modeleditnotsupported-title', 'modeleditnotsupported-text', - $modelName + [ $modelName ] ); return false; } @@ -1188,7 +1188,7 @@ class EditPage { /** * @param Content|null $def_content The default value to return * - * @return Content|null Content on success, $def_content for invalid sections + * @return Content|false|null Content on success, $def_content for invalid sections * * @since 1.21 */ @@ -1683,7 +1683,9 @@ class EditPage { case self::AS_CANNOT_USE_CUSTOM_MODEL: case self::AS_PARSE_ERROR: case self::AS_UNICODE_NOT_SUPPORTED: - $out->wrapWikiTextAsInterface( 'error', $status->getWikiText() ); + $out->wrapWikiTextAsInterface( 'error', + $status->getWikiText( false, false, $this->context->getLanguage() ) + ); return true; case self::AS_SUCCESS_NEW_ARTICLE: @@ -1757,7 +1759,8 @@ 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 = '
' . "\n" . $status->getWikiText() . + $this->hookError = '
' . "\n" . + $status->getWikiText( false, false, $this->context->getLanguage() ) . '
'; return true; } @@ -4045,11 +4048,11 @@ ERROR; if ( $this->isConflict ) { $conflict = Html::rawElement( - 'h2', [ 'id' => 'mw-previewconflict' ], + 'div', [ 'id' => 'mw-previewconflict', 'class' => 'warningbox' ], $this->context->msg( 'previewconflict' )->escaped() ); } else { - $conflict = '
'; + $conflict = ''; } $previewhead = Html::rawElement( @@ -4058,7 +4061,9 @@ ERROR; 'h2', [ 'id' => 'mw-previewheader' ], $this->context->msg( 'preview' )->escaped() ) . - $out->parseAsInterface( $note ) . $conflict + Html::rawElement( 'div', [ 'class' => 'warningbox' ], + $out->parseAsInterface( $note ) + ) . $conflict ); $pageViewLang = $this->mTitle->getPageViewLanguage();