bernd

bernd commited on 2008-02-02 11:19:57
Zeige 3 geänderte Dateien mit 5 Einfügungen und 2 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@927 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -17,7 +17,7 @@ output('<h3>E-Mail-Accounts</h3>
17 17
         foreach ($accounts as $account)
18 18
         {
19 19
             output('<tr>
20
-            <td>'.internal_link('edit.php', $account['local'].'@'.$account['domain'], 'id='.$account['id']).'</td>
20
+            <td>'.internal_link('edit.php', $account['local'].'@'.$account['domainname'], 'id='.$account['id']).'</td>
21 21
             <td><a href="save.php?action=delete&amp;id='.$account['id'].'">löschen</a></td></tr>');
22 22
         }
23 23
         output('</table>
... ...
@@ -45,7 +45,7 @@ function get_account_details($id)
45 45
 function get_vmail_accounts()
46 46
 {
47 47
 	$uid = (int) $_SESSION['userinfo']['uid'];
48
-	$result = db_query("SELECT * from mail.v_virtual_mail WHERE useraccount='{$uid}'");
48
+	$result = db_query("SELECT * from mail.v_vmail_accounts WHERE useraccount='{$uid}'");
49 49
 	$ret = array();
50 50
 	while ($line = mysql_fetch_assoc($result))
51 51
 	{
... ...
@@ -201,6 +201,7 @@ function save_vmail_account($account)
201 201
     $query .= "WHERE id={$id} LIMIT 1;";
202 202
   }
203 203
   db_query($query); 
204
+  if ($id)
204 205
     db_query("DELETE FROM mail.vmail_forward WHERE account={$id}");
205 206
   if (count($account['forwards']) > 0)
206 207
   {
... ...
@@ -33,6 +33,8 @@ if ($_GET['action'] == 'edit')
33 33
     {
34 34
       if (! isset($_POST['forward_to_'.$num]))
35 35
         break;
36
+      if ($_POST['forward_to_'.$num] == '')
37
+        break;
36 38
       $fwd = array("spamfilter" => $_POST['spamfilter_action_'.$num], "destination" => $_POST['forward_to_'.$num]);
37 39
       array_push($account['forwards'], $fwd);
38 40
       $num++;
39 41