File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
interface/lib/classes/remote.d Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -236,15 +236,21 @@ public function server_get_functions($session_id, $server_id)
236236 }
237237 }
238238
239- public function server_get_app_version ($ session_id )
239+ public function server_get_app_version ($ session_id, $ server_id = 0 )
240240 {
241241 global $ app ;
242242 if (!$ this ->checkPerm ($ session_id , 'server_get ' )) {
243243 throw new SoapFault ('permission_denied ' , 'You do not have the permissions to access this function. ' );
244244 return false ;
245245 }
246246 if (!empty ($ session_id )) {
247- $ ispc_app_version = array ('ispc_app_version ' => ISPC_APP_VERSION );
247+ if ($ server_id === 0 ) $ ispc_app_version = array ('ispc_app_version ' => ISPC_APP_VERSION );
248+ else {
249+ $ rec = $ app ->db ->queryOneRecord ("SELECT data FROM monitor_data WHERE type = 'ispc_info' AND server_id = ? " , $ server_id );
250+ $ rec = unserialize ($ rec ['data ' ]);
251+ $ ispc_app_version = array ('ispc_app_version ' => $ rec ['version ' ]);
252+ unset($ rec );
253+ }
248254 return $ ispc_app_version ;
249255 } else {
250256 return false ;
You can’t perform that action at this time.
0 commit comments