From 201a3fc97836ba63d6544af8d08d211282585e09 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 10 Jul 2008 21:53:14 +0000 Subject: [PATCH] Revert 37530 -- removes the control option for image moving --- RELEASE-NOTES | 2 +- includes/DefaultSettings.php | 3 +++ includes/Namespace.php | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6e894b7ac6..b95022e587 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -129,7 +129,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN and local one * Update documentation links in auto-generated LocalSettings.php * (bug 13584) The new hook SkinTemplateToolboxEnd was added. -* (bug 709) Cannot rename/move images and other media files +* (bug 709) Cannot rename/move images and other media files [EXPERIMENTAL] * Custom rollback summaries now accept the same arguments as the default message * (bug 12542) Added hooks for expansion of Special:Listusers * Drop-down AJAX search suggestions (turn on $wgEnableMWSuggest) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b7de276ae4..cc49ba6f34 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1550,6 +1550,9 @@ $wgAllowExternalImages = false; */ $wgAllowExternalImagesFrom = ''; +/** Allows to move images and other media files. Experemintal, not sure if it always works */ +$wgAllowImageMoving = false; + /** Disable database-intensive features */ $wgMiserMode = false; /** Disable all query pages if miser mode is on, not just some */ diff --git a/includes/Namespace.php b/includes/Namespace.php index 8dd52b9b31..7c7b7dedd3 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -52,7 +52,8 @@ class MWNamespace { * @return bool */ public static function isMovable( $index ) { - return !( $index < NS_MAIN || $index == NS_CATEGORY ); + global $wgAllowImageMoving; + return !( $index < NS_MAIN || ($index == NS_IMAGE && !$wgAllowImageMoving) || $index == NS_CATEGORY ); } /** -- 2.20.1