(bug 17054) more descriptive error messages for Special:RevisionDelete
authorAlex Z <mrzman@users.mediawiki.org>
Sun, 18 Jan 2009 07:02:28 +0000 (07:02 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Sun, 18 Jan 2009 07:02:28 +0000 (07:02 +0000)
RELEASE-NOTES
includes/specials/SpecialRevisiondelete.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 98cb48c..7ad920e 100644 (file)
@@ -54,6 +54,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   disabled
 * Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with LanguageConverter class)
 * Improving the efficiency by using -{A|xxx}- syntax (only applies on wiki with LanguageConverter class)
+* (bug 17054) Added more descriptive errors in Special:RevisionDelete
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 1e78d35..ed79ce8 100644 (file)
@@ -33,12 +33,12 @@ function wfSpecialRevisiondelete( $par = null ) {
        # Only one target set at a time please!
        $i = (bool)$file + (bool)$oldid + (bool)$logid + (bool)$artimestamp + (bool)$fileid + (bool)$img;
        if( $i !== 1 ) {
-               $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
+               $wgOut->showErrorPage( 'revdelete-toomanytargets-title', 'revdelete-toomanytargets-text' );
                return;
        }
        # Logs must have a type given
        if( $logid && !strpos($page->getDBKey(),'/') ) {
-               $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
+               $wgOut->showErrorPage( 'revdelete-nologtype-title', 'revdelete-nologtype-text' );
                return;
        }
        # Either submit or create our form
@@ -490,7 +490,7 @@ class RevisionDeleteForm {
                        $bitfields |= $logRows[$logid]->log_deleted;
                }
                if( !$logItems ) {
-                       $wgOut->showErrorPage( 'revdelete-nooldid-title', 'revdelete-nooldid-text' );
+                       $wgOut->showErrorPage( 'revdelete-nologid-title', 'revdelete-nologid-text' );
                        return;
                }
                
index 095917c..026939f 100644 (file)
@@ -1266,53 +1266,60 @@ It may have been deleted from the wiki, or renamed.
 Try [[Special:Search|searching on the wiki]] for relevant new pages.',
 
 # Revision deletion
-'rev-deleted-comment'         => '(comment removed)',
-'rev-deleted-user'            => '(username removed)',
-'rev-deleted-event'           => '(log action removed)',
-'rev-deleted-text-permission' => '<div class="mw-warning plainlinks">
+'rev-deleted-comment'            => '(comment removed)',
+'rev-deleted-user'               => '(username removed)',
+'rev-deleted-event'              => '(log action removed)',
+'rev-deleted-text-permission'    => '<div class="mw-warning plainlinks">
 This page revision has been removed from the public archives.
 There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
-'rev-deleted-text-view'       => '<div class="mw-warning plainlinks">
+'rev-deleted-text-view'          => '<div class="mw-warning plainlinks">
 This page revision has been removed from the public archives.
 As an administrator on {{SITENAME}} you can view it;
 there may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
-'rev-delundel'                => 'show/hide',
-'revisiondelete'              => 'Delete/undelete revisions',
-'revdelete-nooldid-title'     => 'Invalid target revision',
-'revdelete-nooldid-text'      => 'You have either not specified a target revision(s) to perform this
+'rev-delundel'                   => 'show/hide',
+'revisiondelete'                 => 'Delete/undelete revisions',
+'revdelete-nooldid-title'        => 'Invalid target revision',
+'revdelete-nooldid-text'         => 'You have either not specified a target revision(s) to perform this
 function, the specified revision does not exist, or you are attempting to hide the current revision.',
-'revdelete-selected'          => "'''{{PLURAL:$2|Selected revision|Selected revisions}} of [[:$1]]:'''",
-'logdelete-selected'          => "'''{{PLURAL:$1|Selected log event|Selected log events}}:'''",
-'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.'''
+'revdelete-nologtype-title'      => 'No log type given',
+'revdelete-nologtype-text'       => 'You have not specified a log type to perform this action on.',
+'revdelete-toomanytargets-title' => 'Too many targets',
+'revdelete-toomanytargets-text'  => 'You have specified too many types of targets to perform this action on.',
+'revdelete-nologid-title'        => 'Invalid log entry',
+'revdelete-nologid-text'         => 'You have either not specified a target log event(s) to perform this
+function or the specified entry does not exist.',
+'revdelete-selected'             => "'''{{PLURAL:$2|Selected revision|Selected revisions}} of [[:$1]]:'''",
+'logdelete-selected'             => "'''{{PLURAL:$1|Selected log event|Selected log events}}:'''",
+'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.'''
 
 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.",
-'revdelete-legend'            => 'Set visibility restrictions',
-'revdelete-hide-text'         => 'Hide revision text',
-'revdelete-hide-name'         => 'Hide action and target',
-'revdelete-hide-comment'      => 'Hide edit comment',
-'revdelete-hide-user'         => "Hide editor's username/IP",
-'revdelete-hide-restricted'   => 'Apply these restrictions to Sysops and lock this interface',
-'revdelete-suppress'          => 'Suppress data from Sysops as well as others',
-'revdelete-hide-image'        => 'Hide file content',
-'revdelete-unsuppress'        => 'Remove restrictions on restored revisions',
-'revdelete-log'               => 'Log comment:',
-'revdelete-submit'            => 'Apply to selected revision',
-'revdelete-logentry'          => 'changed revision visibility of [[$1]]',
-'logdelete-logentry'          => 'changed event visibility of [[$1]]',
-'revdelete-success'           => "'''Revision visibility successfully set.'''",
-'logdelete-success'           => "'''Log visibility successfully set.'''",
-'revdel-restore'              => 'Change visibility',
-'pagehist'                    => 'Page history',
-'deletedhist'                 => 'Deleted history',
-'revdelete-content'           => 'content',
-'revdelete-summary'           => 'edit summary',
-'revdelete-uname'             => 'username',
-'revdelete-restricted'        => 'applied restrictions to sysops',
-'revdelete-unrestricted'      => 'removed restrictions for sysops',
-'revdelete-hid'               => 'hid $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-legend'               => 'Set visibility restrictions',
+'revdelete-hide-text'            => 'Hide revision text',
+'revdelete-hide-name'            => 'Hide action and target',
+'revdelete-hide-comment'         => 'Hide edit comment',
+'revdelete-hide-user'            => "Hide editor's username/IP",
+'revdelete-hide-restricted'      => 'Apply these restrictions to Sysops and lock this interface',
+'revdelete-suppress'             => 'Suppress data from Sysops as well as others',
+'revdelete-hide-image'           => 'Hide file content',
+'revdelete-unsuppress'           => 'Remove restrictions on restored revisions',
+'revdelete-log'                  => 'Log comment:',
+'revdelete-submit'               => 'Apply to selected revision',
+'revdelete-logentry'             => 'changed revision visibility of [[$1]]',
+'logdelete-logentry'             => 'changed event visibility of [[$1]]',
+'revdelete-success'              => "'''Revision visibility successfully set.'''",
+'logdelete-success'              => "'''Log visibility successfully set.'''",
+'revdel-restore'                 => 'Change visibility',
+'pagehist'                       => 'Page history',
+'deletedhist'                    => 'Deleted history',
+'revdelete-content'              => 'content',
+'revdelete-summary'              => 'edit summary',
+'revdelete-uname'                => 'username',
+'revdelete-restricted'           => 'applied restrictions to sysops',
+'revdelete-unrestricted'         => 'removed restrictions for sysops',
+'revdelete-hid'                  => 'hid $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}}',
 
 # Suppression log
 'suppressionlog'     => 'Suppression log',
index 13a2018..d65b72c 100644 (file)
@@ -636,6 +636,12 @@ $wgMessageStructure = array(
                'revisiondelete',
                'revdelete-nooldid-title',
                'revdelete-nooldid-text',
+               'revdelete-nologtype-title',
+               'revdelete-nologtype-text',
+               'revdelete-toomanytargets-title',
+               'revdelete-toomanytargets-text',
+               'revdelete-nologid-title',
+               'revdelete-nologid-text',
                'revdelete-selected',
                'logdelete-selected',
                'revdelete-text',