Split date and time as requested by Nikerabbit.
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 1 Jun 2009 12:23:57 +0000 (12:23 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 1 Jun 2009 12:23:57 +0000 (12:23 +0000)
includes/specials/SpecialRevisiondelete.php
languages/messages/MessagesEn.php

index 02099fb..212c1fd 100644 (file)
@@ -632,7 +632,7 @@ abstract class RevDel_List {
                        // Make error messages less vague
                        $oldBits = $item->getBits();
                        if ( $oldBits == $newBits ) {
-                               $status->warning( 'revdelete-no-change', $item->formatDateTime() );
+                               $status->warning( 'revdelete-no-change', $item->formatDate(), $item->formatTime() );
                                $status->failCount++;
                                continue;
                        } elseif ( $oldBits == 0 && $newBits != 0 ) {
@@ -645,14 +645,14 @@ abstract class RevDel_List {
 
                        if ( $item->isCurrent() && $opType == 'hide' ) {
                                // Cannot hide current version text
-                               $status->error( 'revdelete-hide-current', $item->formatDateTime() );
+                               $status->error( 'revdelete-hide-current', $item->formatDate(), $item->formatTime() );
                                $status->failCount++;
                                continue;
                        }
                        if ( !$item->canView() ) {
                                // Cannot access this revision
                                $msg = $opType == 'show' ? 'revdelete-show-no-access' : 'revdelete-modify-no-access';
-                               $status->error( $msg, $item->formatDateTime() );
+                               $status->error( $msg, $item->formatDate(), $item->formatTime() );
                                $status->failCount++;
                                continue;
                        }
@@ -664,7 +664,7 @@ abstract class RevDel_List {
                                $idsForLog[] = $item->getId();
                                $status->successCount++;
                        } else {
-                               $status->error( 'revdelete-concurrent-change', $item->formatDateTime() );
+                               $status->error( 'revdelete-concurrent-change', $item->formatDate(), $item->formatTime() );
                                $status->failCount++;
                        }
                }
@@ -876,11 +876,19 @@ abstract class RevDel_Item {
        }
 
        /**
-        * Get the timestamp, formatted with $wgLang
+        * Get the date, formatted with $wgLang
         */
-       public function formatDateTime() {
+       public function formatDate() {
                global $wgLang;
-               return $wgLang->timeanddate( $this->getTimestamp() );
+               return $wgLang->date( $this->getTimestamp() );
+       }
+
+       /**
+        * Get the date, formatted with $wgLang
+        */
+       public function formatTime() {
+               global $wgLang;
+               return $wgLang->time( $this->getTimestamp() );
        }
 
        /**
index c894c11..3bb468f 100644 (file)
@@ -1329,15 +1329,15 @@ $1",
 'revdelete-unhid'             => 'unhid $1',
 'revdelete-log-message'       => '$1 for $2 {{PLURAL:$2|revision|revisions}}',
 'logdelete-log-message'       => '$1 for $2 {{PLURAL:$2|event|events}}',
-'revdelete-hide-current'      => 'Error hiding the item dated $1: this is the current revision.
+'revdelete-hide-current'      => 'Error hiding the item dated $2, $1: this is the current revision.
 It cannot be hidden.',
-'revdelete-show-no-access'    => 'Error showing the item dated $1: this item has been marked "restricted".
+'revdelete-show-no-access'    => 'Error showing the item dated $2, $1: this item has been marked "restricted".
 You do not have access to it.',
-'revdelete-modify-no-access'  => 'Error modifying the item dated $1: this item has been marked "restricted".
+'revdelete-modify-no-access'  => 'Error modifying the item dated $2, $1: this item has been marked "restricted".
 You do not have access to it.',
-'revdelete-modify-missing'    => 'Error modifying item ID $1: it is missing from the database!',
-'revdelete-no-change'         => "'''Warning:''' the item dated $1 already had the requested visibility settings.",
-'revdelete-concurrent-change' => 'Error modifying the item dated $1: its status appears to have been changed by someone else while you attempted to modify it.
+'revdelete-modify-missing'    => 'Error modifying item ID $2, $1: it is missing from the database!',
+'revdelete-no-change'         => "'''Warning:''' the item dated $2, $1 already had the requested visibility settings.",
+'revdelete-concurrent-change' => 'Error modifying the item dated $2, $1: its status appears to have been changed by someone else while you attempted to modify it.
 Please check the logs.',
 'revdelete-only-restricted'   => 'You cannot suppress items from view by administrators without also selecting one of the other suppression options.',