Ticket #1220: edit_mail_acc.php.patch
|
File edit_mail_acc.php.patch, 2.8 kB
(added by JCD, 4 months ago)
|
Diff of edit_mail_acc.php
|
-
edit_mail_acc.php
| old |
new |
|
| 85 | 85 | $res1 = exec_query($sql, "SELECT alias_name FROM domain_aliasses WHERE alias_id=?", array($sub_id)); |
|---|
| 86 | 86 | $tmp1 = $res1->FetchRow(0); |
|---|
| 87 | 87 | $maildomain = $tmp1['alias_name']; |
|---|
| 88 | | } elseif ($mail_type == MT_ALIAS_FORWARD) { |
|---|
| | 88 | } else if ($mail_type == MT_ALIAS_FORWARD) { |
|---|
| 89 | 89 | $mtype[] = 5; |
|---|
| 90 | 90 | $res1 = exec_query($sql, "SELECT alias_name FROM domain_aliasses WHERE alias_id=?", array($sub_id)); |
|---|
| 91 | 91 | $tmp1 = $res1->FetchRow(); |
|---|
| 92 | 92 | $maildomain = $tmp1['alias_name']; |
|---|
| 93 | | } elseif ($mail_type == MT_SUBDOM_MAIL) { |
|---|
| | 93 | } else if ($mail_type == MT_SUBDOM_MAIL) { |
|---|
| 94 | 94 | $mtype[] = 3; |
|---|
| 95 | 95 | $res1 = exec_query($sql, "SELECT subdomain_name FROM subdomain WHERE subdomain_id=?", array($sub_id)); |
|---|
| 96 | 96 | $tmp1 = $res1->FetchRow(); |
| … | … | |
| 98 | 98 | $res1 = exec_query($sql, "SELECT domain_name FROM domain WHERE domain_id=?", array($domain_id)); |
|---|
| 99 | 99 | $tmp1 = $res1->FetchRow(0); |
|---|
| 100 | 100 | $maildomain = $maildomain . "." . $tmp1['domain_name']; |
|---|
| 101 | | } elseif ($mail_type == MT_SUBDOM_FORWARD) { |
|---|
| | 101 | } else if ($mail_type == MT_SUBDOM_FORWARD) { |
|---|
| 102 | 102 | $mtype[] = 6; |
|---|
| 103 | 103 | $res1 = exec_query($sql, "SELECT subdomain_name FROM subdomain WHERE subdomain_id=?", array($sub_id)); |
|---|
| 104 | 104 | $tmp1 = $res1->FetchRow(); |
| … | … | |
| 109 | 109 | } |
|---|
| 110 | 110 | } |
|---|
| 111 | 111 | |
|---|
| 112 | | $mail_forward = $rs->fields['mail_forward']; |
|---|
| 113 | | |
|---|
| 114 | 112 | if (isset($_POST['forward_list'])) { |
|---|
| 115 | 113 | $mail_forward = clean_input($_POST['forward_list']); |
|---|
| 116 | 114 | } |
| … | … | |
| 125 | 123 | 'MAIL_ID' => $mail_id |
|---|
| 126 | 124 | ) |
|---|
| 127 | 125 | ); |
|---|
| | 126 | |
|---|
| 128 | 127 | if (($mail_forward !== '_no_') && (count($mtype) > 1)) { |
|---|
| 129 | 128 | $tpl->assign( |
|---|
| 130 | 129 | array( |
|---|
| 131 | 130 | 'ACTION' => 'update_pass,update_forward', |
|---|
| 132 | 131 | 'FORWARD_MAIL' => '', |
|---|
| 133 | | 'FORWARD_MAIL_CHECKED' => 'checked="checked"' |
|---|
| | 132 | 'FORWARD_MAIL_CHECKED' => 'checked="checked"', |
|---|
| | 133 | 'FORWARD_LIST_DISABLED' => 'false' |
|---|
| 134 | 134 | ) |
|---|
| 135 | 135 | ); |
|---|
| 136 | 136 | $tpl->parse('NORMAL_MAIL', '.normal_mail'); |
| … | … | |
| 141 | 141 | 'FORWARD_MAIL' => '', |
|---|
| 142 | 142 | 'FORWARD_MAIL_CHECKED' => '', |
|---|
| 143 | 143 | 'FORWARD_LIST' => '', |
|---|
| 144 | | 'FORWARD_LIST_ENABLED' => 'disabled="disabled"' |
|---|
| | 144 | 'FORWARD_LIST_DISABLED' => 'true' |
|---|
| 145 | 145 | ) |
|---|
| 146 | 146 | ); |
|---|
| 147 | 147 | $tpl->parse('NORMAL_MAIL', '.normal_mail'); |
| … | … | |
| 149 | 149 | $tpl->assign( |
|---|
| 150 | 150 | array( |
|---|
| 151 | 151 | 'ACTION' => 'update_forward', |
|---|
| 152 | | 'NORMAL_MAIL' => '' |
|---|
| | 152 | 'NORMAL_MAIL' => '', |
|---|
| | 153 | 'FORWARD_LIST_DISABLED' => 'false' |
|---|
| 153 | 154 | ) |
|---|
| 154 | 155 | ); |
|---|
| 155 | 156 | $tpl->parse('FORWARD_MAIL', '.forward_mail'); |
| … | … | |
| 176 | 177 | $mail_id = $_GET['id']; |
|---|
| 177 | 178 | $mail_account = clean_input($_POST['mail_account']); |
|---|
| 178 | 179 | |
|---|
| 179 | | if ($pass === '' || $pass_rep === '' || $mail_id === '' || !is_numeric($mail_id)) { |
|---|
| | 180 | if (trim($pass) === '' || trim($pass_rep) === '' || $mail_id === '' || !is_numeric($mail_id)) { |
|---|
| 180 | 181 | set_page_message(tr('Missing or wrong data!')); |
|---|
| 181 | 182 | return; |
|---|
| 182 | 183 | } else if ($pass !== $pass_rep) { |
|
Download in other formats:
#########################################################################
# Site footer - Contents are automatically inserted after main Trac HTML
?>