function drupal_commons_theme_form_submit in Drupal Commons 6.2
Submit handler for the theme form
1 call to drupal_commons_theme_form_submit()
- _drupal_commons_drush_tasks in includes/
drush.inc - Automated run through the option forms since drush can't handle the forms
File
- includes/
form.inc, line 256 - Contains form-related functions for the installation profile
Code
function drupal_commons_theme_form_submit(&$form, &$form_state) {
$sql = "UPDATE {system} SET status = %d WHERE type = 'theme' and name = '%s'";
// Disable garland
db_query($sql, 0, 'garland');
// Enable Fusion
db_query($sql, 1, 'fusion_core');
// Enable Commons Roots
db_query($sql, 1, 'commons_roots');
// Enable all of the available themes
foreach ($form['theme']['#options'] as $theme => $label) {
db_query($sql, 1, $theme);
}
// Set the selected theme as the default
variable_set('theme_default', $form_state['values']['theme']);
// Refresh the theme registry registry
list_themes(TRUE);
drupal_rebuild_theme_registry();
// Initiate the next installation step
variable_set('install_task', 'install-commons');
// Redirect back to the installation page
if (isset($form_state['values']['url'])) {
drupal_goto($form_state['values']['url']);
}
}