| 1 |
<?php |
<?php |
| 2 |
// $Id: dba.module,v 1.60 2008/02/20 01:00:11 dww Exp $ |
// $Id: dba.module,v 1.61 2008/12/11 02:42:12 dww Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 424 |
* MySQL only: check the selected table(s). |
* MySQL only: check the selected table(s). |
| 425 |
*/ |
*/ |
| 426 |
function dba_admin_tables_check() { |
function dba_admin_tables_check() { |
| 427 |
return drupal_get_form('dba_check_tables'); |
return drupal_get_form('dba_check_tables_form'); |
| 428 |
} |
} |
| 429 |
|
|
| 430 |
/** |
/** |
| 962 |
// We don't want to get redirected, which would run the queries twice. |
// We don't want to get redirected, which would run the queries twice. |
| 963 |
$form['#redirect'] = false; |
$form['#redirect'] = false; |
| 964 |
|
|
| 965 |
return drupal_get_form('dba_check_tables', $form); |
return $form; |
| 966 |
} |
} |
| 967 |
|
|
| 968 |
function dba_check_table_form_pre_render($form_id, &$form) { |
function dba_check_table_form_pre_render($form_id, &$form) { |
|
global $form_values; |
|
| 969 |
if (form_get_errors()) { |
if (form_get_errors()) { |
| 970 |
// If there's a validation error (e.g. #token is wrong), return |
// If there's a validation error (e.g. #token is wrong), return |
| 971 |
// immediately since we can't trust $form_values. |
// immediately since we can't trust $form. |
| 972 |
return; |
return; |
| 973 |
} |
} |
| 974 |
|
|
| 975 |
$action = isset($_POST['op']) ? $_POST['op'] : 'check'; |
$action = isset($_POST['op']) ? $_POST['op'] : 'check'; |
| 976 |
$type = $form_values['check_type']; |
$type = $form['check_options']['check_type']['#value']; |
| 977 |
$tables = explode(',', $form_values['tables']); |
$tables = explode(',', $form['check_tables']['tables']['#value']); |
| 978 |
|
|
| 979 |
if ($action == t('Repair')) { |
if ($action == t('Repair')) { |
| 980 |
drupal_set_title(t('Performing table repair.')); |
drupal_set_title(t('Performing table repair.')); |