diff --git a/ChangeLog b/ChangeLog index 03d58c43a..3a1d00b14 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 d1648a49c..a1c3c7bb4 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -674,77 +674,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 '
'; - debug_print_backtrace(); - echo ''; - } - 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 * @@ -2956,4 +2885,4 @@ function PMA_selectUploadFile($import_list, $uploaddir) { echo 'There are no files to upload'; } } -?> \ No newline at end of file +?> diff --git a/libraries/core.lib.php b/libraries/core.lib.php index d98320fe7..2355651a7 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 '
'; + debug_print_backtrace(); + echo ''; + } + 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); + } + } + } +} ?>