From d6aeed5d872948a404bc921d618a3c199e63c694 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Sat, 12 Sep 2009 08:25:54 +0000 Subject: [PATCH] Follow-up r56215: Replace hardcoded text with a new message. Replace "images" with the generic "files" Wrap message into a div with class=error Add it to RELEASE-NOTES --- RELEASE-NOTES | 2 ++ includes/DefaultSettings.php | 4 +++- includes/ImagePage.php | 2 +- includes/specials/SpecialUndelete.php | 2 +- languages/messages/MessagesEn.php | 1 + maintenance/language/messages.inc | 1 + 6 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8b7a350734..bca796633f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index d390da5462..a32795605d 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4223,5 +4223,7 @@ $wgMemoryLimit = "50M"; */ $wgUseAJAXCategories = false; -// to disable image delete/restore temporarily +/** + * To disable file delete/restore temporarily + */ $wgUploadMaintenance = false; diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 40e39c4960..f3d8b706b1 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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( "
\n$1
\n", array( 'filedelete-maintenance' ) ); return; } diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 7a797737d3..d1c37b39c4 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -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( "
\n$1
\n", array( 'filedelete-maintenance' ) ); return; } return $this->undelete(); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index e8416e0782..82ca6fffc0 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 0d4b36f6cd..cdf2ff9bcd 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1386,6 +1386,7 @@ $wgMessageStructure = array( 'filedelete-reason-otherlist', 'filedelete-reason-dropdown', 'filedelete-edit-reasonlist', + 'filedelete-maintenance', ), 'mimesearch' => array( 'mimesearch', -- 2.20.1