Changeset 12879 for trunk/admin/configuration.php
- Timestamp:
- Jan 12, 2012, 10:37:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/configuration.php
r12872 r12879 28 28 29 29 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 30 include_once(PHPWG_ROOT_PATH.'admin/include/functions_upload.inc.php'); 30 31 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 31 32 … … 54 55 'allow_user_customization', 55 56 ); 57 58 $sizes_checkboxes = array( 59 'original_resize', 60 ); 56 61 57 62 $history_checkboxes = array( … … 183 188 break; 184 189 } 190 case 'sizes' : 191 { 192 $fields = array( 193 'original_resize', 194 'original_resize_maxwidth', 195 'original_resize_maxheight', 196 'original_resize_quality', 197 ); 198 199 $updates = array(); 200 201 foreach ($fields as $field) 202 { 203 $value = !empty($_POST[$field]) ? $_POST[$field] : null; 204 $form_values[$field] = $value; 205 $updates[$field] = $value; 206 } 207 208 save_upload_form_config($updates, $page['errors']); 209 210 if (count($page['errors']) == 0) 211 { 212 array_push( 213 $page['infos'], 214 l10n('Your configuration settings are saved') 215 ); 216 } 217 218 break; 219 } 185 220 case 'history' : 186 221 { … … 229 264 230 265 // updating configuration if no error found 231 if ( count($page['errors']) == 0)266 if ('sizes' != $page['section'] and count($page['errors']) == 0) 232 267 { 233 268 //echo '<pre>'; print_r($_POST); echo '</pre>'; … … 269 304 // TabSheet initialization 270 305 $tabsheet->add('main', l10n('Main'), $conf_link.'main'); 306 $tabsheet->add('sizes', l10n('Photo Sizes'), $conf_link.'sizes'); 271 307 $tabsheet->add('display', l10n('Display'), $conf_link.'display'); 272 308 $tabsheet->add('history', l10n('History'), $conf_link.'history'); … … 440 476 break; 441 477 } 478 case 'sizes' : 479 { 480 $template->assign( 481 'sizes', 482 array( 483 'original_resize_maxwidth' => $conf['original_resize_maxwidth'], 484 'original_resize_maxheight' => $conf['original_resize_maxheight'], 485 'original_resize_quality' => $conf['original_resize_quality'], 486 ) 487 ); 488 489 foreach ($sizes_checkboxes as $checkbox) 490 { 491 $template->append( 492 'sizes', 493 array( 494 $checkbox => $conf[$checkbox] 495 ), 496 true 497 ); 498 } 499 500 break; 501 } 442 502 } 443 503
Note: See TracChangeset
for help on using the changeset viewer.