function dba_set_active_database in Database Administration 7
File
- ./
dba.admin.inc, line 611
Code
function dba_set_active_database() {
$form = array();
$keys = dba_list_database_keys();
if (sizeof($keys) > 1) {
$form['active'] = array(
'#type' => 'fieldset',
'#title' => t('Active database'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['active']['active_databases'] = array(
'#type' => 'select',
'#options' => $keys,
'#description' => t('You can work with any of the databases in the $databases array typically configured in the settings.php Drupal configuration file.'),
);
$form['active']['active_select'] = array(
'#type' => 'submit',
'#value' => t('Select'),
'#validate' => array(
'dba_set_active_database_validate',
),
);
}
return $form;
}