- Patch #1397882 by sun, catch: system_theme_settings_submit() does not properly clean up submitted form values.
parent
ed9f736bc0
commit
2c656cd69a
|
@ -691,11 +691,13 @@ function _system_theme_settings_validate_path($path) {
|
||||||
function system_theme_settings_submit($form, &$form_state) {
|
function system_theme_settings_submit($form, &$form_state) {
|
||||||
// Exclude unnecessary elements before saving.
|
// Exclude unnecessary elements before saving.
|
||||||
form_state_values_clean($form_state);
|
form_state_values_clean($form_state);
|
||||||
$key = $form_state['values']['var'];
|
|
||||||
unset($form_state['values']['var']);
|
|
||||||
|
|
||||||
$values = $form_state['values'];
|
$values = $form_state['values'];
|
||||||
|
|
||||||
|
// Extract the name of the theme from the submitted form values, then
|
||||||
|
// remove it from the array so that it is not saved as part of the variable.
|
||||||
|
$key = $values['var'];
|
||||||
|
unset($values['var']);
|
||||||
|
|
||||||
// If the user uploaded a new logo or favicon, save it to a permanent location
|
// If the user uploaded a new logo or favicon, save it to a permanent location
|
||||||
// and use it in place of the default theme-provided file.
|
// and use it in place of the default theme-provided file.
|
||||||
if ($file = $values['logo_upload']) {
|
if ($file = $values['logo_upload']) {
|
||||||
|
|
Loading…
Reference in New Issue