Index: thickbox.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/thickbox/thickbox.module,v
retrieving revision 1.18.2.21
diff -u -p -r1.18.2.21 thickbox.module
--- thickbox.module	7 Sep 2009 15:07:01 -0000	1.18.2.21
+++ thickbox.module	11 Jan 2010 17:08:45 -0000
@@ -59,6 +59,14 @@ function thickbox_menu() {
     'access callback' => 'user_is_anonymous',
     'type' => MENU_CALLBACK,
   );
+  $items['thickbox/form'] = array(
+    'title' => 'Form',
+    'page callback' => 'thickbox_form',
+    'page arguments' => array(2),
+    'access callback' => 'user_access',
+    'access arguments' => array('access content'),
+    'type' => MENU_CALLBACK,
+  );

   return $items;
 }
@@ -67,8 +75,19 @@ function thickbox_menu() {
  * Menu callback for thickbox_login.
  */
 function thickbox_login() {
-  $form = variable_get('thickbox_login_form', '') == 'custom' ? variable_get('thickbox_login_custom', 'user_login') : variable_get('thickbox_login_form', 'user_login');
-  print drupal_get_form($form);
+  $form_id = variable_get('thickbox_login_form', '') == 'custom' ? variable_get('thickbox_login_custom', 'user_login') : variable_get('thickbox_login_form', 'user_login');
+  thickbox_form($form_id);
+}
+
+/**
+ * Menu callback for thickbox_form.
+ */
+function thickbox_form($form_id) {
+  $GLOBALS['devel_shutdown'] = FALSE; // Prevent devel module from spewing.
+  $form = drupal_get_form($form_id);
+  if (!empty($form)) {
+    print $form;
+  }
   exit;
 }
