http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56221
Revision: 56221
Author: raymond
Date: 2009-09-12 08:25:54 +0000 (Sat, 12 Sep 2009)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES
trunk/phase3/includes/DefaultSettings.php
trunk/phase3/includes/ImagePage.php
trunk/phase3/includes/specials/SpecialUndelete.php
trunk/phase3/languages/messages/MessagesEn.php
trunk/phase3/maintenance/language/messages.inc
Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES 2009-09-12 04:46:11 UTC (rev 56220)
+++ trunk/phase3/RELEASE-NOTES 2009-09-12 08:25:54 UTC (rev 56221)
@@ -85,6 +85,8 @@
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 ===
Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php 2009-09-12 04:46:11 UTC (rev
56220)
+++ trunk/phase3/includes/DefaultSettings.php 2009-09-12 08:25:54 UTC (rev
56221)
@@ -4223,5 +4223,7 @@
*/
$wgUseAJAXCategories = false;
-// to disable image delete/restore temporarily
+/**
+ * To disable file delete/restore temporarily
+ */
$wgUploadMaintenance = false;
Modified: trunk/phase3/includes/ImagePage.php
===================================================================
--- trunk/phase3/includes/ImagePage.php 2009-09-12 04:46:11 UTC (rev 56220)
+++ trunk/phase3/includes/ImagePage.php 2009-09-12 08:25:54 UTC (rev 56221)
@@ -723,7 +723,7 @@
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;
}
Modified: trunk/phase3/includes/specials/SpecialUndelete.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUndelete.php 2009-09-12 04:46:11 UTC
(rev 56220)
+++ trunk/phase3/includes/specials/SpecialUndelete.php 2009-09-12 08:25:54 UTC
(rev 56221)
@@ -648,7 +648,7 @@
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();
Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php 2009-09-12 04:46:11 UTC
(rev 56220)
+++ trunk/phase3/languages/messages/MessagesEn.php 2009-09-12 08:25:54 UTC
(rev 56221)
@@ -2264,6 +2264,7 @@
** 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',
Modified: trunk/phase3/maintenance/language/messages.inc
===================================================================
--- trunk/phase3/maintenance/language/messages.inc 2009-09-12 04:46:11 UTC
(rev 56220)
+++ trunk/phase3/maintenance/language/messages.inc 2009-09-12 08:25:54 UTC
(rev 56221)
@@ -1386,6 +1386,7 @@
'filedelete-reason-otherlist',
'filedelete-reason-dropdown',
'filedelete-edit-reasonlist',
+ 'filedelete-maintenance',
),
'mimesearch' => array(
'mimesearch',
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs