diff --git a/ChangeLog b/ChangeLog index fa79214c7..712fc0e46 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * Documentation.html, lines 766-770: added a link to the official MySQL documentation for the "socket error" problems. * index.php3, line 53; lang/*: out-sourced the "no frame" sentence. + * libraries/common.lib.php3: improved compatibility with the old phpMyAdmin + configuration file. 2001-10-16 Loïc Chapeaux * lang/*: cleanup thanks to Björn T. Hallberg - Removed unused strings diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index fd13186c3..822ff8e18 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -55,9 +55,6 @@ if (!defined('__LIB_COMMON__')){ if (!isset($pos)) { $pos = 0; } - if (!isset($cfgProtectBinary)) { - $cfgProtectBinary = FALSE; - } /** @@ -101,20 +98,50 @@ if (!defined('__LIB_COMMON__')){ * versions of phpMyAdmin/php/mysql... */ include('./config.inc.php3'); + // For compatibility with old config.inc.php3 + if (!isset($cfgShowStats)) { + $cfgShowStats = TRUE; + } + if (!isset($cfgShowTooltip)) { + $cfgShowTooltip = TRUE; + } + if (!isset($cfgShowAll)) { + $cfgShowAll = FALSE; + } + if (!isset($cfgProtectBinary)) { + if (isset($cfgProtectBlob)) { + $cfgProtectBinary = ($cfgProtectBlob ? 'blob' : FALSE); + unset($cfgProtectBlob); + } else { + $cfgProtectBinary = 'blob'; + } + } + if (!isset($cfgZipDump)) { + $cfgZipDump = (isset($cfgGZipDump) ? $cfgGZipDump : TRUE); + } + if (!isset($cfgLeftBgColor)) { + $cfgLeftBgColor = '#D0DCE0'; + } + if (!isset($cfgRightBgColor)) { + $cfgRightBgColor = '#F5F5F5'; + } if (!isset($cfgTextareaCols)) { - $cfgTextareaCols = 40; + $cfgTextareaCols = 40; } if (!isset($cfgTextareaRows)) { - $cfgTextareaRows = 7; + $cfgTextareaRows = 7; } + // Adds a trailing slash et the end of the phpMyAdmin uri if it does not // exist if ($cfgPmaAbsoluteUri != '' && substr($cfgPmaAbsoluteUri, -1) != '/') { $cfgPmaAbsoluteUri .= '/'; } + // Gets some constants include('./libraries/defines.lib.php3'); + // If zlib output compression is set in the php configuration file, no // output buffering should be run if (PHP_INT_VERSION < 40000