Skip to content

Commit 37fccba

Browse files
author
Till Brehm
committed
Added a function to query the ispconfig version to the remote api.
1 parent ab4939d commit 37fccba

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,25 @@ public function server_get($session_id, $server_id, $section ='') {
154154
return false;
155155
}
156156
}
157+
158+
/**
159+
Gets the ISPconfig version of the server
160+
@param int session_id
161+
@author Sascha Bay <info@space2place.de> TheCry 2013
162+
*/
163+
public function server_get_app_version($session_id) {
164+
global $app;
165+
if(!$this->checkPerm($session_id, 'server_get')) {
166+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
167+
return false;
168+
}
169+
if (!empty($session_id)) {
170+
$ispc_app_version = array('ispc_app_version' => ISPC_APP_VERSION);
171+
return $ispc_app_version;
172+
} else {
173+
return false;
174+
}
175+
}
157176

158177
public function server_get_serverid_by_ip($session_id, $ipaddress)
159178
{

0 commit comments

Comments
 (0)