diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-05 01:50:08 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-05 01:50:08 +0000 |
commit | 152d07d752a6da15518d22deed573e1d26b8193c (patch) | |
tree | a8d2b4c75c4eade36a08112d984240e36ab0525a /admin/notification_by_mail.php | |
parent | 925f581f2864cbb35cdb8b344d0d29f2659707d4 (diff) |
- admin comments, configuration, element_set_global, element_set_unit, thumbnail and double_select migration to smarty
- fix in redirect.tpl
git-svn-id: http://piwigo.org/svn/trunk@2249 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/notification_by_mail.php')
-rw-r--r-- | admin/notification_by_mail.php | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/admin/notification_by_mail.php b/admin/notification_by_mail.php index 38fd8cfb6..913d65283 100644 --- a/admin/notification_by_mail.php +++ b/admin/notification_by_mail.php @@ -689,19 +689,37 @@ switch ($page['mode']) ); $data_users = get_user_notifications('subscribe'); + + $opt_true=array(); + $opt_true_selected=array(); + $opt_false=array(); + $opt_false_selected=array(); foreach ($data_users as $nbm_user) { - $template->assign_block_vars( - (get_boolean($nbm_user['enabled']) ? 'category_option_true' : 'category_option_false'), - array('SELECTED' => ( // Keep selected user where enabled are not changed when change has been notify - get_boolean($nbm_user['enabled']) ? (isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true'])) - : (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false'])) - ) ? 'selected="selected"' : '', - 'VALUE' => $nbm_user['check_key'], - 'OPTION' => $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']' - )); + if ( get_boolean($nbm_user['enabled']) ) + { + $opt_true[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']'; + if ((isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true'])) ) + { + $opt_true_selected[] = $nbm_user['check_key']; + } + } + else + { + $opt_false[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']'; + if (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false'])) + { + $opt_false_selected[] = $nbm_user['check_key']; + } + } } - + $template->assign( array( + 'category_option_true' => $opt_true, + 'category_option_true_selected' => $opt_true_selected, + 'category_option_false' => $opt_false, + 'category_option_true' => $opt_false_selected, + ) + ); break; } |