mcramer
2013-08-30 10ec1b929c69ef9367dad6a41430e7f64555a7fe
- Moved server_get function to parent class because it is needed from inside some remoting classes

2 files modified
29 ■■■■ changed files
interface/lib/classes/remote.d/server.inc.php 14 ●●●●● patch | view | raw | blame | history
interface/lib/classes/remoting.inc.php 15 ●●●●● patch | view | raw | blame | history
interface/lib/classes/remote.d/server.inc.php
@@ -46,20 +46,6 @@
        @param string  section of the config field in the server table. Could be 'web', 'dns', 'mail', 'dns', 'cron', etc
        @author Julio Montoya <gugli100@gmail.com> BeezNest 2010
    */
    public function server_get($session_id, $server_id, $section ='') {
        global $app;
        if(!$this->checkPerm($session_id, 'server_get')) {
            throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        if (!empty($session_id) && !empty($server_id)) {
            $app->uses('remoting_lib , getconf');
            $section_config =  $app->getconf->get_server_config($server_id,$section);
            return $section_config;
        } else {
            return false;
        }
    }
    
    public function server_get_serverid_by_ip($session_id, $ipaddress)
    {
interface/lib/classes/remoting.inc.php
@@ -420,6 +420,21 @@
        }
    }
    
    // needed from inside the remoting plugins
    public function server_get($session_id, $server_id, $section ='') {
        global $app;
        if(!$this->checkPerm($session_id, 'server_get')) {
            throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
            return false;
        }
        if (!empty($session_id) && !empty($server_id)) {
            $app->uses('remoting_lib , getconf');
            $section_config =  $app->getconf->get_server_config($server_id,$section);
            return $section_config;
        } else {
            return false;
        }
    }
    
    /**
       * Get a list of functions