summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-06-08 04:45:32 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-06-08 04:45:32 +0000
commit5d58e9162312671f60eb2e9266a3ade08f791aac (patch)
tree75c2d3f54ad5d9e46c76237cd957ac290e2d229e
parenta73b53f3aec99d9a8b01799c2a8e6d57670b7d30 (diff)
downloadbrdo-5d58e9162312671f60eb2e9266a3ade08f791aac.tar.gz
brdo-5d58e9162312671f60eb2e9266a3ade08f791aac.tar.bz2
#483468 by Josh Waihi and Berdir: Fix SimpleTest re-run tests button for PostgreSQL.
-rw-r--r--modules/simpletest/simpletest.pages.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/simpletest/simpletest.pages.inc b/modules/simpletest/simpletest.pages.inc
index e31094217..24a779348 100644
--- a/modules/simpletest/simpletest.pages.inc
+++ b/modules/simpletest/simpletest.pages.inc
@@ -187,12 +187,12 @@ function simpletest_test_form_submit($form, &$form_state) {
/**
* Test results form for $test_id.
*/
-function simpletest_result_form(&$form_sate, $test_id) {
+function simpletest_result_form(&$form_state, $test_id) {
$form = array();
- // Make sure there are test results to display and are-run is not being performed.
- $results = simpletest_result_get($test_id);
- if ($test_id != 're-run' && !$results) {
+ // Make sure there are test results to display and a re-run is not being performed.
+ $results = array();
+ if (is_numeric($test_id) && !$results = simpletest_result_get($test_id)) {
drupal_set_message(t('No test results to display.'), 'error');
drupal_goto('admin/development/testing');
return $form;
@@ -305,7 +305,9 @@ function simpletest_result_form(&$form_sate, $test_id) {
'#markup' => l(t('Return to list'), 'admin/development/testing'),
);
- simpletest_clean_results_table($test_id);
+ if (is_numeric($test_id)) {
+ simpletest_clean_results_table($test_id);
+ }
return $form;
}