updated error messages for improved rollback feature
authorErik Moeller <erik@users.mediawiki.org>
Sun, 25 May 2003 07:56:08 +0000 (07:56 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Sun, 25 May 2003 07:56:08 +0000 (07:56 +0000)
includes/Article.php
languages/Language.php

index f656eb3..282e55d 100644 (file)
@@ -1350,10 +1350,16 @@ name=\"wpSummary\" maxlength=200 size=60><br>
                
                $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><br>
                $res = wfQuery( $sql );
                if( wfNumRows( $res ) != 1 ) {
                        # Something wrong
+                       $wgOut->setPageTitle(wfMsg("rollbackfailed"));
                        $wgOut->addHTML( wfMsg( "cantrollback" ) );
                        return;
                }
index 1228ed6..53340e3 100644 (file)
@@ -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"        => "<b>Can't roll back last edit by $1; someone else has edited or
-rolled back the article already.</b>
-
-<p>Last edit was by $2, marked \"<i>$3</i>\".",
+"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: \"<i>$1</i>\".", 
 "revertpage"   => "Reverted to last edit by $1",
 
 # Undelete