The branch, QA_3_3 has been updated
via 893abac3e516b3f6143925a5f24c8bc463639167 (commit)
from a29323a1a6d1a3d4e65d80f0719b4199c18c3f4a (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
libraries/common.lib.php | 71 ----------------------------------------------
libraries/core.lib.php | 71 ++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 72 insertions(+), 71 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8079e70..f53c063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@ $HeadURL:
https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug [doc] Withdraw or edit FAQ entries related to older MySQL or PHP
- bug #3042706 [pmadb] Relations, bookmarks, etc deleted after table drop
- bug #3044189 [doc] Cleared documentation for hide_db.
+- bug #3042495 [core] Move PMA_sendHeaderLocation to core.lib.php.
3.3.5.0 (2010-07-26)
- patch #2932113 [information_schema] Slow export when having lots of
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 8118598..1a62769 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -684,77 +684,6 @@ function PMA_mysqlDie($error_message = '', $the_query =
'',
} // end of the 'PMA_mysqlDie()' function
/**
- * Send HTTP header, taking IIS limits into account (600 seems ok)
- *
- * @uses PMA_IS_IIS
- * @uses PMA_COMING_FROM_COOKIE_LOGIN
- * @uses PMA_get_arg_separator()
- * @uses SID
- * @uses strlen()
- * @uses strpos()
- * @uses header()
- * @uses session_write_close()
- * @uses headers_sent()
- * @uses function_exists()
- * @uses debug_print_backtrace()
- * @uses trigger_error()
- * @uses defined()
- * @param string $uri the header to send
- * @return boolean always true
- */
-function PMA_sendHeaderLocation($uri)
-{
- if (PMA_IS_IIS && strlen($uri) > 600) {
-
- echo '<html><head><title>- - -</title>' .
"\n";
- echo '<meta http-equiv="expires" content="0">'
. "\n";
- echo '<meta http-equiv="Pragma"
content="no-cache">' . "\n";
- echo '<meta http-equiv="Cache-Control"
content="no-cache">' . "\n";
- echo '<meta http-equiv="Refresh" content="0;url=' .$uri
. '">' . "\n";
- echo '<script type="text/javascript">' . "\n";
- echo '//<![CDATA[' . "\n";
- echo 'setTimeout("window.location = unescape(\'"' . $uri .
'"\')", 2000);' . "\n";
- echo '//]]>' . "\n";
- echo '</script>' . "\n";
- echo '</head>' . "\n";
- echo '<body>' . "\n";
- echo '<script type="text/javascript">' . "\n";
- echo '//<![CDATA[' . "\n";
- echo 'document.write(\'<p><a href="' . $uri .
'">' . $GLOBALS['strGo'] . '</a></p>\');'
. "\n";
- echo '//]]>' . "\n";
- echo '</script></body></html>' . "\n";
-
- } else {
- if (SID) {
- if (strpos($uri, '?') === false) {
- header('Location: ' . $uri . '?' . SID);
- } else {
- $separator = PMA_get_arg_separator();
- header('Location: ' . $uri . $separator . SID);
- }
- } else {
- session_write_close();
- if (headers_sent()) {
- if (function_exists('debug_print_backtrace')) {
- echo '<pre>';
- debug_print_backtrace();
- echo '</pre>';
- }
- trigger_error('PMA_sendHeaderLocation called when headers are already
sent!', E_USER_ERROR);
- }
- // bug #1523784: IE6 does not like 'Refresh: 0', it
- // results in a blank page
- // but we need it when coming from the cookie login panel)
- if (PMA_IS_IIS && defined('PMA_COMING_FROM_COOKIE_LOGIN')) {
- header('Refresh: 0; ' . $uri);
- } else {
- header('Location: ' . $uri);
- }
- }
- }
-}
-
-/**
* returns array with tables of given db with extended information and grouped
*
* @uses $cfg['LeftFrameTableSeparator']
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index a449710..3e6cc00 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -591,4 +591,75 @@ function PMA_setCookie($cookie, $value, $default = null, $validity =
null, $http
// cookie has already $value as value
return true;
}
+
+/**
+ * Send HTTP header, taking IIS limits into account (600 seems ok)
+ *
+ * @uses PMA_IS_IIS
+ * @uses PMA_COMING_FROM_COOKIE_LOGIN
+ * @uses PMA_get_arg_separator()
+ * @uses SID
+ * @uses strlen()
+ * @uses strpos()
+ * @uses header()
+ * @uses session_write_close()
+ * @uses headers_sent()
+ * @uses function_exists()
+ * @uses debug_print_backtrace()
+ * @uses trigger_error()
+ * @uses defined()
+ * @param string $uri the header to send
+ * @return boolean always true
+ */
+function PMA_sendHeaderLocation($uri)
+{
+ if (PMA_IS_IIS && strlen($uri) > 600) {
+
+ echo '<html><head><title>- - -</title>' .
"\n";
+ echo '<meta http-equiv="expires" content="0">'
. "\n";
+ echo '<meta http-equiv="Pragma"
content="no-cache">' . "\n";
+ echo '<meta http-equiv="Cache-Control"
content="no-cache">' . "\n";
+ echo '<meta http-equiv="Refresh" content="0;url=' .$uri
. '">' . "\n";
+ echo '<script type="text/javascript">' . "\n";
+ echo '//<![CDATA[' . "\n";
+ echo 'setTimeout("window.location = unescape(\'"' . $uri .
'"\')", 2000);' . "\n";
+ echo '//]]>' . "\n";
+ echo '</script>' . "\n";
+ echo '</head>' . "\n";
+ echo '<body>' . "\n";
+ echo '<script type="text/javascript">' . "\n";
+ echo '//<![CDATA[' . "\n";
+ echo 'document.write(\'<p><a href="' . $uri .
'">' . $GLOBALS['strGo'] . '</a></p>\');'
. "\n";
+ echo '//]]>' . "\n";
+ echo '</script></body></html>' . "\n";
+
+ } else {
+ if (SID) {
+ if (strpos($uri, '?') === false) {
+ header('Location: ' . $uri . '?' . SID);
+ } else {
+ $separator = PMA_get_arg_separator();
+ header('Location: ' . $uri . $separator . SID);
+ }
+ } else {
+ session_write_close();
+ if (headers_sent()) {
+ if (function_exists('debug_print_backtrace')) {
+ echo '<pre>';
+ debug_print_backtrace();
+ echo '</pre>';
+ }
+ trigger_error('PMA_sendHeaderLocation called when headers are already
sent!', E_USER_ERROR);
+ }
+ // bug #1523784: IE6 does not like 'Refresh: 0', it
+ // results in a blank page
+ // but we need it when coming from the cookie login panel)
+ if (PMA_IS_IIS && defined('PMA_COMING_FROM_COOKIE_LOGIN')) {
+ header('Refresh: 0; ' . $uri);
+ } else {
+ header('Location: ' . $uri);
+ }
+ }
+ }
+}
?>
hooks/post-receive
--
phpMyAdmin