From 37fccba89cabf318ea8b88bb48e2ca55ac855d6f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 30 Dec 2013 18:32:19 +0100
Subject: [PATCH] Added a function to query the ispconfig version to the remote
 api.

---
 interface/lib/classes/remoting.inc.php | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 0ae01d7093..a9af3e382a 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -154,6 +154,25 @@ class remoting {
 			return false;
 		}
 	}
+	
+	/**
+	Gets the ISPconfig version of the server
+	@param int session_id
+	@author Sascha Bay <info@space2place.de> TheCry 2013
+	*/
+	public function server_get_app_version($session_id) {
+		global $app;
+		if(!$this->checkPerm($session_id, 'server_get')) {
+			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+			return false;
+		}
+		if (!empty($session_id)) { 
+			$ispc_app_version = array('ispc_app_version' => ISPC_APP_VERSION);
+			return $ispc_app_version;
+		} else {
+			return false;
+		}
+	}
 
 	public function server_get_serverid_by_ip($session_id, $ipaddress)
 	{
-- 
GitLab