[Fusionforge-commits] r11721 - trunk/src/www/admin

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Wed Dec 8 09:18:29 CET 2010


Author: nerville
Date: 2010-12-08 09:18:29 +0100 (Wed, 08 Dec 2010)
New Revision: 11721

Modified:
   trunk/src/www/admin/pluginman.php
Log:
display broken plugin in production environment if they are already used

Modified: trunk/src/www/admin/pluginman.php
===================================================================
--- trunk/src/www/admin/pluginman.php	2010-12-07 20:27:13 UTC (rev 11720)
+++ trunk/src/www/admin/pluginman.php	2010-12-08 08:18:29 UTC (rev 11721)
@@ -216,7 +216,22 @@
 			if (forge_get_config('plugin_status', $filename) !== 'valid') {
 				$addPlugin = 0;
 			}
-			if (forge_get_config('installation_environment') === 'development') {
+			$used = false;
+			$res = db_query_params ('SELECT  u.user_name FROM plugins p, user_plugin up, users u WHERE p.plugin_name = $1 and up.user_id = u.user_id and p.plugin_id = up.plugin_id',
+				array($filename));
+			if ($res) {
+				if (db_numrows($res)>0) {
+					$used = true;
+				}
+			}
+			$res1 = db_query_params ('SELECT g.group_name FROM plugins p, group_plugin gp, groups g WHERE plugin_name = $1 and gp.group_id = g.group_id and p.plugin_id = gp.plugin_id',
+				array($filename));
+			if ($res1) {
+				if (db_numrows($res1)>0) {
+					$used = true;
+				}
+			}
+			if (forge_get_config('installation_environment') === 'development' || $used) {
 				$addPlugin = 1;
 			}
 			if ($addPlugin) {




More information about the Fusionforge-commits mailing list