Currently, system_themes_form() does it's own variable_set()'s and variable_del()'s, when that handling could be done by using return system_settings_form($form);.

Comments

foxtrotcharlie’s picture

Is this just a matter of replacing

  $form['buttons']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  $form['buttons']['reset'] = array(
    '#type' => 'submit',
    '#value' => t('Reset to defaults'),
  );

  return $form;

with

return system_settings_form($form, TRUE);

in the system_themes_form in modules/system/system.admin.inc, or have I got the wrong end of the stick here? I'm not sure what needs to be done regarding variable_set() and variable_del()?

JamesAn’s picture

I don't think that's correct.

system_settings_form_submit() simply walks through the submitted form values and sets them as a persistent variable.

system_themes_form_submit():

  • has slightly more complicated logic,
  • has its own conditional message to set, and
  • makes database queries to initialize blocks on a theme change and store the theme's machine-readable name in database.

Yes/no?

JamesAn’s picture

Status: Active » Closed (won't fix)

If I'm understanding the difference between the two submit functions, this won't be fixed. Right?