mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-27 15:59:29 +00:00
Can update group settings
This commit is contained in:
parent
91943a49ab
commit
39645de9ff
@ -151,6 +151,16 @@ class GroupsController {
|
|||||||
$settings = new GroupSettings();
|
$settings = new GroupSettings();
|
||||||
$settings->set_id($groupID);
|
$settings->set_id($groupID);
|
||||||
$settings->set_name(postString("name", 3));
|
$settings->set_name(postString("name", 3));
|
||||||
|
$settings->set_description(removeHTMLnodes(postString("description", 0)));
|
||||||
|
|
||||||
|
//Get group URL
|
||||||
|
$url = postString("url", 0);
|
||||||
|
if($url != ""){
|
||||||
|
if(!filter_var($url, FILTER_VALIDATE_URL))
|
||||||
|
Rest_fatal_error(401, "Invalid group URL!");
|
||||||
|
|
||||||
|
$settings->set_url($url);
|
||||||
|
}
|
||||||
|
|
||||||
//Get group visibility
|
//Get group visibility
|
||||||
$visiblity = postString("visibility", 3);
|
$visiblity = postString("visibility", 3);
|
||||||
|
@ -666,8 +666,14 @@ class GroupsComponent {
|
|||||||
if($settings->has_registration_level())
|
if($settings->has_registration_level())
|
||||||
$data["registration_level"] = $settings->get_registration_level();
|
$data["registration_level"] = $settings->get_registration_level();
|
||||||
|
|
||||||
if($settings->has_virtual_directory())
|
$data["virtual_directory"] =
|
||||||
$data["virtual_directory"] = $settings->get_virtual_directory();
|
$settings->has_virtual_directory() ? $settings->get_virtual_directory() : "";
|
||||||
|
|
||||||
|
$data["description"] =
|
||||||
|
$settings->has_description() ? $settings->get_description() : "";
|
||||||
|
|
||||||
|
$data["url"] =
|
||||||
|
$settings->has_url() ? $settings->get_url() : "";
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user