From 5d58e9162312671f60eb2e9266a3ade08f791aac Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 8 Jun 2009 04:45:32 +0000 Subject: #483468 by Josh Waihi and Berdir: Fix SimpleTest re-run tests button for PostgreSQL. --- modules/simpletest/simpletest.pages.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'modules/simpletest') 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; } -- cgit v1.2.3