[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_5-7048-g5128563

Michal Čihař nijel at users.sourceforge.net
Fri Aug 20 11:11:47 CEST 2010


The branch, master has been updated
       via  5128563d076407fea7a60b0c8d4e6d648f592ead (commit)
       via  893abac3e516b3f6143925a5f24c8bc463639167 (commit)
      from  5f837f08c982eff232c52ab8f38e53f5d9a83e90 (commit)


- Log -----------------------------------------------------------------
commit 5128563d076407fea7a60b0c8d4e6d648f592ead
Merge: 5f837f08c982eff232c52ab8f38e53f5d9a83e90 893abac3e516b3f6143925a5f24c8bc463639167
Author: Michal Čihař <mcihar at novell.com>
Date:   Fri Aug 20 11:11:27 2010 +0200

    Merge branch 'QA_3_3'
    
    Conflicts:
    	libraries/common.lib.php
    	libraries/core.lib.php

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    1 +
 libraries/common.lib.php |   73 +---------------------------------------------
 libraries/core.lib.php   |   71 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+), 72 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 03d58c4..3a1d00b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -117,6 +117,7 @@ $Id$
 - 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 d1648a4..a1c3c7b 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -675,77 +675,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 . '">' . __('Go') . '</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']
@@ -2956,4 +2885,4 @@ function PMA_selectUploadFile($import_list, $uploaddir) {
         echo '<i>There are no files to upload</i>';
     }
 }
-?>
\ No newline at end of file
+?>
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index d98320f..2355651 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -502,4 +502,75 @@ function PMA_getenv($var_name) {
 
     return '';
 }
+
+/**
+ * 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 . '">' . __('Go') . '</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




More information about the Git mailing list