r45865 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45864‎ | r45865 | r45866 >
Date:07:02, 18 January 2009
Author:mrzman
Status:ok
Tags:
Comment:
(bug 17054) more descriptive error messages for Special:RevisionDelete
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -636,6 +636,12 @@
637637 'revisiondelete',
638638 'revdelete-nooldid-title',
639639 'revdelete-nooldid-text',
 640+ 'revdelete-nologtype-title',
 641+ 'revdelete-nologtype-text',
 642+ 'revdelete-toomanytargets-title',
 643+ 'revdelete-toomanytargets-text',
 644+ 'revdelete-nologid-title',
 645+ 'revdelete-nologid-text',
640646 'revdelete-selected',
641647 'logdelete-selected',
642648 'revdelete-text',
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -33,12 +33,12 @@
3434 # Only one target set at a time please!
3535 $i = (bool)$file + (bool)$oldid + (bool)$logid + (bool)$artimestamp + (bool)$fileid + (bool)$img;
3636 if( $i !== 1 ) {
37 - $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
 37+ $wgOut->showErrorPage( 'revdelete-toomanytargets-title', 'revdelete-toomanytargets-text' );
3838 return;
3939 }
4040 # Logs must have a type given
4141 if( $logid && !strpos($page->getDBKey(),'/') ) {
42 - $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
 42+ $wgOut->showErrorPage( 'revdelete-nologtype-title', 'revdelete-nologtype-text' );
4343 return;
4444 }
4545 # Either submit or create our form
@@ -490,7 +490,7 @@
491491 $bitfields |= $logRows[$logid]->log_deleted;
492492 }
493493 if( !$logItems ) {
494 - $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
 494+ $wgOut->showErrorPage( 'revdelete-nologid-title', 'revdelete-nologid-text' );
495495 return;
496496 }
497497
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1266,53 +1266,60 @@
12671267 Try [[Special:Search|searching on the wiki]] for relevant new pages.',
12681268
12691269 # Revision deletion
1270 -'rev-deleted-comment' => '(comment removed)',
1271 -'rev-deleted-user' => '(username removed)',
1272 -'rev-deleted-event' => '(log action removed)',
1273 -'rev-deleted-text-permission' => '<div class="mw-warning plainlinks">
 1270+'rev-deleted-comment' => '(comment removed)',
 1271+'rev-deleted-user' => '(username removed)',
 1272+'rev-deleted-event' => '(log action removed)',
 1273+'rev-deleted-text-permission' => '<div class="mw-warning plainlinks">
12741274 This page revision has been removed from the public archives.
12751275 There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
1276 -'rev-deleted-text-view' => '<div class="mw-warning plainlinks">
 1276+'rev-deleted-text-view' => '<div class="mw-warning plainlinks">
12771277 This page revision has been removed from the public archives.
12781278 As an administrator on {{SITENAME}} you can view it;
12791279 there may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
1280 -'rev-delundel' => 'show/hide',
1281 -'revisiondelete' => 'Delete/undelete revisions',
1282 -'revdelete-nooldid-title' => 'Invalid target revision',
1283 -'revdelete-nooldid-text' => 'You have either not specified a target revision(s) to perform this
 1280+'rev-delundel' => 'show/hide',
 1281+'revisiondelete' => 'Delete/undelete revisions',
 1282+'revdelete-nooldid-title' => 'Invalid target revision',
 1283+'revdelete-nooldid-text' => 'You have either not specified a target revision(s) to perform this
12841284 function, the specified revision does not exist, or you are attempting to hide the current revision.',
1285 -'revdelete-selected' => "'''{{PLURAL:$2|Selected revision|Selected revisions}} of [[:$1]]:'''",
1286 -'logdelete-selected' => "'''{{PLURAL:$1|Selected log event|Selected log events}}:'''",
1287 -'revdelete-text' => "'''Deleted revisions and events will still appear in the page history and logs, but parts of their content will be inaccessible to the public.'''
 1285+'revdelete-nologtype-title' => 'No log type given',
 1286+'revdelete-nologtype-text' => 'You have not specified a log type to perform this action on.',
 1287+'revdelete-toomanytargets-title' => 'Too many targets',
 1288+'revdelete-toomanytargets-text' => 'You have specified too many types of targets to perform this action on.',
 1289+'revdelete-nologid-title' => 'Invalid log entry',
 1290+'revdelete-nologid-text' => 'You have either not specified a target log event(s) to perform this
 1291+function or the specified entry does not exist.',
 1292+'revdelete-selected' => "'''{{PLURAL:$2|Selected revision|Selected revisions}} of [[:$1]]:'''",
 1293+'logdelete-selected' => "'''{{PLURAL:$1|Selected log event|Selected log events}}:'''",
 1294+'revdelete-text' => "'''Deleted revisions and events will still appear in the page history and logs, but parts of their content will be inaccessible to the public.'''
12881295
12891296 Other admins on {{SITENAME}} will still be able to access the hidden content and can undelete it again through this same interface, unless additional restrictions are set.",
1290 -'revdelete-legend' => 'Set visibility restrictions',
1291 -'revdelete-hide-text' => 'Hide revision text',
1292 -'revdelete-hide-name' => 'Hide action and target',
1293 -'revdelete-hide-comment' => 'Hide edit comment',
1294 -'revdelete-hide-user' => "Hide editor's username/IP",
1295 -'revdelete-hide-restricted' => 'Apply these restrictions to Sysops and lock this interface',
1296 -'revdelete-suppress' => 'Suppress data from Sysops as well as others',
1297 -'revdelete-hide-image' => 'Hide file content',
1298 -'revdelete-unsuppress' => 'Remove restrictions on restored revisions',
1299 -'revdelete-log' => 'Log comment:',
1300 -'revdelete-submit' => 'Apply to selected revision',
1301 -'revdelete-logentry' => 'changed revision visibility of [[$1]]',
1302 -'logdelete-logentry' => 'changed event visibility of [[$1]]',
1303 -'revdelete-success' => "'''Revision visibility successfully set.'''",
1304 -'logdelete-success' => "'''Log visibility successfully set.'''",
1305 -'revdel-restore' => 'Change visibility',
1306 -'pagehist' => 'Page history',
1307 -'deletedhist' => 'Deleted history',
1308 -'revdelete-content' => 'content',
1309 -'revdelete-summary' => 'edit summary',
1310 -'revdelete-uname' => 'username',
1311 -'revdelete-restricted' => 'applied restrictions to sysops',
1312 -'revdelete-unrestricted' => 'removed restrictions for sysops',
1313 -'revdelete-hid' => 'hid $1',
1314 -'revdelete-unhid' => 'unhid $1',
1315 -'revdelete-log-message' => '$1 for $2 {{PLURAL:$2|revision|revisions}}',
1316 -'logdelete-log-message' => '$1 for $2 {{PLURAL:$2|event|events}}',
 1297+'revdelete-legend' => 'Set visibility restrictions',
 1298+'revdelete-hide-text' => 'Hide revision text',
 1299+'revdelete-hide-name' => 'Hide action and target',
 1300+'revdelete-hide-comment' => 'Hide edit comment',
 1301+'revdelete-hide-user' => "Hide editor's username/IP",
 1302+'revdelete-hide-restricted' => 'Apply these restrictions to Sysops and lock this interface',
 1303+'revdelete-suppress' => 'Suppress data from Sysops as well as others',
 1304+'revdelete-hide-image' => 'Hide file content',
 1305+'revdelete-unsuppress' => 'Remove restrictions on restored revisions',
 1306+'revdelete-log' => 'Log comment:',
 1307+'revdelete-submit' => 'Apply to selected revision',
 1308+'revdelete-logentry' => 'changed revision visibility of [[$1]]',
 1309+'logdelete-logentry' => 'changed event visibility of [[$1]]',
 1310+'revdelete-success' => "'''Revision visibility successfully set.'''",
 1311+'logdelete-success' => "'''Log visibility successfully set.'''",
 1312+'revdel-restore' => 'Change visibility',
 1313+'pagehist' => 'Page history',
 1314+'deletedhist' => 'Deleted history',
 1315+'revdelete-content' => 'content',
 1316+'revdelete-summary' => 'edit summary',
 1317+'revdelete-uname' => 'username',
 1318+'revdelete-restricted' => 'applied restrictions to sysops',
 1319+'revdelete-unrestricted' => 'removed restrictions for sysops',
 1320+'revdelete-hid' => 'hid $1',
 1321+'revdelete-unhid' => 'unhid $1',
 1322+'revdelete-log-message' => '$1 for $2 {{PLURAL:$2|revision|revisions}}',
 1323+'logdelete-log-message' => '$1 for $2 {{PLURAL:$2|event|events}}',
13171324
13181325 # Suppression log
13191326 'suppressionlog' => 'Suppression log',
Index: trunk/phase3/RELEASE-NOTES
@@ -54,6 +54,7 @@
5555 disabled
5656 * Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with LanguageConverter class)
5757 * Improving the efficiency by using -{A|xxx}- syntax (only applies on wiki with LanguageConverter class)
 58+* (bug 17054) Added more descriptive errors in Special:RevisionDelete
5859
5960 == API changes in 1.15 ==
6061 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Follow-up revisions

RevisionCommit summaryAuthorDate
r45869Small cleanup on messages added in r45865...siebrand09:07, 18 January 2009

Status & tagging log