Browse code

cleanup+

Bernd Wurst authored on04/12/2019 17:00:28
Showing1 changed files
... ...
@@ -56,9 +56,7 @@ if ($_GET['action'] == 'new') {
56 56
     }
57 57
 
58 58
     create_list($_POST['listname'], $maildomain, $_POST['admin']);
59
-    if (! $debugmode) {
60
-        header('Location: lists');
61
-    }
59
+    redirect('lists');
62 60
 } elseif ($_GET['action'] == 'newpw') {
63 61
     $list = get_list($_GET['id']);
64 62
     $sure = user_is_sure();
... ...
@@ -66,13 +64,9 @@ if ($_GET['action'] == 'new') {
66 64
         are_you_sure('action=newpw&id='.$list['id'], 'Möchten Sie für die Mailingliste »<strong>'.$list['listname'].'</strong>@'.$list['fqdn'].'« ein neues Passwort anfordern? (Das neue Passwort wird dem Listenverwalter zugeschickt.)');
67 65
     } elseif ($sure === true) {
68 66
         request_new_password($list['id']);
69
-        if (! $debugmode) {
70
-            header('Location: lists');
71
-        }
67
+        redirect('lists');
72 68
     } elseif ($sure === false) {
73
-        if (! $debugmode) {
74
-            header('Location: lists');
75
-        }
69
+        redirect('lists');
76 70
     }
77 71
 } elseif ($_GET['action'] == 'delete') {
78 72
     $list = get_list($_GET['id']);
... ...
@@ -81,13 +75,9 @@ if ($_GET['action'] == 'new') {
81 75
         are_you_sure('action=delete&id='.$list['id'], 'Möchten Sie die Mailingliste »<strong>'.$list['listname'].'</strong>@'.$list['fqdn'].'« wirklich löschen?');
82 76
     } elseif ($sure === true) {
83 77
         delete_list($list['id']);
84
-        if (! $debugmode) {
85
-            header('Location: lists');
86
-        }
78
+        redirect('lists');
87 79
     } elseif ($sure === false) {
88
-        if (! $debugmode) {
89
-            header('Location: lists');
90
-        }
80
+        redirect('lists');
91 81
     }
92 82
 } else {
93 83
     system_failure('Function not implemented');