- Timestamp:
- Nov 6, 2009, 2:13:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/include/evntcats_admin_funcs.inc.php
r4219 r4221 219 219 switch ($_POST['ec_act1']) { 220 220 221 // This "switch" command is a little bit tricky... it has been a pain to 222 // debug, and I wish to nobody to have to modify it :-\ ! 223 // Its principle is that it manages checks for four occurrences of 224 // $_POST['ec_act1'] : 'create', 'modify_entry_submit', 225 // 'duplicate_entry_submit', and 'toggle_forced'. Some checks are mutual 226 // between different occurences, but never all checks of each occurrence 227 // of $_POST['ec_act1']. So tests are done with "if" statements to 228 // produce "break" statements when needed. 229 221 230 case 'create': 222 231 232 // Stops if given code or user type are incorrect 223 233 if ( 224 234 !isset($_POST['ec_in_up_code']) or … … 240 250 case 'modify_entry_submit': 241 251 252 // First checks for user type and/or value 242 253 if (isset($_POST['ec_sel_user'])) { 243 254 if ($_POST['ec_sel_user'] == 'new') { … … 264 275 case 'duplicate_entry_submit': 265 276 277 // Checks of entry value validity 266 278 if ( 267 279 !isset($_POST['ec_entry_sel']) or … … 269 281 ) return ec_end1('ec_entry_sel', 'ec_bad_argument5'); 270 282 283 // Other checks for user type and value 271 284 if ($_POST['ec_act1'] == 'modify_entry_submit') if ( 272 285 !isset($_POST['ec_sel_user']) or ( … … 282 295 case 'toggle_forced': 283 296 297 // Establish default values for unchanged values 284 298 $ec_code = $ec_lists['ec_table'][$_POST['ec_entry_sel']]['code']; 285 299 if ($action == 'ec_ok' and $ec_user_id == 'NULL') … … 306 320 } 307 321 322 // Final check for entry value 308 323 build_ec_duplicable_codes(); 309 324 if (!array_key_exists($_POST['ec_entry_sel'], … … 314 329 default: ec_end1('ec_act1', 'ec_bad_argument1'); 315 330 } 331 // Pfew ! 316 332 317 333 if ($_POST['ec_act1'] != 'toggle_forced') { … … 430 446 } 431 447 else { 432 build_ec_lists(); 448 build_ec_lists(); // Don't remember exactly why, but must be done here 433 449 $forced = ($forced == 'false') ? '' : l10n('ec_cnfrm_forced'); 434 450 $page['infos'][] =
Note: See TracChangeset
for help on using the changeset viewer.