Changeset 4058 for extensions/event_cats/admin/autolog_new.inc.php
- Timestamp:
- Oct 19, 2009, 3:07:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/autolog_new.inc.php
r4048 r4058 80 80 81 81 $ec_default_action = 'create'; 82 $ec_default_entry = '-1'; 82 83 $ec_def_auto_code_dg_nb = read_ec_conf('auto_code_dg_nb'); 83 84 … … 86 87 *****************************************************************************/ 87 88 88 if (isset($_POST['ec_act1']) and $_POST['ec_act1'] == 'duplicate_entry') { 89 if (isset($_POST['ec_entry_sel'])) { 90 if (array_key_exists($_POST['ec_entry_sel'], $ec_lists['ec_table'])) 91 $ec_default_action = $_POST['ec_entry_sel']; 92 else 93 $page['errors'][] = 'Tentative de duplication d\'une entrée inexistante'; 89 if (isset($_POST['ec_act1']) and isset($_POST['ec_entry_sel'])) { 90 if ( 91 array_key_exists($_POST['ec_entry_sel'], $ec_lists['ec_table']) or 92 $_POST['ec_entry_sel'] == '-1' 93 ) { 94 switch ($_POST['ec_act1']) { 95 case 'duplicate_entry_ask': 96 case 'modify_entry_ask': 97 case 'disable': 98 case 'create': 99 $ec_default_action = $_POST['ec_act1']; 100 $ec_default_entry = $_POST['ec_entry_sel']; 101 break; 102 default: 103 $page['errors'][] = 'Demande inconnue : $_POST[\'ec_act1\'] = '.$_POST['ec_act1']; 104 } 94 105 } 95 else { 96 $page['errors'][] = 'Tentative de duplication sans entrée'; 97 } 106 else 107 $page['errors'][] = 'Tentative d\'utilisation d\'une entrée inexistante ($_POST[\'ec_entry_sel\'] = '.$_POST['ec_entry_sel'].')'; 98 108 } 99 109 … … 108 118 (count($ec_lists['user_ids']) == 0) ? 'style = "display:none;"' : '' 109 119 ); 120 $template->assign('ec_is_creation', 121 ($ec_default_action == 'duplicate_entry_ask' or 122 $ec_default_action == 'create') 123 ); 110 124 $template->assign('ec_default_action',$ec_default_action); 125 $template->assign('ec_default_entry',$ec_default_entry); 111 126 $template->assign('ec_def_auto_code_dg_nb',$ec_def_auto_code_dg_nb); 112 127
Note: See TracChangeset
for help on using the changeset viewer.