From: Raimond Spekking Date: Thu, 22 Oct 2009 16:39:20 +0000 (+0000) Subject: * (bug 21047) Wrap 'cannotdelete' into a div with the generic 'error' class and an... X-Git-Tag: 1.31.0-rc.0~39178 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=2f7b7c9635b30404fdaa1881ec6a2a396fc1bfc9;p=lhc%2Fweb%2Fwiklou.git * (bug 21047) Wrap 'cannotdelete' into a div with the generic 'error' class and an own 'mw-error-cannotdelete' class Based on a patch by Platonides --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 02b4b19174..ddd75fcb32 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -256,6 +256,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN rate limits. * (bug 21222) When $wgUseTeX is not enabled, is no longer registered with the parser so extensions are free to implement their own tag +* (bug 21047) Wrap 'cannotdelete' into a div with the generic 'error' class and + an own 'mw-error-cannotdelete' class === Bug fixes in 1.16 === diff --git a/includes/Article.php b/includes/Article.php index 6de0641828..7664808527 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2557,7 +2557,13 @@ class Article { $conds = $this->mTitle->pageCond(); $latest = $dbw->selectField( 'page', 'page_latest', $conds, __METHOD__ ); if( $latest === false ) { - $wgOut->showFatalError( wfMsgExt( 'cannotdelete', array( 'parse' ) ) ); + $wgOut->showFatalError( + Html::rawElement( + 'div', + array( 'class' => 'error mw-error-cannotdelete' ), + wfMsgExt( 'cannotdelete', array( 'parse' ), $this->mTitle->getPrefixedText() ) + ) + ); $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) ); LogEventsList::showLogExtract( $wgOut, @@ -2801,7 +2807,13 @@ class Article { } } else { if( $error == '' ) { - $wgOut->showFatalError( wfMsgExt( 'cannotdelete', array( 'parse' ) ) ); + $wgOut->showFatalError( + Html::rawElement( + 'div', + array( 'class' => 'error mw-error-cannotdelete' ), + wfMsgExt( 'cannotdelete', array( 'parse' ), $this->mTitle->getPrefixedText() ) + ) + ); $wgOut->addHTML( Xml::element( 'h2', null, LogPage::logName( 'delete' ) ) ); LogEventsList::showLogExtract( $wgOut, diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 6bd0c8f366..16997c13d7 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -991,7 +991,7 @@ Please report this to an [[Special:ListUsers/sysop|administrator]], making note 'unexpected' => 'Unexpected value: "$1"="$2".', 'formerror' => 'Error: could not submit form', 'badarticleerror' => 'This action cannot be performed on this page.', -'cannotdelete' => 'Could not delete the page or file specified. +'cannotdelete' => 'The page or file "$1" could not be deleted. It may have already been deleted by someone else.', 'badtitle' => 'Bad title', 'badtitletext' => 'The requested page title was invalid, empty, or an incorrectly linked inter-language or inter-wiki title.