Commit 20fd2cce authored by Till Brehm's avatar Till Brehm
Browse files

Implemented #5375 Add WebDAV functions to remoting API

parent 2e3887d0
......@@ -1017,6 +1017,56 @@ class remoting_sites extends remoting {
return $app->quota_lib->get_databasequota_data($client_id, false);
}
// ----------------------------------------------------------------------------------------------------------
//* Get record details
public function sites_webdav_user_get($session_id, $primary_id)
{
global $app;
if(!$this->checkPerm($session_id, 'sites_webdav_user_get')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$app->uses('remoting_lib');
$app->remoting_lib->loadFormDef('../sites/form/webdav_user.tform.php');
return $app->remoting_lib->getDataRecord($primary_id);
}
//* Add a record
public function sites_webdav_user_add($session_id, $client_id, $params)
{
if(!$this->checkPerm($session_id, 'sites_webdav_user_add')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
return $this->insertQuery('../sites/form/webdav_user.tform.php', $client_id, $params);
}
//* Update a record
public function sites_webdav_user_update($session_id, $client_id, $primary_id, $params)
{
if(!$this->checkPerm($session_id, 'sites_webdav_user_update')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->updateQuery('../sites/form/webdav_user.tform.php', $client_id, $primary_id, $params);
return $affected_rows;
}
//* Delete a record
public function sites_webdav_user_delete($session_id, $primary_id)
{
global $app;
if(!$this->checkPerm($session_id, 'sites_webdav_user_delete')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
$affected_rows = $this->deleteQuery('../sites/form/webdav_user.tform.php', $primary_id);
return $affected_rows;
}
}
......
......@@ -9,4 +9,5 @@ $function_list['sites_web_domain_backup'] = 'Sites Backup functions';
$function_list['sites_web_aliasdomain_get,sites_web_aliasdomain_add,sites_web_aliasdomain_update,sites_web_aliasdomain_delete'] = 'Sites Aliasdomain functions';
$function_list['sites_web_subdomain_get,sites_web_subdomain_add,sites_web_subdomain_update,sites_web_subdomain_delete'] = 'Sites Subdomain functions';
$function_list['sites_aps_update_package_list,sites_aps_available_packages_list,sites_aps_change_package_status,sites_aps_install_package,sites_aps_get_package_details,sites_aps_get_package_file,sites_aps_get_package_settings,sites_aps_instance_get,sites_aps_instance_delete'] = 'Sites APS functions';
$function_list['sites_webdav_user_get,sites_webdav_user_add,sites_webdav_user_update,sites_webdav_user_delete'] = 'Sites WebDAV-User functions';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment