Merge pull request #5346 from astifter/redirect_empty_group_to_contacts
authorHypolite Petovan <mrpetovan@eml.cc>
Mon, 9 Jul 2018 12:26:39 +0000 (08:26 -0400)
committerGitHub <noreply@github.com>
Mon, 9 Jul 2018 12:26:39 +0000 (08:26 -0400)
Redirect empty group to /contacts.

mod/group.php

index 726616a..331b694 100644 (file)
@@ -85,6 +85,10 @@ function group_content(App $a) {
        }
 
        // Switch to text mode interface if we have more than 'n' contacts or group members
+       
+       if ($a->argc == 1) {
+               goaway(System::baseUrl() . '/contacts');
+       }
 
        $switchtotext = PConfig::get(local_user(), 'system', 'groupedit_image_limit');
        if (is_null($switchtotext)) {