[Fusionforge-commits] r16096 - trunk/src/plugins/mediawiki/www

Olivier Berger olberger at fusionforge.org
Thu Aug 16 17:00:55 CEST 2012


Author: olberger
Date: 2012-08-16 17:00:55 +0200 (Thu, 16 Aug 2012)
New Revision: 16096

Modified:
   trunk/src/plugins/mediawiki/www/plugin_admin.php
Log:
Set incoming early and make sure to notify in case of write access problem

Modified: trunk/src/plugins/mediawiki/www/plugin_admin.php
===================================================================
--- trunk/src/plugins/mediawiki/www/plugin_admin.php	2012-08-16 15:00:46 UTC (rev 16095)
+++ trunk/src/plugins/mediawiki/www/plugin_admin.php	2012-08-16 15:00:55 UTC (rev 16096)
@@ -84,6 +84,15 @@
 $group_logo_url = util_make_url("/plugins/mediawiki/wiki/" .
     $group_unix_name . "/images/.wgLogo.png");
 
+$incoming = False;
+if (forge_get_config('use_manual_uploads')) {
+  $incoming = forge_get_config('groupdir_prefix')."/$group_unix_name/incoming";
+
+  if ( (! is_dir($incoming)) || (! opendir($incoming)) ) {
+    $error_msg = sprintf( _("Not a directory or could not access contents of %s"), $incoming);
+  }
+}
+
 /* 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.");




More information about the Fusionforge-commits mailing list