diff --git a/ChangeLog b/ChangeLog index 531fb70e9..1940239ea 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-11-18 Alexander M. Turek + * libraries/common.lib.php: Recognizing new 2.x config.inc.php revisions. + 2003-11-18 Marc Delisle * lang/*: strUpgradeMySQL -> strUpgrade with one more parameter for the product name @@ -20,7 +23,7 @@ $Source$ * read_dump.php3: Show result of last SHOW query when multiple queries. * scripts/create-release.sh: Generate also sizes of files, for files.inc.php on homepage. - + 2003-11-17 Marc Delisle * lang/french: update * lang/turkish update, thanks to Bora Alioglu diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 74a41411b..7b154d116 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -135,7 +135,16 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} * Includes compatibility code for older config.inc.php revisions * if necessary */ - if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 211) { + if (isset($cfg['FileRevision'])) { + // converting revision string into an array + // e.g. "Revision: 2.0" becomes array(2, 0). + $cfg['FileRevision'] = str_replace('$Revision$cfg['FileRevision']); + $cfg['FileRevision'] = str_replace(' $', '', $cfg['FileRevision']); + $cfg['FileRevision'] = explode('.', $cfg['FileRevision']); + } else { + $cfg['FileRevision'] = array(1, 1); + } + if ($cfg['FileRevision'][0] < 2) { include('./libraries/config_import.lib.php'); }