X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=philter%2Fphilter%2Finclude%2Femails.inc.php;h=1cc1eafe5b206ff6e869dc35044dbc34c806ef18;hb=0cff7bb626480c7502f06993a418c75d13afe3ce;hp=15935eb62b8358ccdd657653018cacb2ec2da1c2;hpb=4956445bb7da02adee93a10bcc6d038d1f676cb2;p=old-projects.git diff --git a/philter/philter/include/emails.inc.php b/philter/philter/include/emails.inc.php index 15935eb..1cc1eaf 100644 --- a/philter/philter/include/emails.inc.php +++ b/philter/philter/include/emails.inc.php @@ -99,8 +99,8 @@ class EmailPool { function to_form() { $res = "
\n" . "\n" - . "\n" - . " \n" + . "\n" + . " \n" . " \n" . "\n"; @@ -112,25 +112,28 @@ class EmailPool { . "\n" - . "\n" + . "\n" . "\n"; $pair = !$pair; } $res .= "
EmailActive
"._i18n('email').""._i18n('active')." 
\n" . " is_active() ? " checked=\"checked\"" : "")." />
\n" - . "
\n" - . " \n" - . " \n" - . "
\n" + . "
\n" + . " \n" + . " \n" + . "

\n" . "
\n"; - $val = 'your email ...'; + $val = _i18n('your_email'); $res .= "
\n" + . _i18n('pool_help2') . "\n" - . "\n" + . "\n" . "
\n"; return $res; @@ -183,13 +186,17 @@ class EmailPool { $philter->set_error($_POST['emails']['new']." is not a valid email"); return false; } - } elseif(!empty($_POST['emails']['del'])) { // delete one email + } elseif(isset($_POST['emails']['del']) && $_POST['emails']['del'] != -1) { // delete one email $del_id = $_POST['emails']['del']; // we compute a list of all actives emails $allow = false; - foreach($this->emails as $id=>$mail) - if($del_id!=$id && $mail->is_active()) + + foreach($this->emails as $id=>$mail) { + if($del_id!=$id && $mail->is_active()) { $allow = true; + break; + } + } if($allow && isset($this->emails[$del_id])) { list($count) = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM actions "