Ticket #1243: at-least-one.patch

File at-least-one.patch, 0.7 kB (added by Cube, 2 months ago)

This patch is to fix the problems when unchecking both (new language variable)

  • gui/client/add_mail_acc.php

    old new  
    371371function check_mail_acc_data(&$sql, $dmn_id, $dmn_name) { 
    372372          $mail_type_normal = isset($_POST['mail_type_normal']) ? $_POST['mail_type_normal'] : false; 
    373373          $mail_type_forward = isset($_POST['mail_type_forward']) ? $_POST['mail_type_forward'] : false; 
     374           
     375    if ($mail_type_normal==false && $mail_type_forward==false) { 
     376        set_page_message(tr('Please select at least one mail type!')); 
     377        return; 
     378    }   
    374379            
    375380    if ($mail_type_normal) { 
    376381        $pass = escapeshellcmd($_POST['pass']);