[Fusionforge-commits] r16136 - in branches: Branch_5_2/src/debian Branch_5_2/src/plugins/mediawiki/www wheezy/debian wheezy/plugins/mediawiki/www

Thorsten Glaser mirabilos at fusionforge.org
Fri Aug 24 10:43:48 CEST 2012


Author: mirabilos
Date: 2012-08-24 10:43:47 +0200 (Fri, 24 Aug 2012)
New Revision: 16136

Modified:
   branches/Branch_5_2/src/debian/changelog
   branches/Branch_5_2/src/plugins/mediawiki/www/plugin_admin.php
   branches/wheezy/debian/changelog
   branches/wheezy/plugins/mediawiki/www/plugin_admin.php
Log:
Check image upload is enabled before trying to do so (Closes: #679521)

Modified: branches/Branch_5_2/src/debian/changelog
===================================================================
--- branches/Branch_5_2/src/debian/changelog	2012-08-23 18:36:21 UTC (rev 16135)
+++ branches/Branch_5_2/src/debian/changelog	2012-08-24 08:43:47 UTC (rev 16136)
@@ -14,8 +14,9 @@
   [ Thorsten Glaser ]
   * Merge fusionforge (5.2~rc1wheezy1~exp1) experimental upload
   * Move wikis to new (as of 2010-03-19, possibly by accident) data path
+  * Check image upload is enabled before trying to do so (Closes: #679521)
 
- -- Thorsten Glaser <tg at mirbsd.de>  Thu, 16 Aug 2012 11:50:00 +0200
+ -- Thorsten Glaser <tg at mirbsd.de>  Fri, 24 Aug 2012 10:43:04 +0200
 
 fusionforge (5.2~rc1wheezy1~exp1) experimental; urgency=low
 

Modified: branches/Branch_5_2/src/plugins/mediawiki/www/plugin_admin.php
===================================================================
--- branches/Branch_5_2/src/plugins/mediawiki/www/plugin_admin.php	2012-08-23 18:36:21 UTC (rev 16135)
+++ branches/Branch_5_2/src/plugins/mediawiki/www/plugin_admin.php	2012-08-24 08:43:47 UTC (rev 16136)
@@ -2,7 +2,7 @@
 /*-
  * MediaWiki Plugin for FusionForge
  *
- * Copyright © 2010
+ * Copyright © 2010, 2012
  *      Thorsten Glaser <t.glaser at tarent.de>
  * Copyright 2012, Franck Villaume - TrivialDev
  * All rights reserved.
@@ -83,11 +83,6 @@
 $group_logo_url = util_make_url("/plugins/mediawiki/wiki/" .
     $group_unix_name . "/images/.wgLogo.png");
 
-/* As the cronjob creates images subdirs in project data only if the uploads are enabled, there are chances the upload may fail */
-if (! forge_get_config('enable_uploads', 'mediawiki')) {
-  $error_msg .= _("Mediawiki plugin's configuration may require to enable uploads ('enable_uploads'). Contact your admin.");
-}
-
 if (getStringFromRequest("logo_submit")) {
 	$userfile = getUploadedFile('userfile');
 	$userfile_name = $userfile['name'];
@@ -156,6 +151,15 @@
        util_make_url("/plugins/mediawiki/dumps/" . $group_unix_name . ".xml"));
 echo "</p>\n";
 
+if (!forge_get_config('enable_uploads', 'mediawiki')) {
+	echo "<h2>Disabled: \$wgLogo</h2>\n";
+	echo '<p>' .
+	    _('Custom per-project logos require that the "enable_uploads" setting in the [mediawiki] section of your FusionForge configuration is enabled.') .
+	    "</p>\n";
+	site_project_footer(array());
+	exit(0);
+}
+
 echo "<h2>\$wgLogo</h2>\n";
 echo '<div style="border:solid 1px black; margin:3px; padding:3px;">';
 if (file_exists($group_logo)) {

Modified: branches/wheezy/debian/changelog
===================================================================
--- branches/wheezy/debian/changelog	2012-08-23 18:36:21 UTC (rev 16135)
+++ branches/wheezy/debian/changelog	2012-08-24 08:43:47 UTC (rev 16136)
@@ -8,8 +8,9 @@
   * Integrate with MediaWiki 1.19 (Closes: #679932)
   * Update versioned Depends on MediaWiki
   * Move wikis to new (as of 2010-03-19, possibly by accident) data path
+  * Check image upload is enabled before trying to do so (Closes: #679521)
 
- -- Thorsten Glaser <tg at mirbsd.de>  Thu, 16 Aug 2012 11:47:59 +0200
+ -- Thorsten Glaser <tg at mirbsd.de>  Fri, 24 Aug 2012 10:41:57 +0200
 
 fusionforge (5.2~rc1-5) unstable; urgency=low
 

Modified: branches/wheezy/plugins/mediawiki/www/plugin_admin.php
===================================================================
--- branches/wheezy/plugins/mediawiki/www/plugin_admin.php	2012-08-23 18:36:21 UTC (rev 16135)
+++ branches/wheezy/plugins/mediawiki/www/plugin_admin.php	2012-08-24 08:43:47 UTC (rev 16136)
@@ -2,7 +2,7 @@
 /*-
  * MediaWiki Plugin for FusionForge
  *
- * Copyright © 2010
+ * Copyright © 2010, 2012
  *      Thorsten Glaser <t.glaser at tarent.de>
  * Copyright 2012, Franck Villaume - TrivialDev
  * All rights reserved.
@@ -151,6 +151,15 @@
        util_make_url("/plugins/mediawiki/dumps/" . $group_unix_name . ".xml"));
 echo "</p>\n";
 
+if (!forge_get_config('enable_uploads', 'mediawiki')) {
+	echo "<h2>Disabled: \$wgLogo</h2>\n";
+	echo '<p>' .
+	    _('Custom per-project logos require that the "enable_uploads" setting in the [mediawiki] section of your FusionForge configuration is enabled.') .
+	    "</p>\n";
+	site_project_footer(array());
+	exit(0);
+}
+
 echo "<h2>\$wgLogo</h2>\n";
 echo '<div style="border:solid 1px black; margin:3px; padding:3px;">';
 if (file_exists($group_logo)) {




More information about the Fusionforge-commits mailing list