Changeset 12819 for extensions/PHP_Optimisateur/include/save_config.php
- Timestamp:
- Jan 1, 2012, 10:09:17 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PHP_Optimisateur/include/save_config.php
r10337 r12819 1 1 <?php 2 2 // Quelques traitements 3 $_POST['copyPOS'] = implode('-', $_POST['copyPOS']); 3 if ($_POST['copyPOS'][0] == 'center' and $_POST['copyPOS'][1] == 'center') { 4 $_POST['copyPOS'] = 'center'; 5 } else { 6 $_POST['copyPOS'] = implode('-', $_POST['copyPOS']); 7 } 4 8 $_POST['copyCOLOR'] = str_replace('#', null, $_POST['copyCOLOR']); 5 9 $_POST['prefixe_mini'] = delete_special_car($_POST['prefixe_mini']); … … 9 13 // Vérifications 10 14 if (!is_decimal($_POST['Qhd']) OR $_POST['Qhd'] > 100) { 11 12 15 $_POST['Qhd'] = 100; 16 $ERRORS['conf'][] = array(l10n('Qhd'), 'must_be_integer_100'); 13 17 } 14 18 if (!is_decimal($_POST['Qnormal']) OR $_POST['Qnormal'] > 100) { 15 16 19 $_POST['Qnormal'] = 100; 20 $ERRORS['conf'][] = array(l10n('Qnormal'), 'must_be_integer_100'); 17 21 } 18 22 if (!is_decimal($_POST['Qthumbnail']) OR $_POST['Qthumbnail'] > 100) { 19 20 23 $_POST['Qthumbnail'] = 100; 24 $ERRORS['conf'][] = array(l10n('Qthumbnail'), 'must_be_integer_100'); 21 25 } 22 26 if (!is_decimal($_POST['DIMhd'])) { 23 24 27 $_POST['DIMhd'] = 2560; 28 $ERRORS['conf'][] = array(l10n('DIMhd'), 'must_be_integer'); 25 29 } 26 30 if (!is_decimal($_POST['DIMnormal']) OR $_POST['DIMnormal'] > $_POST['DIMhd']) { 27 28 31 $_POST['DIMnormal'] = 800; 32 $ERRORS['conf'][] = array(l10n('DIMnormal'), 'must_be_integer'); 29 33 } 30 34 if (!is_decimal($_POST['DIMthumbnail']) OR $_POST['DIMthumbnail'] > $_POST['DIMnormal']) { 31 32 35 $_POST['DIMthumbnail'] = 120; 36 $ERRORS['conf'][] = array(l10n('DIMthumbnail'), 'must_be_integer'); 33 37 } 34 38 if (!is_decimal($_POST['DPI'])) { 35 36 39 $_POST['DPI'] = 72; 40 $ERRORS['conf'][] = array(l10n('DPI'), 'must_be_integer'); 37 41 } 38 42 if (!is_decimal($_POST['copySIZE'])) { 39 40 43 $_POST['copySIZE'] = 0.05; 44 $ERRORS['conf'][] = array(l10n('copySIZE'), 'must_be_decimal'); 41 45 } 42 46 43 47 44 48 // Plugins : supprime les plugins manquants & charge les actions de configuration … … 46 50 47 51 foreach ($_POST['Plugins'] as $plugin_id => $plugin_config) { 48 49 50 51 52 52 if (isset($plugin_config['delete'])) { 53 unset($_POST['Plugins'][$plugin_id]); 54 } else if (file_exists('plugins/'.$plugin_id.'/setup.php')) { 55 include('plugins/'.$plugin_id.'/setup.php'); 56 } 53 57 } 54 58 … … 65 69 66 70 if (!isset($ERRORS['conf'])) { 67 68 $PAGE['header'] .= '<meta http-equiv="refresh" content="3;url=index.php">';69 71 // header('Location:index.php'); 72 $PAGE['header'] .= '<meta http-equiv="refresh" content="2;url=index.php">'; 73 $PAGE['end'] .= '<div class="generic finish">'.l10n('Saved').'</div>'; 70 74 } 71 75
Note: See TracChangeset
for help on using the changeset viewer.