function dba_database_overview_form in Database Administration 5
1 call to dba_database_overview_form()
1 string reference to 'dba_database_overview_form'
- dba_menu in ./
dba.module
File
- ./
dba.module, line 472 - Allows administrators direct access to their Drupal database. Written by Jeremy Andrews <jeremy@kerneltrap.org>, June 2004. PostgreSQL functionality provided by AAM <aam@ugpl.de> Major security audit, porting, and maintenance by Derek…
Code
function dba_database_overview_form() {
$tables = dba_get_tables();
$form = array();
$form['#tree'] = TRUE;
$form['tables'] = array();
foreach ($tables as $table) {
$form['tables'][$table] = array(
'#type' => 'checkbox',
'#title' => '',
'#default_value' => 0,
);
}
if (_is_mysql()) {
$form['check'] = array(
'#type' => 'submit',
'#value' => t('Check'),
);
$form['optimize'] = array(
'#type' => 'submit',
'#value' => t('Optimize'),
);
}
if (user_access('dba administer database')) {
$form['backup'] = array(
'#type' => 'submit',
'#value' => t('Backup'),
);
$form['empty'] = array(
'#type' => 'submit',
'#value' => t('Empty'),
);
$form['drop'] = array(
'#type' => 'submit',
'#value' => t('Drop'),
);
}
return $form;
}