Index: index.php =================================================================== RCS file: /cvs/drupal/drupal/index.php,v retrieving revision 1.94 diff -u -F^f -r1.94 index.php --- index.php 26 Dec 2007 08:46:48 -0000 1.94 +++ index.php 14 Feb 2008 14:25:15 -0000 @@ -15,8 +15,21 @@ require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); +// Need to cache the 'modal' flag in the session, so it will effect +// the results page that follows a form submission. +if (isset($_GET['modal'])) { + $_SESSION['modal'] = $_GET['modal']; +} + +// This call will not return on form submission. $return = menu_execute_active_handler(); +// Move the 'modal' flag back out of the session. +if (isset($_SESSION['modal'])) { + $modal = $_SESSION['modal']; + unset($_SESSION['modal']); +} + // Menu status constants are integers; page content is a string. if (is_int($return)) { switch ($return) { @@ -32,8 +45,14 @@ } } elseif (isset($return)) { - // Print any value (including an empty string) except NULL or undefined: - print theme('page', $return); + if (isset($modal)) { + print theme('modal_page', $return); + } + else { + // Print any value (including an empty string) except NULL or undefined: + print theme('page', $return); + } } +// Not sure if this should be called if $modal is true? drupal_page_footer(); Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.756 diff -u -F^f -r1.756 common.inc --- includes/common.inc 30 Jan 2008 23:07:41 -0000 1.756 +++ includes/common.inc 14 Feb 2008 14:25:18 -0000 @@ -2844,6 +2844,10 @@ function drupal_common_theme() { 'install_page' => array( 'arguments' => array('content' => NULL), ), + 'modal_page' => array( + 'arguments' => array('content' => NULL), + 'template' => 'modal-page', + ), 'task_list' => array( 'arguments' => array('items' => NULL, 'active' => NULL), ), Index: modules/system/modal-page.tpl.php =================================================================== RCS file: modules/system/modal-page.tpl.php diff -N modules/system/modal-page.tpl.php --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/system/modal-page.tpl.php 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,16 @@ + +