Header and Footr output is suppressed if it is an Ajax request

This commit is contained in:
ninadsp
2010-05-26 11:38:58 +05:30
parent 0a417e3c2a
commit 5ab3a60612
2 changed files with 147 additions and 136 deletions

View File

@@ -225,10 +225,16 @@ if (! empty($GLOBALS['cfg']['DBG']['php'])
*/ */
} }
/**
* If we are in an AJAX request, we do not need to generate the closing tags for
* body and html.
*/
if (! $GLOBALS['is_ajax_request']) {
?> ?>
</body> </body>
</html> </html>
<?php <?php
}
/** /**
* Stops the script execution * Stops the script execution
*/ */

View File

@@ -14,6 +14,10 @@ if (! defined('PHPMYADMIN')) {
*/ */
require_once './libraries/common.inc.php'; require_once './libraries/common.inc.php';
/**
* If this is an Ajax request, we do not need to generate all this output.
*/
if (!$GLOBALS['is_ajax_request']) {
if (empty($GLOBALS['is_header_sent'])) { if (empty($GLOBALS['is_header_sent'])) {
/** /**
@@ -171,4 +175,5 @@ if (empty($GLOBALS['is_header_sent'])) {
*/ */
$GLOBALS['is_header_sent'] = true; $GLOBALS['is_header_sent'] = true;
} }
} //end if(!$GLOBALS['is_ajax_request'])
?> ?>