mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Can update posts creation level of a group
This commit is contained in:
parent
18c5f2e64c
commit
fd1b08b74c
@ -184,6 +184,13 @@ class GroupsController {
|
||||
Reset_fatal_error(400, "Unrecognized group registration level!");
|
||||
$settings->set_registration_level($levels[$registration_level]);
|
||||
|
||||
//Get group posts creation levels
|
||||
$postsLevel = postString("posts_level", 3);
|
||||
$levels = array_flip(self::GROUPS_POSTS_LEVELS);
|
||||
if(!isset($levels[$postsLevel]))
|
||||
Rest_fatal_error(400, "Unrecognized group posts level!");
|
||||
$settings->set_posts_level($levels[$postsLevel]);
|
||||
|
||||
//Get and check group virtual directory
|
||||
$virtualDirectory = postString("virtual_directory", 0);
|
||||
if($virtualDirectory != ""){
|
||||
|
@ -667,6 +667,9 @@ class GroupsComponent {
|
||||
if($settings->has_registration_level())
|
||||
$data["registration_level"] = $settings->get_registration_level();
|
||||
|
||||
if($settings->has_posts_level())
|
||||
$data["posts_level"] = $settings->get_posts_level();
|
||||
|
||||
$data["virtual_directory"] =
|
||||
$settings->has_virtual_directory() ? $settings->get_virtual_directory() : "";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user