backwards compatibility

This commit is contained in:
Alexander M. Turek
2003-02-24 22:45:12 +00:00
parent 67eee6d625
commit ea5b1b7634
2 changed files with 13 additions and 10 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2003-02-24 Alexander M. Turek <rabus@users.sourceforge.net>
* common.lib.php3: Backwards compatibility.
2003-02-24 Garvin Hicking <me@supergarv.de> 2003-02-24 Garvin Hicking <me@supergarv.de>
Submitted multiple patches from the patch tracker: Submitted multiple patches from the patch tracker:
@@ -58,10 +61,10 @@ $Source$
tbl_query_box.php3, common.lib.php3 tbl_query_box.php3, common.lib.php3
2003-02-24 Olivier L. M<>ller <om@omnis.ch> 2003-02-24 Olivier L. M<>ller <om@omnis.ch>
* libraries/common.lib.php3: if $cfg['PmaAbsoluteUri'] is empty and * libraries/common.lib.php3: if $cfg['PmaAbsoluteUri'] is empty and
port == 80 or port == 443, do not add ":80" or ":443" anymore to the port == 80 or port == 443, do not add ":80" or ":443" anymore to the
generated URL -> prevents a double password query with some browsers generated URL -> prevents a double password query with some browsers
(Safari) in case of http authentication. (tested with https, http and (Safari) in case of http authentication. (tested with https, http and
http running on port 8080) http running on port 8080)
2003-02-24 Michal Cihar <nijel@users.sourceforge.net> 2003-02-24 Michal Cihar <nijel@users.sourceforge.net>

View File

@@ -130,7 +130,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
* Includes compatibility code for older config.inc.php3 revisions * Includes compatibility code for older config.inc.php3 revisions
* if necessary * if necessary
*/ */
if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 156) { if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 161) {
include('./libraries/config_import.lib.php3'); include('./libraries/config_import.lib.php3');
} }
@@ -525,8 +525,8 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
$cfg['PmaAbsoluteUri'] = ((!empty($HTTP_SERVER_VARS['HTTPS']) && strtolower($HTTP_SERVER_VARS['HTTPS']) != 'off') ? 'https' : 'http') . '://' $cfg['PmaAbsoluteUri'] = ((!empty($HTTP_SERVER_VARS['HTTPS']) && strtolower($HTTP_SERVER_VARS['HTTPS']) != 'off') ? 'https' : 'http') . '://'
. $HTTP_SERVER_VARS['HTTP_HOST']; . $HTTP_SERVER_VARS['HTTP_HOST'];
// if $cfg['PmaAbsoluteUri'] is empty and port == 80 or port == 443, do not add ":80" or ":443" // if $cfg['PmaAbsoluteUri'] is empty and port == 80 or port == 443, do not add ":80" or ":443"
// to the generated URL -> prevents a double password query in case of http authentication. // to the generated URL -> prevents a double password query in case of http authentication.
if (!(!$port_in_HTTP_HOST && !empty($HTTP_SERVER_VARS['SERVER_PORT']) && ($HTTP_SERVER_VARS['SERVER_PORT'] == 80 || $HTTP_SERVER_VARS['SERVER_PORT'] == 443))) { if (!(!$port_in_HTTP_HOST && !empty($HTTP_SERVER_VARS['SERVER_PORT']) && ($HTTP_SERVER_VARS['SERVER_PORT'] == 80 || $HTTP_SERVER_VARS['SERVER_PORT'] == 443))) {
$cfg['PmaAbsoluteUri'] .= ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : ''); $cfg['PmaAbsoluteUri'] .= ((!empty($HTTP_SERVER_VARS['SERVER_PORT']) && !$port_in_HTTP_HOST) ? ':' . $HTTP_SERVER_VARS['SERVER_PORT'] : '');
@@ -1269,7 +1269,7 @@ if (typeof(document.getElementById) != 'undefined'
if ($cfg['QueryFrameJS'] && $cfg['QueryFrame']) { if ($cfg['QueryFrameJS'] && $cfg['QueryFrame']) {
$onclick = 'onclick="focus_querywindow(); return false;"'; $onclick = 'onclick="focus_querywindow(); return false;"';
} }
$edit_link = '&nbsp;[<a href="' $edit_link = '&nbsp;[<a href="'
. $edit_target . $edit_target
. $url_qpart . $url_qpart
@@ -1678,7 +1678,7 @@ if (typeof(document.getElementById) != 'undefined'
function PMA_flipstring($string, $seperator = "<br />\n") { function PMA_flipstring($string, $seperator = "<br />\n") {
$format_string = ''; $format_string = '';
$charbuff = false; $charbuff = false;
for ($i = 0; $i <= strlen($string); $i++) { for ($i = 0; $i <= strlen($string); $i++) {
$char = substr($string, $i, 1); $char = substr($string, $i, 1);
$append = false; $append = false;
@@ -1737,7 +1737,7 @@ if (typeof(document.getElementById) != 'undefined'
$tmp_file = dirname($tmp_file); $tmp_file = dirname($tmp_file);
} }
$tmp_file .= '/' . basename($filename); $tmp_file .= '/' . basename($filename);
// User might have trailing slash in php.ini... // User might have trailing slash in php.ini...
return (ereg_replace('/+', '/', $tmp_file) == $filename); return (ereg_replace('/+', '/', $tmp_file) == $filename);
} // end of the 'is_uploaded_file()' emulated function } // end of the 'is_uploaded_file()' emulated function