Finished integrating the PMA_Footer class
This commit is contained in:
parent
234480cdae
commit
d9bedbd75e
@ -322,6 +322,3 @@ if (is_array($foreignData['disp_row'])) {
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -73,7 +73,10 @@ $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
|
||||
|
||||
// start output
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getHeader()->sendHttpHeaders();
|
||||
$header = $response->getHeader();
|
||||
$header->sendHttpHeaders();
|
||||
$response->disable();
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
||||
|
||||
@ -239,6 +239,7 @@ class PMA_Error_Handler
|
||||
*/
|
||||
protected function dispPageStart($error = null)
|
||||
{
|
||||
PMA_Response::getInstance()->disable();
|
||||
echo '<html><head><title>';
|
||||
if ($error) {
|
||||
echo $error->getTitle();
|
||||
|
||||
@ -83,6 +83,13 @@ class PMA_Header
|
||||
* @var bool
|
||||
*/
|
||||
private $_isAjax;
|
||||
/**
|
||||
* Whether to display anything
|
||||
*
|
||||
* @access private
|
||||
* @var bool
|
||||
*/
|
||||
private $_isEnabled;
|
||||
/**
|
||||
* Whether the HTTP headers (and possibly some HTML)
|
||||
* have already been sent to the browser
|
||||
@ -100,6 +107,7 @@ class PMA_Header
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->_isEnabled = true;
|
||||
$this->_isAjax = false;
|
||||
$this->_bodyId = '';
|
||||
$this->_title = 'phpMyAdmin';
|
||||
@ -195,6 +203,16 @@ class PMA_Header
|
||||
$this->_scripts->addCode(PMA_getReloadNavigationScript(true));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public function disable()
|
||||
{
|
||||
$this->_isEnabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -281,7 +299,7 @@ class PMA_Header
|
||||
$retval = '';
|
||||
if (! self::$headerIsSent) {
|
||||
$this->sendHttpHeaders();
|
||||
if (! $this->_isAjax) {
|
||||
if (! $this->_isAjax && $this->_isEnabled) {
|
||||
$retval .= $this->_getHtmlStart();
|
||||
$retval .= $this->_getMetaTags();
|
||||
$retval .= $this->_getLinkTags();
|
||||
|
||||
@ -77,6 +77,12 @@ class PMA_Response
|
||||
return self::$_instance;
|
||||
}
|
||||
|
||||
public function disable()
|
||||
{
|
||||
$this->_header->disable();
|
||||
$this->_footer->disable();
|
||||
}
|
||||
|
||||
public function getHeader()
|
||||
{
|
||||
return $this->_header;
|
||||
|
||||
@ -75,6 +75,7 @@ function PMA_auth_fails()
|
||||
/* HTML header */
|
||||
$GLOBALS['page_title'] = __('Access denied');
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setTitle(__('Access denied'));
|
||||
$header->disableMenu();
|
||||
@ -129,7 +130,7 @@ function PMA_auth_fails()
|
||||
echo '</tr>' . "\n";
|
||||
}
|
||||
echo '</table>' . "\n";
|
||||
include './libraries/footer.inc.php';
|
||||
exit;
|
||||
return true;
|
||||
} // end of the 'PMA_auth_fails()' function
|
||||
|
||||
|
||||
@ -156,6 +156,7 @@ function PMA_auth()
|
||||
|
||||
$GLOBALS['page_title'] = 'phpMyAdmin';
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setBodyId('loginform');
|
||||
$header->disableMenu();
|
||||
@ -304,8 +305,6 @@ if (top != self || ! $('body#loginform').length) {
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit;
|
||||
} // end of the 'PMA_auth()' function
|
||||
|
||||
@ -51,6 +51,7 @@ function PMA_auth()
|
||||
/* HTML header */
|
||||
$GLOBALS['page_title'] = __('Access denied');
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setTitle(__('Access denied'));
|
||||
$header->disableMenu();
|
||||
@ -69,12 +70,8 @@ function PMA_auth()
|
||||
if (file_exists(CUSTOM_FOOTER_FILE)) {
|
||||
include CUSTOM_FOOTER_FILE;
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit();
|
||||
exit;
|
||||
} // end of the 'PMA_auth()' function
|
||||
|
||||
|
||||
|
||||
@ -515,6 +515,7 @@ function PMA_sendHeaderLocation($uri, $use_refresh = false)
|
||||
{
|
||||
if (PMA_IS_IIS && strlen($uri) > 600) {
|
||||
include_once './libraries/js_escape.lib.php';
|
||||
PMA_Response::getInstance()->disable();
|
||||
|
||||
echo '<html><head><title>- - -</title>' . "\n";
|
||||
echo '<meta http-equiv="expires" content="0">' . "\n";
|
||||
|
||||
@ -10,9 +10,12 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if (!defined('TESTSUITE')) {
|
||||
if (! defined('TESTSUITE')) {
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
}
|
||||
|
||||
PMA_Response::getInstance()->disable();
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="<?php echo $lang; ?>" dir="<?php echo $dir; ?>">
|
||||
|
||||
@ -19,7 +19,6 @@ require_once 'libraries/common.inc.php';
|
||||
*/
|
||||
function PMA_exitNavigationFrame()
|
||||
{
|
||||
echo '</body></html>';
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -77,6 +76,7 @@ $db_start = $GLOBALS['db'];
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->disableMenu();
|
||||
$header->setBodyId('body_leftFrame');
|
||||
|
||||
@ -40,6 +40,7 @@ if (isset($GLOBALS['db'])) {
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->setBodyId('pmd_body');
|
||||
$scripts = $header->getScripts();
|
||||
@ -858,5 +859,3 @@ if (! empty($_REQUEST['query'])) {
|
||||
<img src="<?php echo $_SESSION['PMA_Theme']->getImgPath('pmd/rightarrow2.png'); ?>" width="0" height="0" alt="" />
|
||||
<img src="<?php echo $_SESSION['PMA_Theme']->getImgPath('pmd/uparrow2_m.png'); ?>" width="0" height="0" alt="" />
|
||||
<div id="PMA_disable_floating_menubar"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@ -78,6 +78,7 @@ if (isset($mode)) {
|
||||
}
|
||||
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->disableMenu();
|
||||
$header->display();
|
||||
@ -145,6 +146,4 @@ echo '<p>' . __('Export/Import to scale') . ':';
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@ -113,6 +113,7 @@ $sql_query = '';
|
||||
* prepare JavaScript functionality
|
||||
*/
|
||||
$response = PMA_Response::getInstance();
|
||||
$response->getFooter()->setMinimal();
|
||||
$header = $response->getHeader();
|
||||
$header->disableMenu();
|
||||
$header->setBodyId('bodyquerywindow');
|
||||
@ -201,5 +202,3 @@ if (! empty($_sql_history)
|
||||
<input type="hidden" name="querydisplay_tab" value="<?php echo $querydisplay_tab; ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user