Ignore:
Timestamp:
Mar 5, 2008, 2:50:08 AM (16 years ago)
Author:
rvelices
Message:
  • admin comments, configuration, element_set_global, element_set_unit, thumbnail and double_select migration to smarty
  • fix in redirect.tpl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/notification_by_mail.php

    r2226 r2249  
    690690
    691691    $data_users = get_user_notifications('subscribe');
     692   
     693    $opt_true=array();
     694    $opt_true_selected=array();
     695    $opt_false=array();
     696    $opt_false_selected=array();
    692697    foreach ($data_users as $nbm_user)
    693698    {
    694       $template->assign_block_vars(
    695         (get_boolean($nbm_user['enabled']) ? 'category_option_true' : 'category_option_false'),
    696         array('SELECTED' => ( // Keep selected user where enabled are not changed when change has been notify
    697                               get_boolean($nbm_user['enabled']) ? (isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true']))
    698                                                                 : (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false']))
    699                             ) ? 'selected="selected"' : '',
    700               'VALUE' => $nbm_user['check_key'],
    701               'OPTION' => $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']'
    702           ));
    703     }
    704 
     699      if ( get_boolean($nbm_user['enabled']) )
     700      {
     701        $opt_true[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']';
     702        if ((isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true'])) )
     703        {
     704          $opt_true_selected[] = $nbm_user['check_key'];
     705        }
     706      }
     707      else
     708      {
     709        $opt_false[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']';
     710        if (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false']))
     711        {
     712          $opt_false_selected[] = $nbm_user['check_key'];
     713        }
     714      }
     715    }
     716    $template->assign( array(
     717        'category_option_true'          => $opt_true,
     718        'category_option_true_selected' => $opt_true_selected,
     719        'category_option_false'         => $opt_false,
     720        'category_option_true'          => $opt_false_selected,
     721        )
     722    );
    705723    break;
    706724  }
Note: See TracChangeset for help on using the changeset viewer.