From: Erik Moeller Date: Sun, 25 May 2003 07:56:08 +0000 (+0000) Subject: updated error messages for improved rollback feature X-Git-Tag: 1.1.0~515 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=dec4b588d752d727d2eabb219f21f264e2be3ec9;p=lhc%2Fweb%2Fwiklou.git updated error messages for improved rollback feature --- diff --git a/includes/Article.php b/includes/Article.php index f656eb3e27..282e55d841 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1350,10 +1350,16 @@ name=\"wpSummary\" maxlength=200 size=60>
$from = str_replace( '_', ' ', wfCleanQueryVar( $from ) ); if( $from != $s->cur_user_text ) { - $wgOut->addHTML( wfMsg( "alreadyrolled", + $wgOut->setPageTitle(wfmsg("rollbackfailed")); + $wgOut->addWikiText( wfMsg( "alreadyrolled", + htmlspecialchars( $wgTitle->getPrefixedText()), htmlspecialchars( $from ), - htmlspecialchars( $s->cur_user_text ), - htmlspecialchars( $s->cur_comment ) ) ); + htmlspecialchars( $s->cur_user_text ) ) ); + if($s->cur_comment != "") { + $wgOut->addHTML( + wfMsg("editcomment", + htmlspecialchars( $s->cur_comment ) ) ); + } return; } @@ -1366,6 +1372,7 @@ name=\"wpSummary\" maxlength=200 size=60>
$res = wfQuery( $sql ); if( wfNumRows( $res ) != 1 ) { # Something wrong + $wgOut->setPageTitle(wfMsg("rollbackfailed")); $wgOut->addHTML( wfMsg( "cantrollback" ) ); return; } diff --git a/languages/Language.php b/languages/Language.php index 1228ed6fb2..53340e34f6 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -916,11 +916,14 @@ All times shown are server time (UTC). "imagereverted" => "Revert to earlier version was successful.", "rollback" => "Roll back edits", "rollbacklink" => "rollback", -"cantrollback" => "Can't revert edit; last contributor is only author of this article.", -"alreadyrolled" => "Can't roll back last edit by $1; someone else has edited or -rolled back the article already. - -

Last edit was by $2, marked \"$3\".", +"rollbackfailed" => "Rollback failed", +"cantrollback" => "Cannot revert edit; last contributor is only author of this article.", +"alreadyrolled" => "Cannot rollback last edit of [[$1]] +by [[User:$2|$2]] ([[User talk:$2|Talk]]); someone else has edited or rolled back the article already. + +Last edit was by [[User:$3|$3]] ([[User talk:$3|Talk]]). ", +# only shown if there is an edit comment +"editcomment" => "The edit comment was: \"$1\".", "revertpage" => "Reverted to last edit by $1", # Undelete