Follow-up r56215: Replace hardcoded text with a new message.
authorRaimond Spekking <raymond@users.mediawiki.org>
Sat, 12 Sep 2009 08:25:54 +0000 (08:25 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Sat, 12 Sep 2009 08:25:54 +0000 (08:25 +0000)
Replace "images" with the generic "files"
Wrap message into a div with class=error
Add it to RELEASE-NOTES

RELEASE-NOTES
includes/DefaultSettings.php
includes/ImagePage.php
includes/specials/SpecialUndelete.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 8b7a350..bca7966 100644 (file)
@@ -85,6 +85,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   was denied to users(img_auth only)
 * (bug 19646) $wgImgAuthPublicTest added to test to see if img_auth set up
   correctly (img_auth only)
+* $wgUploadMaintenance added to disable file deletions and restorations during
+  maintenance
 
 === New features in 1.16 ===
 
index d390da5..a327956 100644 (file)
@@ -4223,5 +4223,7 @@ $wgMemoryLimit = "50M";
  */
 $wgUseAJAXCategories = false;
 
-// to disable image delete/restore temporarily
+/**
+ * To disable file delete/restore temporarily
+ */
 $wgUploadMaintenance = false;
index 40e39c4..f3d8b70 100644 (file)
@@ -723,7 +723,7 @@ EOT
                global $wgUploadMaintenance;
                if( $wgUploadMaintenance && $this->mTitle && $this->mTitle->getNamespace() == NS_FILE ) {
                        global $wgOut;
-                       $wgOut->addWikiText('Deletion and restoration of images temporarily disabled during maintenance.' );
+                       $wgOut->wrapWikiMsg( "<div class='error'>\n$1</div>\n", array( 'filedelete-maintenance' ) );
                        return;
                }
 
index 7a79773..d1c37b3 100644 (file)
@@ -648,7 +648,7 @@ class UndeleteForm {
                if( $this->mRestore && $this->mAction == "submit" ) {
                        global $wgUploadMaintenance;
                        if( $wgUploadMaintenance && $this->mTargetObj && $this->mTargetObj->getNamespace() == NS_FILE ) {
-                               $wgOut->addWikiText('Deletion and restoration of images temporarily disabled during maintenance.' );
+                               $wgOut->wrapWikiMsg( "<div class='error'>\n$1</div>\n", array( 'filedelete-maintenance' ) );
                                return;
                        }
                        return $this->undelete();
index e8416e0..82ca6ff 100644 (file)
@@ -2264,6 +2264,7 @@ The description on its [$2 file description page] there is shown below.',
 ** Copyright violation
 ** Duplicated file',
 'filedelete-edit-reasonlist'  => 'Edit delete reasons',
+'filedelete-maintenance'      => 'Deletion and restoration of files temporarily disabled during maintenance.',
 
 # MIME search
 'mimesearch'         => 'MIME search',
index 0d4b36f..cdf2ff9 100644 (file)
@@ -1386,6 +1386,7 @@ $wgMessageStructure = array(
                'filedelete-reason-otherlist',
                'filedelete-reason-dropdown',
                'filedelete-edit-reasonlist',
+               'filedelete-maintenance',
        ),
        'mimesearch' => array(
                'mimesearch',