From: Tim Starling Date: Mon, 1 Jun 2009 12:23:57 +0000 (+0000) Subject: Split date and time as requested by Nikerabbit. X-Git-Tag: 1.31.0-rc.0~41567 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=73ac945b74342619cc0f641b3df8d9a64406f57d;p=lhc%2Fweb%2Fwiklou.git Split date and time as requested by Nikerabbit. --- diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 02099fb0c8..212c1fdb10 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -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() ); } /** diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index c894c11d75..3bb468ff45 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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.',