[Fusionforge-commits] r7333 - trunk/gforge/www/soap

Olivier Meunier musicoliv at libremir.placard.fr.eu.org
Fri Apr 3 15:49:59 CEST 2009


Author: musicoliv
Date: 2009-04-03 15:49:59 +0200 (Fri, 03 Apr 2009)
New Revision: 7333

Modified:
   trunk/gforge/www/soap/index.php
Log:
Adds a soap function to get the version of the running server

Modified: trunk/gforge/www/soap/index.php
===================================================================
--- trunk/gforge/www/soap/index.php	2009-04-03 12:57:56 UTC (rev 7332)
+++ trunk/gforge/www/soap/index.php	2009-04-03 13:49:59 UTC (rev 7333)
@@ -5,6 +5,7 @@
 require_once '../env.inc.php';
 require_once $gfwww.'include/squal_pre.php';
 require_once $gfcommon.'include/gettext.php';
+require_once $gfcommon.'include/FusionForge.class.php';
 
 ini_set('memory_limit','32M');
 
@@ -78,6 +79,12 @@
 	$uri,
 	$uri.'#logout');
 
+$server->register(
+	'version',
+	array(),
+	array('versionResponse'=>'xsd:string'),
+	$uri,
+	$uri.'#version');
 //
 //	Include Group Functions
 //
@@ -126,7 +133,7 @@
 }
 */
 
-if ($wsdl) {
+if (isset($wsdl)) {
 	echo $wsdl_data;
 	return;
 }
@@ -173,8 +180,17 @@
 	session_logout();
    	return "OK";
 }
+i
+/**
+ * version - get the running version of FusionForge
+ * 
+ * @return	string 	the version of FusionForge running on the server
+ */
+function version() {
+	$ff = new FusionForge();
+	return $ff->software_version;
+}
 
-
 // 4. call the service method to initiate the transaction and send the response
 $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
 $server->service($HTTP_RAW_POST_DATA);




More information about the Fusionforge-commits mailing list