[Fusionforge-commits] r12567 - trunk/src/plugins/mantisbt/common

Franck VILLAUME nerville at fusionforge.org
Fri Mar 4 16:07:03 CET 2011


Author: nerville
Date: 2011-03-04 16:07:01 +0100 (Fri, 04 Mar 2011)
New Revision: 12567

Modified:
   trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
Log:
fix group_update hook

Modified: trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
===================================================================
--- trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-03-04 14:06:53 UTC (rev 12566)
+++ trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-03-04 15:07:01 UTC (rev 12567)
@@ -252,6 +252,7 @@
 	function updateProjectMantis($groupId, $groupName, $groupIspublic) {
 		$groupObject = group_get_object($groupId);
 		$projet = array();
+		$localMantisbtConf = $this->getMantisBTConf();
 		$project['name'] = $groupName;
 		$project['status'] = "development";
 
@@ -262,13 +263,10 @@
 			$project['view_state'] = 50;
 		}
 
-
-		$idMantisbt = getIdProjetMantis($groupId);
-
-		if ($idMantisbt) {
+		if ($localMantisbtConf['id_mantisbt'] != 0) {
 			try {
-				$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
-				$update = $clientSOAP->__soapCall('mc_project_update', array("username" => forge_get_config('adminsoap_user','mantisbt'), "password" => forge_get_config('adminsoap_password','mantisbt'), "project_id" => $idMantisbt, "project" => $project));;
+				$clientSOAP = new SoapClient($localMantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+				$update = $clientSOAP->__soapCall('mc_project_update', array("username" => $localMantisbtConf['soap_user'], "password" => $localMantisbtConf['soap_password'], "project_id" => $localMantisbtConf['id_mantisbt'], "project" => $project));
 			} catch (SoapFault $soapFault) {
 				$groupObject->setError('updateProjectMantis::Error' . ' '. $soapFault->faultstring);
 				return false;




More information about the Fusionforge-commits mailing list