// 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 ) {
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;
}
$idsForLog[] = $item->getId();
$status->successCount++;
} else {
- $status->error( 'revdelete-concurrent-change', $item->formatDateTime() );
+ $status->error( 'revdelete-concurrent-change', $item->formatDate(), $item->formatTime() );
$status->failCount++;
}
}
}
/**
- * 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() );
}
/**
'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.',