Skip to content

Commit 10ec1b9

Browse files
author
mcramer
committed
- Moved server_get function to parent class because it is needed from inside some remoting classes
1 parent a678105 commit 10ec1b9

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

interface/lib/classes/remote.d/server.inc.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,6 @@ class remoting_server extends remoting {
4646
@param string section of the config field in the server table. Could be 'web', 'dns', 'mail', 'dns', 'cron', etc
4747
@author Julio Montoya <gugli100@gmail.com> BeezNest 2010
4848
*/
49-
public function server_get($session_id, $server_id, $section ='') {
50-
global $app;
51-
if(!$this->checkPerm($session_id, 'server_get')) {
52-
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
53-
return false;
54-
}
55-
if (!empty($session_id) && !empty($server_id)) {
56-
$app->uses('remoting_lib , getconf');
57-
$section_config = $app->getconf->get_server_config($server_id,$section);
58-
return $section_config;
59-
} else {
60-
return false;
61-
}
62-
}
6349

6450
public function server_get_serverid_by_ip($session_id, $ipaddress)
6551
{

interface/lib/classes/remoting.inc.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,21 @@ protected function getSession($session_id)
420420
}
421421
}
422422

423+
// needed from inside the remoting plugins
424+
public function server_get($session_id, $server_id, $section ='') {
425+
global $app;
426+
if(!$this->checkPerm($session_id, 'server_get')) {
427+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
428+
return false;
429+
}
430+
if (!empty($session_id) && !empty($server_id)) {
431+
$app->uses('remoting_lib , getconf');
432+
$section_config = $app->getconf->get_server_config($server_id,$section);
433+
return $section_config;
434+
} else {
435+
return false;
436+
}
437+
}
423438

424439
/**
425440
* Get a list of functions

0 commit comments

Comments
 (0)