summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests/ajax_test.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/simpletest/tests/ajax_test.module')
-rw-r--r--modules/simpletest/tests/ajax_test.module14
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/simpletest/tests/ajax_test.module b/modules/simpletest/tests/ajax_test.module
index 44c20f515..cc8e6e8fe 100644
--- a/modules/simpletest/tests/ajax_test.module
+++ b/modules/simpletest/tests/ajax_test.module
@@ -28,21 +28,15 @@ function ajax_test_menu() {
}
/**
- * Menu callback; Returns $_GET['commands'] suitable for use by ajax_deliver().
+ * Menu callback; Return an element suitable for use by ajax_deliver().
*
* Additionally ensures that ajax_render() incorporates JavaScript settings
- * by invoking drupal_add_js() with a dummy setting.
+ * generated during the page request by invoking drupal_add_js() with a dummy
+ * setting.
*/
function ajax_test_render() {
- // Prepare AJAX commands.
- $commands = array();
- if (!empty($_GET['commands'])) {
- $commands = $_GET['commands'];
- }
- // Add a dummy JS setting.
drupal_add_js(array('ajax' => 'test'), 'setting');
-
- return array('#type' => 'ajax', '#commands' => $commands);
+ return array('#type' => 'ajax', '#commands' => array());
}
/**