reset_password fix
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / eventz / delete_mail.inc
index f77910f942b7585d1912fe3d2aab744771e0b9cb..9cd462dc8469daf9991d258d6cc9c53ff220acdb 100644 (file)
@@ -3,6 +3,11 @@ function delete_mail() {
     global $node,$db,$error;
     $user_id = $_SESSION['user_id'];
     foreach ($_POST['message'] as $chosen =>$value) {
+
+       $mail_id = intval($mail_id);
+       if ($mail_id == 0)
+               continue;
+
         $set = $db->query("select mail_read,mail_to from mail where mail_id = '$chosen' and mail_from = '$user_id'");
         $set->next();
         if ($set->getString('mail_read') == 'no') {
@@ -12,4 +17,4 @@ function delete_mail() {
         $db->query("delete from mail where mail_id = '$chosen' and mail_user = '$user_id'");
     }
 }
-?>
\ No newline at end of file
+?>
This page took 0.135816 seconds and 4 git commands to generate.