Skip to content
Snippets Groups Projects
Commit 2d6dac4d authored by tbrehm's avatar tbrehm
Browse files

Implemented: FS#1216 - Add a server_get function to remoting class

parent 44641656
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,29 @@ class remoting {
return ($app->db->affectedRows() == 1);
}
// Get server details
/**
Gets the server configuration
@param int session id
@param int server id
@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>
*/
public function server_get($session_id, $server_id, $section ='') {
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) && !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 mail domain details
public function mail_domain_get($session_id, $primary_id)
{
......
......@@ -50,6 +50,7 @@ $function_list['mail_blacklist_get,mail_blacklist_add,mail_blacklist_update,mail
$function_list['mail_user_filter_get,mail_user_filter_add,mail_user_filter_update,mail_user_filter_delete'] = 'Mail user filter functions';
$function_list['mail_filter_get,mail_filter_add,mail_filter_update,mail_filter_delete'] = 'Mail filter functions';
$function_list['client_get,client_add,client_update,client_delete'] = 'Client functions';
$function_list['server_get'] = 'Server functions';
$function_list['sites_cron_get,sites_cron_add,sites_cron_update,sites_cron_delete'] = 'Sites cron functions';
$function_list['sites_database_get,sites_database_add,sites_database_update,sites_database_delete'] = 'Sites database functions';
$function_list['sites_ftp_user_get,sites_ftp_user_add,sites_ftp_user_update,sites_ftp_user_delete'] = 'Sites FTP-User functions';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment