From 91a3375289209c89d99a68a10d85426eca5199f2 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Sun, 4 Aug 2002 10:59:29 +0000 Subject: [PATCH] Backwards compatibility etc. --- ChangeLog | 4 ++ config.inc.php3 | 1 + libraries/common.lib.php3 | 2 +- libraries/config_import.lib.php3 | 116 +++++++++++++++++++++++++++---- 4 files changed, 110 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 103a07738..dd1fe4a78 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ $Source$ 2002-08-04 Alexander M. Turek * libraries/common.lib.php3, line 88: default language should be en-iso-8859-1. + * libraries/common.lib.php3, libraries/config_import.lib.php3: Backwards + compatibility for config file revisions before 1.131. + * config.inc.php3: Display syntax errors when the user calls the config file + directly even if "display_errors" has been switched off in php.ini. 2002-08-03 Marc Delisle * Documentation.html: remove unneeded GRANT diff --git a/config.inc.php3 b/config.inc.php3 index 38db1109e..f7889f879 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -14,6 +14,7 @@ */ if (!isset($old_error_reporting)) { error_reporting(E_ALL); + @ini_set('display_errors','1'); } diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 3d6898079..93904d2a9 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -128,7 +128,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold} * Includes compatibility code for older config.inc.php3 revisions * if necessary */ - if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 120) { + if (!isset($cfg['FileRevision']) || (int) substr($cfg['FileRevision'], 13, 3) < 131) { include('./libraries/config_import.lib.php3'); } diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index af1c2b306..4400cf535 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -571,28 +571,120 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')){ } } - if (!isset($cfg['UseSyntaxColoring'])) { - $cfg['UseSyntaxColoring'] = TRUE; + if (!isset($cfg['SQLQuery']['Edit'])) { + $cfg['SQLQuery']['Edit'] = TRUE; } - if (!isset($cfg['colorFunctions'])) { - $cfg['colorFunctions'] = '#FF0000'; + if (!isset($cfg['SQLQuery']['Explain'])) { + $cfg['SQLQuery']['Explain'] = TRUE; } - if (!isset($cfg['colorKeywords'])) { - $cfg['colorKeywords'] = '#990099'; + if (!isset($cfg['SQLQuery']['ShowAsPHP'])) { + $cfg['SQLQuery']['ShowAsPHP'] = TRUE; } - if (!isset($cfg['colorStrings'])) { - $cfg['colorStrings'] = '#008000'; + if (!isset($cfg['SQLQuery']['Validate'])) { + $cfg['SQLQuery']['Validate'] = FALSE; } - if (!isset($cfg['colorColType'])) { - $cfg['colorColType'] = '#FF9900'; + if (!isset($cfg['SQLValidator']['use'])) { + $cfg['SQLValidator']['use'] = FALSE; } - if (!isset($cfg['colorAdd'])) { - $cfg['colorAdd'] = '#0000FF'; + if (!isset($cfg['SQLValidator']['username'])) { + $cfg['SQLValidator']['username'] = ''; + } + + if (!isset($cfg['SQLValidator']['password'])) { + $cfg['SQLValidator']['password'] = ''; + } + + if (!isset($cfg['SQLValidator']['DisplayCopyright'])) { + $cfg['SQLValidator']['DisplayCopyright'] = TRUE; + } + + if (!isset($cfg['SQP']['enable'])) { + $cfg['SQP']['enable'] = TRUE; + } + + if (!isset($cfg['SQP']['fmtType'])) { + $cfg['SQP']['fmtType'] = 'html'; + } + + if (!isset($cfg['SQP']['fmtInd'])) { + $cfg['SQP']['fmtInd'] = '1'; + } + + if (!isset($cfg['SQP']['fmtIndUnit'])) { + $cfg['SQP']['fmtIndUnit'] = 'em'; + } + + if (!isset($cfg['SQP']['fmtColor']['comment'])) { + $cfg['SQP']['fmtColor']['comment'] = '#808000'; + } + + if (!isset($cfg['SQP']['fmtColor']['digit'])) { + $cfg['SQP']['fmtColor']['digit'] = ''; + } + + if (!isset($cfg['SQP']['fmtColor']['digit_hex'])) { + $cfg['SQP']['fmtColor']['digit_hex'] = 'teal'; + } + + if (!isset($cfg['SQP']['fmtColor']['digit_integer'])) { + $cfg['SQP']['fmtColor']['digit_integer'] = 'teal'; + } + + if (!isset($cfg['SQP']['fmtColor']['digit_float'])) { + $cfg['SQP']['fmtColor']['digit_float'] = 'aqua'; + } + + if (!isset($cfg['SQP']['fmtColor']['punct'])) { + $cfg['SQP']['fmtColor']['punct'] = 'fuchsia'; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha'])) { + $cfg['SQP']['fmtColor']['alpha'] = ''; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha_columnType'])) { + $cfg['SQP']['fmtColor']['alpha_columnType'] = '#FF9900'; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha_columnAttrib'])) { + $cfg['SQP']['fmtColor']['alpha_columnAttrib'] = '#0000FF'; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha_reservedWord'])) { + $cfg['SQP']['fmtColor']['alpha_reservedWord'] = '#990099'; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha_functionName'])) { + $cfg['SQP']['fmtColor']['alpha_functionName'] = '#FF0000'; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha_identifier'])) { + $cfg['SQP']['fmtColor']['alpha_identifier'] = 'black'; + } + + if (!isset($cfg['SQP']['fmtColor']['alpha_variable'])) { + $cfg['SQP']['fmtColor']['alpha_variable'] = '#800000'; + } + + if (!isset($cfg['SQP']['fmtColor']['quote'])) { + $cfg['SQP']['fmtColor']['quote'] = '#008000'; + } + + if (!isset($cfg['SQP']['fmtColor']['quote_double'])) { + $cfg['SQP']['fmtColor']['quote_double'] = ''; + } + + if (!isset($cfg['SQP']['fmtColor']['quote_single'])) { + $cfg['SQP']['fmtColor']['quote_single'] = ''; + } + + if (!isset($cfg['SQP']['fmtColor']['quote_backtick'])) { + $cfg['SQP']['fmtColor']['quote_backtick'] = ''; } if (!isset($cfg['AvailableCharsets'])) {