[Fusionforge-commits] r11629 - trunk/src/common/include

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Fri Nov 26 11:35:24 CET 2010


Author: nerville
Date: 2010-11-26 11:35:23 +0100 (Fri, 26 Nov 2010)
New Revision: 11629

Modified:
   trunk/src/common/include/Plugin.class.php
Log:
fix proper groupisactivecheckboxpost call: must return true

Modified: trunk/src/common/include/Plugin.class.php
===================================================================
--- trunk/src/common/include/Plugin.class.php	2010-11-26 10:33:19 UTC (rev 11628)
+++ trunk/src/common/include/Plugin.class.php	2010-11-26 10:35:23 UTC (rev 11629)
@@ -109,26 +109,26 @@
 	}
 
 	/**
-	 *  getGroups -  get a list of all groups using a plugin
+	 * getGroups -  get a list of all groups using a plugin
 	 *
-	 *  @return	array	array containing group ids
+	 * @return	array	array containing group ids
 	 */
 	function getGroups() {
-		$result = array () ;
+		$result = array() ;
 		$res = db_query_params ('SELECT group_plugin.group_id
-				           FROM group_plugin, plugins
-                                           WHERE group_plugin.plugin_id=plugins.plugin_id
-                                             AND plugins.plugin_name=$1
-                                         ORDER BY group_plugin.group_id ASC',
-					array ($this->name));
+					FROM group_plugin, plugins
+					WHERE group_plugin.plugin_id=plugins.plugin_id
+					AND plugins.plugin_name=$1
+					ORDER BY group_plugin.group_id ASC',
+					array($this->name));
 		$rows = db_numrows($res);
 		
 		for ($i=0; $i<$rows; $i++) {
 			$group_id = db_result($res,$i,'group_id');
-			$result[] = group_get_object ($group_id) ;
+			$result[] = group_get_object ($group_id);
 		}
 		
-		return $result ;
+		return $result;
 	}
 
 	function getThemePath(){
@@ -159,15 +159,19 @@
 		echo "</tr>";
 	}
 
-	function groupisactivecheckboxpost (&$params) {
+	/*
+	 * @return	bool	actually only true ...
+	 */
+	function groupisactivecheckboxpost(&$params) {
 		// this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
 		$group = group_get_object($params['group']);
 		$flag = strtolower('use_'.$this->name);
 		if ( getStringFromRequest($flag) == 1 ) {
-			$group->setPluginUse ( $this->name );
+			$group->setPluginUse($this->name);
 		} else {
-			$group->setPluginUse ( $this->name, false );
+			$group->setPluginUse($this->name, false);
 		}
+		return true;
 	}
 
 	function userisactivecheckbox (&$params) {




More information about the Fusionforge-commits mailing list