[Fusionforge-commits] r12686 - branches/Branch_5_1/src/common/include

Alain Peyrat aljeux at fusionforge.org
Fri Mar 11 18:09:07 CET 2011


Author: aljeux
Date: 2011-03-11 18:09:07 +0100 (Fri, 11 Mar 2011)
New Revision: 12686

Modified:
   branches/Branch_5_1/src/common/include/Plugin.class.php
Log:
Use getIntFromRequest for integers

Modified: branches/Branch_5_1/src/common/include/Plugin.class.php
===================================================================
--- branches/Branch_5_1/src/common/include/Plugin.class.php	2011-03-11 17:08:57 UTC (rev 12685)
+++ branches/Branch_5_1/src/common/include/Plugin.class.php	2011-03-11 17:09:07 UTC (rev 12686)
@@ -3,6 +3,7 @@
  * FusionForge plugin system
  *
  * Copyright 2002, Roland Mas
+ * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
  *
  * This file is part of FusionForge.
  *
@@ -233,11 +234,12 @@
 		// 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 ) {
+		if ( getIntFromRequest($flag) == 1 ) {
 			$group->setPluginUse ( $this->name );
 		} else {
 			$group->setPluginUse ( $this->name, false );
 		}
+		return true;
 	}
 
 	function userisactivecheckbox (&$params) {
@@ -261,7 +263,7 @@
 		// this code actually activates/deactivates the plugin after the form was submitted in the user account manteinance page
 		$user = $params['user'];
 		$flag = strtolower('use_'.$this->name);
-		if ( getStringFromRequest($flag) == 1 ) {
+		if (getIntFromRequest($flag) == 1) {
 			$user->setPluginUse ( $this->name );
 		} else {
 			$user->setPluginUse ( $this->name, false );




More information about the Fusionforge-commits mailing list