system_themes_submit

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/system/system.module, строка 1197

Версии
5
system_themes_submit($form_id, $form_values)

Код

<?php
function system_themes_submit($form_id, $form_values) {

  db_query("UPDATE {system} SET status = 0 WHERE type = 'theme'");

  if ($form_values['op'] == t('Save configuration')) {
    if (is_array($form_values['status'])) {
      foreach ($form_values['status'] as $key => $choice) {
        // Always enable the default theme, despite its status checkbox being checked:
        if ($choice || $form_values['theme_default'] == $key) {
          system_initialize_theme_blocks($key);
          db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", $key);
        }
      }
    }
    if (($admin_theme = variable_get('admin_theme', '0')) != '0' && $admin_theme != $form_values['theme_default']) {
      drupal_set_message(t('Please note that the <a href="!admin_theme_page">administration theme</a> is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', array(
        '!admin_theme_page' => url('admin/settings/admin'),
        '%admin_theme' => $admin_theme,
        '%selected_theme' => $form_values['theme_default'],
      )));
    }
    variable_set('theme_default', $form_values['theme_default']);
  }
  else {
    variable_del('theme_default');
    db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name = 'garland'");
  }

  menu_rebuild();
  drupal_set_message(t('The configuration options have been saved.'));
  return 'admin/build/themes';
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему