Changeset 10589 for trunk/admin/batch_manager_global.php
- Timestamp:
- 04/23/11 10:51:53 (2 years ago)
- Files:
-
- 1 modified
-
trunk/admin/batch_manager_global.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager_global.php
r10553 r10589 434 434 if (!empty($update_fields)) 435 435 { 436 // Update configuration436 // Update upload configuration 437 437 $updates = array(); 438 438 foreach ($update_fields as $field) 439 439 { 440 if (is_bool($upload_form_config[$field]['default'])) 441 { 442 $value = isset($_POST[$field]); 443 444 $updates[] = array( 445 'param' => 'upload_form_'.$field, 446 'value' => boolean_to_string($value) 447 ); 448 } 449 else 450 { 451 $value = null; 452 if (!empty($_POST[$field])) 453 { 454 $value = $_POST[$field]; 455 } 456 457 if (preg_match($upload_form_config[$field]['pattern'], $value) 458 and $value >= $upload_form_config[$field]['min'] 459 and $value <= $upload_form_config[$field]['max']) 460 { 461 $conf['upload_form_'.$field] = $value; 462 $updates[] = array( 463 'param' => 'upload_form_'.$field, 464 'value' => $value 465 ); 466 } 467 else 468 { 469 $updates = null; 470 break; 471 } 472 } 440 $value = !empty($_POST[$field]) ? $_POST[$field] : null; 473 441 $form_values[$field] = $value; 474 } 475 if (!empty($updates)) 476 { 477 mass_updates( 478 CONFIG_TABLE, 479 array( 480 'primary' => array('param'), 481 'update' => array('value') 482 ), 483 $updates 484 ); 485 } 442 $updates[$field] = $value; 443 } 444 save_upload_form_config($updates); 486 445 $template->delete_compiled_templates(); 487 446 }
![(please configure the [header_logo] section in trac.ini)](http://piwigo.org/screenshots/piwigo_logo_on_white.png)