diff --git a/Documentation.html b/Documentation.html index af2a5ea00f..b30cbd54e3 100644 --- a/Documentation.html +++ b/Documentation.html @@ -2700,9 +2700,8 @@ setfacl -d -m "g:www-data:rwx" tmp

This seems to be a PWS bug. Filippo Simoncini found a workaround (at this time there is no better fix): remove or comment the DOCTYPE - declarations (2 lines) from the scripts libraries/Header.class.php, - libraries/header_printview.inc.php, index.php, - navigation.php and libraries/common.lib.php.

+ declarations (2 lines) from the scripts libraries/Header.class.php + and index.php.

1.7 How can I GZip or Bzip a dump or a diff --git a/db_printview.php b/db_printview.php index 7a7bfc6b6b..e8aa3e3ad7 100644 --- a/db_printview.php +++ b/db_printview.php @@ -10,10 +10,9 @@ */ require_once 'libraries/common.inc.php'; -/** - * Gets the variables sent or posted to this script, then displays headers - */ -require_once 'libraries/header_printview.inc.php'; +$header = PMA_Header::getInstance(); +$header->enablePrintView(); +$header->display(); PMA_checkParameters(array('db')); diff --git a/js/cross_framing_protection.js b/js/cross_framing_protection.js index e69d162b3c..fbe96fd9d0 100644 --- a/js/cross_framing_protection.js +++ b/js/cross_framing_protection.js @@ -1,7 +1,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** - * Conditionally called from libraries/header_scripts.inc.php - * if third-party framing is not allowed + * Conditionally included if third-party framing is not allowed * */ @@ -13,8 +12,7 @@ try { alert("Redirecting..."); top.location.replace(self.document.URL.substring(0, self.document.URL.lastIndexOf("/")+1)); } -} -catch(e) { +} catch(e) { alert("Redirecting... (error: " + e); top.location.replace(self.document.URL.substring(0, self.document.URL.lastIndexOf("/")+1)); } diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index afb936540f..3e35494283 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -365,8 +365,6 @@ function PMA_auth_check() // according to the PHP manual we should do this before the destroy: //$_SESSION = array(); - // but we still need some parts of the session information - // in libraries/header_meta_style.inc.php session_destroy(); // -> delete password cookie(s) diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php deleted file mode 100644 index 66c5b75deb..0000000000 --- a/libraries/header_meta_style.inc.php +++ /dev/null @@ -1,50 +0,0 @@ -'; */ - -?> - - - - - - - <?php - if (!empty($page_title)) { - echo htmlspecialchars($page_title); - } else { - echo 'phpMyAdmin'; - } -?> - - - - diff --git a/libraries/header_printview.inc.php b/libraries/header_printview.inc.php deleted file mode 100644 index c1e01ec483..0000000000 --- a/libraries/header_printview.inc.php +++ /dev/null @@ -1,27 +0,0 @@ -enablePrintView(); -$header->display(); - -/** - * Sends the beginning of the html page then returns to the calling script - */ -// Defines the cell alignment values depending on text direction -if ($text_dir == 'ltr') { - $cell_align_left = 'left'; - $cell_align_right = 'right'; -} else { - $cell_align_left = 'right'; - $cell_align_right = 'left'; -} - -?> diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php deleted file mode 100644 index 06be58def5..0000000000 --- a/libraries/header_scripts.inc.php +++ /dev/null @@ -1,95 +0,0 @@ - 0) { - if (! empty($GLOBALS['table'])) { - $temp_title = $GLOBALS['cfg']['TitleTable']; - } else if (! empty($GLOBALS['db'])) { - $temp_title = $GLOBALS['cfg']['TitleDatabase']; - } elseif (! empty($GLOBALS['cfg']['Server']['host'])) { - $temp_title = $GLOBALS['cfg']['TitleServer']; - } else { - $temp_title = $GLOBALS['cfg']['TitleDefault']; - } - $title = PMA_expandUserString($temp_title); - } -} else { - $title = $page_title; -} -// here, the function does not exist with this configuration: -// $cfg['ServerDefault'] = 0; -$is_superuser = function_exists('PMA_isSuperuser') && PMA_isSuperuser(); -$GLOBALS['js_include'][] = 'jquery/jquery-1.6.2.js'; -$GLOBALS['js_include'][] = 'functions.js'; -$GLOBALS['js_include'][] = 'jquery/jquery.qtip-1.0.0-rc3.js'; -if ($GLOBALS['cfg']['CodemirrorEnable']) { - $GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js'; - $GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js'; -} - -$params = array('lang' => $GLOBALS['lang']); -if (isset($GLOBALS['db'])) { - $params['db'] = $GLOBALS['db']; -} -$GLOBALS['js_include'][] = 'messages.php' . PMA_generate_common_url($params); -// Append the theme id to this url to invalidate the cache on a theme change -$GLOBALS['js_include'][] = 'get_image.js.php?theme=' - . urlencode($_SESSION['PMA_Theme']->getId()); - -/** - * Here we add a timestamp when loading the file, so that users who - * upgrade phpMyAdmin are not stuck with older .js files in their - * browser cache. This produces an HTTP 304 request for each file. - */ - -// avoid loading twice a js file -$GLOBALS['js_include'] = array_unique($GLOBALS['js_include']); -foreach ($GLOBALS['js_include'] as $js_script_file) { - $ie_conditional = false; - if (is_array($js_script_file)) { - list($js_script_file, $ie_conditional) = $js_script_file; - } - echo PMA_includeJS($js_script_file, $ie_conditional); -} - -$title_to_set = isset($title) - ? PMA_sanitize(PMA_escapeJsString($title), false, true) - : ''; -// Below javascript Updates the title of the frameset if possible -?> - - diff --git a/sql.php b/sql.php index b918c8af27..6ae7d591ba 100644 --- a/sql.php +++ b/sql.php @@ -907,7 +907,9 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) { if (isset($printview) && $printview == '1') { PMA_checkParameters(array('db', 'full_sql_query')); - include_once 'libraries/header_printview.inc.php'; + $header = PMA_Header::getInstance(); + $header->enablePrintView(); + $header->display(); $hostname = ''; if ($cfg['Server']['verbose']) { diff --git a/tbl_printview.php b/tbl_printview.php index 77bcd2b6eb..48e1b9731a 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -11,12 +11,7 @@ */ require_once 'libraries/common.inc.php'; -/** - * Gets the variables sent or posted to this script, then displays headers - */ -if (! isset($selected_tbl)) { - include_once 'libraries/header_printview.inc.php'; -} +PMA_Header::getInstance()->enablePrintView(); require 'libraries/tbl_common.inc.php'; @@ -61,7 +56,6 @@ if (isset($selected_tbl) && is_array($selected_tbl)) { $multi_tables = (count($the_tables) > 1); if ($multi_tables) { - PMA_Header::getInstance()->display(); $tbl_list = ''; foreach ($the_tables as $key => $table) { $tbl_list .= (empty($tbl_list) ? '' : ', ')