[Fusionforge-commits] r11617 - trunk/src/www/project/admin

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Thu Nov 25 23:29:31 CET 2010


Author: nerville
Date: 2010-11-25 23:29:30 +0100 (Thu, 25 Nov 2010)
New Revision: 11617

Modified:
   trunk/src/www/project/admin/tools.php
Log:
deal correctly with plugin_hook

Modified: trunk/src/www/project/admin/tools.php
===================================================================
--- trunk/src/www/project/admin/tools.php	2010-11-25 22:21:50 UTC (rev 11616)
+++ trunk/src/www/project/admin/tools.php	2010-11-25 22:29:30 UTC (rev 11617)
@@ -81,18 +81,27 @@
 		$tags,
 		$group->isPublic()
 	);
-	
-	//100 $logo_image_id
-
 	if (!$res) {
 		$error_msg = $group->getErrorMessage();
 	} else {
+		// This is done so plugins can enable/disable themselves from the project
+		$hookParams['group']=$group_id;
+		if (!plugin_hook("groupisactivecheckboxpost",$hookParams)) {
+			if ($group->isError()) {
+				$error_msg = $group->getErrorMessage();
+				$group->clearError();
+			} else {
+				$error_msg = _('At least one plugin does not initialize correctly');
+			}
+		}
+
+
+	}
+
+	if (empty($error_msg)) {
 		$feedback = _('Project information updated');
 	}
 
-	// This is done so plugins can enable/disable themselves from the project
-	$hookParams['group']=$group_id;
-	plugin_hook("groupisactivecheckboxpost",$hookParams);
 }
 
 project_admin_header(array('title'=>_('Tools'),'group'=>$group->getID()));




More information about the Fusionforge-commits mailing list