diff --git a/ChangeLog b/ChangeLog index 23587528f..96eaacf69 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,19 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-08-09 Robin Johnson + * Documentation.html: + - Updates for SQL Parser + +2002-08-08 Robin Johnson + * Documentation.html: + - Cleaned up and re-arranged Configuration section to match + config.inc.php3 + * config.inc.php3: + - Cleaned up and re-arranged Configuration section to match + config.inc.php3 + + 2002-08-08 Loïc Chapeaux * left.php3: xhtml fixes (id name must start with a letter). * pdf_pages.php3, tbl_printview.php3, tbl_realtion.php3, diff --git a/Documentation.html b/Documentation.html index 1a50bf51d..6e86cefbc 100755 --- a/Documentation.html +++ b/Documentation.html @@ -437,7 +437,15 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' $HTTP_SERVER_VARS or $GLOBALS in this case.

- +
$cfg['PmaAbsoluteUri_DisableWarning'] boolean
+
+ By default, when you leave $cfg['PmaAbsoluteUri'] empty, and the system + detects your absolute URI automatically, we display a warning to remind + you. If you have tested the automatic detection, and it works perfectly + for your setup, then you can set this variable to squelch the warning. +

+
+
$cfg['PmaNoRelation_DisableWarning'] boolean
Starting with version 2.3.0 phpMyAdmin offers a lot of features to work @@ -976,11 +984,17 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' displayed when you're about to loose data.

- -
$cfg['ShowTooltip'] boolean
+ +
$cfg['LoginCookieRecall'] boolean
- Defines whether to display table comment as tooltip in left frame or - not. + Define whether the previous login should be recalled or not in cookie + authentication mode. +

+
+ +
$cfg['UseDbSearch'] boolean
+
+ Define whether the "search string inside database" is enabled or not.

@@ -990,6 +1004,22 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' tables in the left frame (smaller page).

+ +
$cfg['ShowTooltip'] boolean
+
+ Defines whether to display table comment as tooltip in left frame or + not. +

+
+ +
$cfg['ShowStats'] boolean
+
+ Defines whether to display space usage and statistics about databases + and tables or not.
+ Note that statistics requires at least MySQL 3.23.3 and that, at this + date, MySQL doesn't return such information for Berkeley DB tables. +

+
$cfg['ShowMysqlInfo'] boolean
@@ -1024,28 +1054,6 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

-
$cfg['LoginCookieRecall'] boolean
-
- Define whether the previous login should be recalled or not in cookie - authentication mode. -

-
- -
$cfg['UseDbSearch'] boolean
-
- Define whether the "search string inside database" is enabled or not. -

-
- -
$cfg['ShowStats'] boolean
-
- Defines whether to display space usage and statistics about databases - and tables or not.
- Note that statistics requires at least MySQL 3.23.3 and that, at this - date, MySQL doesn't return such information for Berkeley DB tables. -

-
-
$cfg['ShowBlob'] boolean
Defines whether BLOB fields are shown when browsing a table's @@ -1291,8 +1299,89 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
$cfg['RepeatCells'] integer
- Repeat the headers every X cells, or 0 to deactivate. -

+ Repeat the headers every X cells, or 0 to deactivate. +

+
+ +
$cfg['SQP']['enable'] boolean
+
+ As of phpMyAdmin 2.3.0, we now have a fully functional SQL Parser system. + It is enabled by default, as it is used to format the SQL queries. +
+ As of 2.3.1, it will become an integral part of phpMyAdmin, as it will + analyze certain queries to improve the behavior of phpMyAdmin. But as + it is very new, and not yet heavily used, we offer you an option to + turn it off. +

+
+ +
$cfg['SQP']['fmtType'] string [html|none]
+
+ The main use of the new SQL Parser is to pretty-print SQL queries. By + default we use HTML to format the query, but you can disable this by + setting this varible to 'none' +

+
+ +
$cfg['SQP']['fmtInd'] float
+ $cfg['SQP']['fmtIndUnit'] string [em|px|pt|ex]
+
+ For the pretty-printing of SQL queries, under some cases the part of a + query inside a bracket is indented. By changing + $cfg['SQP']['fmtInd'] you can change the amount of this indent. +
Related in purpose is $cfg['SQP']['fmtIndUnit'] which + specifies the units of the indent amount that you specified. This is + used via stylesheets. +

+
+ +
$cfg['SQP']['fmtColor'] array of string tuples
+
+ This array is used to define the colours for each type of element of + the pretty-printed SQL queries. The tuple format is
+ class => [HTML colour code | empty string]
+ If you specify an empty string for the color of a class, it is ignored + in creating the stylesheet. + You should not alter the class names, only the colour strings.
+ Class name key:
+
    +
  • comment Applies to all comment sub-classes
  • +
  • comment_mysql Comments as "#...\n"
  • +
  • comment_ansi Comments as "-- ...\n"
  • +
  • comment_c Comments as "/*...*/"
  • +
  • digit Applies to all digit sub-classes
  • +
  • digit_hex Hexadecimal numbers
  • +
  • digit_integer Integer numbers
  • +
  • digit_float Floating point numbers
  • +
  • punct Applies to all punctuation sub-classes
  • +
  • punct_bracket_open_round Opening brackets"("
  • +
  • punct_bracket_close_round Closing brackets ")"
  • +
  • punct_listsep List item seperator ","
  • +
  • punct_qualifier Table/Column Qualifer "."
  • +
  • punct_queryend End of query marker ";"
  • +
  • alpha Applies to all alphabetic classes
  • +
  • alpha_columnType Identifers matching a column type
  • +
  • alpha_columnAttrib Identifers matching a database/table/column attribute
  • +
  • alpha_functionName Identifiers matching a MySQL function name
  • +
  • alpha_reservedWord Identifiers matching any other reserved word
  • +
  • alpha_variable Identifers matching a SQL variable "@foo"
  • +
  • alpha_identifier All other identifiers
  • +
  • quote Applies to all quotation mark classes
  • +
  • quote_double Double quotes "
  • +
  • quote_single Single quotes '
  • +
  • quote_backtick Backtick quotes `
  • +

+
+ +
$cfg['SQLValidator']['use'] boolean
+
TODO +

+
+ +
$cfg['SQLValidator']['username'] string
+ $cfg['SQLValidator']['password'] string
+
TODO +

$cfg['ColumnTypes'] array
@@ -1316,14 +1405,6 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'

-
$cfg['keywords'] array
-
- A list of keywords that is used for syntax coloring. All keywords that - are in this list will also get a new line before them.
- Usually you won't need to change those. -

-
- @@ -2157,6 +2238,12 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' work with it, nor delete it.

+

+ [6.14] How do I set up the SQL validator? +
+ TODO +

+

[7. phpMyAdmin project]

@@ -2354,6 +2441,7 @@ CREDITS, in chronological order * sync'ed different existing CVS trees with new features and bugfixes * multi-language improvements, dynamic language selection * current project maintainer + * many bugfixes and improvements [lc] - Loïc Chapeaux <lolo_at_phpheaven.net> * rewrote and optimized javascript, DHTML and DOM stuff @@ -2366,7 +2454,10 @@ CREDITS, in chronological order * database maintence controls * table type code * Host authentication IP Allow/Deny - * DB-based configuration + * DB-based configuration (Not completed) + * SQL parser + * SQL validator + * many bugfixes and improvements [af] - Armel Fauveau <armel.fauveau_at_globalis-ms.com> * bookmarks feature @@ -2398,6 +2489,7 @@ CREDITS, in chronological order * XML exports * various small features and fixes * German language file updates + * many bugfixes and improvements [mb] - Mike Beck <mike.beck_at_ibmiller.de> * automatic joins in QBE @@ -2425,7 +2517,7 @@ code since version 2.1.0: - Maxime Delorme <delorme.maxime at free.fr> for the PDF schema output; thanks also to Olivier Plathey for the "FPDF" library (see http://www.fpdf.org/). - +- Olof Edlund <olof.edlund at upright.se> for the SQL validator server. And also to the following people who have contributed minor changes, enhancements, bugfixes or support for a new language since version 2.1.0: diff --git a/config.inc.php3 b/config.inc.php3 index f7889f879..5c3de0b8f 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -88,10 +88,10 @@ $cfg['Servers'][$i]['table_info'] = ''; // table to describe the dis // - leave blank for no display fields support $cfg['Servers'][$i]['table_coords'] = ''; // table to describe the tables position for the PDF // schema - leave blank for no PDF schema support -$cfg['Servers'][$i]['column_comments'] // table to store columncomments - = ''; - // - leave blank if you don't want to use this $cfg['Servers'][$i]['pdf_pages'] = ''; // table to describe pages of relationpdf + // - leave blank if you don't want to use this +$cfg['Servers'][$i]['column_comments'] // table to store columncomments + = ''; // - leave blank if you don't want to use this $cfg['Servers'][$i]['AllowDeny']['order'] // Host authentication order, leave blank to not use = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] // Host authentication rules, leave blank for defaults @@ -115,8 +115,8 @@ $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info'] = ''; $cfg['Servers'][$i]['table_coords'] = ''; -$cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; +$cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] @@ -139,8 +139,8 @@ $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info'] = ''; $cfg['Servers'][$i]['table_coords'] = ''; -$cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; +$cfg['Servers'][$i]['column_comments'] = ''; $cfg['Servers'][$i]['AllowDeny']['order'] = ''; $cfg['Servers'][$i]['AllowDeny']['rules'] @@ -237,6 +237,10 @@ $cfg['ManualBaseShort'] = 'http://www.mysql.com/doc'; // Default language to use, if not browser-defined or user-defined $cfg['DefaultLang'] = 'en-iso-8859-1'; +// Force: always use this language - must be defined in +// libraries/select_lang.lib.php3 +// $cfg['Lang'] = 'en-iso-8859-1'; + // Default charset to use for recoding of MySQL queries, does not take // any effect when charsets recoding is switched off by // $cfg['AllowAnywhereRecoding'] or in language file @@ -249,93 +253,6 @@ $cfg['DefaultCharset'] = 'iso-8859-1'; // extension and where dl() is not supported $cfg['AllowAnywhereRecoding'] = FALSE; -// Force: always use this language - must be defined in -// libraries/select_lang.lib.php3 -// $cfg['Lang'] = 'en-iso-8859-1'; -// Loads language file -require('./libraries/select_lang.lib.php3'); - - -/** - * Customization & design - */ -$cfg['LeftWidth'] = 150; // left frame width -$cfg['LeftBgColor'] = '#D0DCE0'; // background color for the left frame -$cfg['LeftPointerColor'] = '#CCFFCC'; // color of the pointer in left frame - // (blank for no pointer) -$cfg['RightBgColor'] = '#F5F5F5'; // background color for the right frame -$cfg['RightBgImage'] = ''; // path to a background image for the right frame - // (leave blank for no background image) -$cfg['Border'] = 0; // border width on tables -$cfg['ThBgcolor'] = '#D3DCE3'; // table header row colour -$cfg['BgcolorOne'] = '#CCCCCC'; // table data row colour -$cfg['BgcolorTwo'] = '#DDDDDD'; // table data row colour, alternate -$cfg['BrowsePointerColor'] = '#CCFFCC'; // color of the pointer in browse mode - // (blank for no pointer) -$cfg['BrowseMarkerColor'] = '#FFCC99'; // color of the marker (visually marks row - // by clicking on it) in browse mode - // (blank for no marker) -$cfg['TextareaCols'] = 40; // textarea size (columns) in edit mode - // (this value will be emphasized (*2) for sql - // query textareas) -$cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode -$cfg['LimitChars'] = 50; // max field data length in browse mode -$cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse - // (or at the top with vertical browse) -$cfg['ModifyDeleteAtRight'] = FALSE; // show edit/delete links on right side of browse - // (or at the bottom with vertical browse) -$cfg['DefaultDisplay'] = 'horizontal'; // default display direction (horizontal|vertical) -$cfg['RepeatCells'] = 100; // repeat header names every X cells? (0 = deactivate) - -/** - * SQL Query box settings - * These are the links display in all of the SQL Query boxes - */ -$cfg['SQLQuery']['Edit'] = TRUE; // Edit link to change a query -$cfg['SQLQuery']['Explain'] = TRUE; // EXPLAIN on SELECT queries -$cfg['SQLQuery']['ShowAsPHP'] = TRUE; // Wrap a query in PHP -$cfg['SQLQuery']['Validate'] = FALSE; // Validate a query (see $cfg['SQLValidator'] as well) - - -/** - * If you wish to use the SQL Validator service, you shoule be - * aware of the following: - * All SQL statements are stored anonymously for statistical purposes. - * Mimer SQL Validator, Copyright 2002 Upright Database Technology. - * All rights reserved. - */ -$cfg['SQLValidator']['use'] = FALSE; // Make the SQL Validator available -$cfg['SQLValidator']['username'] = ''; // If you have a custom username, specify it here (defaults to anonymous) -$cfg['SQLValidator']['password'] = ''; // Password for username -$cfg['SQLValidator']['DisplayCopyright'] = TRUE; // It is possible to strip the copyright, but strongly discouraged - -/** - * SQL Parser Settings - */ -$cfg['SQP']['enable'] = TRUE; // Totally turn off the SQL Parser (not recommended) -$cfg['SQP']['fmtType'] = 'html'; // Pretty-printing style to use on queries (html, none) -$cfg['SQP']['fmtInd'] = '1'; // Amount to indent each level (floats ok) -$cfg['SQP']['fmtIndUnit'] = 'em'; // Units for indenting each level (CSS Types - {em,px,pt}) -$cfg['SQP']['fmtColor'] = array( // Syntax colouring data - 'comment' => '#808000', - 'digit' => '', - 'digit_hex' => 'teal', - 'digit_integer' => 'teal', - 'digit_float' => 'aqua', - 'punct' => 'fuchsia', - 'alpha' => '', - 'alpha_columnType' => '#FF9900', - 'alpha_columnAttrib' => '#0000FF', - 'alpha_reservedWord' => '#990099', - 'alpha_functionName' => '#FF0000', - 'alpha_identifier' => 'black', - 'alpha_variable' => '#800000', - 'quote' => '#008000', - 'quote_double' => '', - 'quote_single' => '', - 'quote_backtick' => '' -); - /** * Available charsets for MySQL conversion. currently contains all which could * be found in lang/* files and few more. @@ -375,6 +292,91 @@ $cfg['AvailableCharsets'] = array( 'SHIFT_JIS' ); +// Loads language file +require('./libraries/select_lang.lib.php3'); + + +/** + * Customization & design + */ +$cfg['LeftWidth'] = 150; // left frame width +$cfg['LeftBgColor'] = '#D0DCE0'; // background color for the left frame +$cfg['RightBgColor'] = '#F5F5F5'; // background color for the right frame +$cfg['RightBgImage'] = ''; // path to a background image for the right frame + // (leave blank for no background image) +$cfg['LeftPointerColor'] = '#CCFFCC'; // color of the pointer in left frame + // (blank for no pointer) +$cfg['Border'] = 0; // border width on tables +$cfg['ThBgcolor'] = '#D3DCE3'; // table header row colour +$cfg['BgcolorOne'] = '#CCCCCC'; // table data row colour +$cfg['BgcolorTwo'] = '#DDDDDD'; // table data row colour, alternate +$cfg['BrowsePointerColor'] = '#CCFFCC'; // color of the pointer in browse mode + // (blank for no pointer) +$cfg['BrowseMarkerColor'] = '#FFCC99'; // color of the marker (visually marks row + // by clicking on it) in browse mode + // (blank for no marker) +$cfg['TextareaCols'] = 40; // textarea size (columns) in edit mode + // (this value will be emphasized (*2) for sql + // query textareas) +$cfg['TextareaRows'] = 7; // textarea size (rows) in edit mode +$cfg['LimitChars'] = 50; // max field data length in browse mode +$cfg['ModifyDeleteAtLeft'] = TRUE; // show edit/delete links on left side of browse + // (or at the top with vertical browse) +$cfg['ModifyDeleteAtRight'] = FALSE; // show edit/delete links on right side of browse + // (or at the bottom with vertical browse) +$cfg['DefaultDisplay'] = 'horizontal'; // default display direction (horizontal|vertical) +$cfg['RepeatCells'] = 100; // repeat header names every X cells? (0 = deactivate) + +/** + * SQL Query box settings + * These are the links display in all of the SQL Query boxes + */ +$cfg['SQLQuery']['Edit'] = TRUE; // Edit link to change a query +$cfg['SQLQuery']['Explain'] = TRUE; // EXPLAIN on SELECT queries +$cfg['SQLQuery']['ShowAsPHP'] = TRUE; // Wrap a query in PHP +$cfg['SQLQuery']['Validate'] = FALSE; // Validate a query (see $cfg['SQLValidator'] as well) + +/** + * SQL Parser Settings + */ +$cfg['SQP']['enable'] = TRUE; // Totally turn off the SQL Parser (not recommended) +$cfg['SQP']['fmtType'] = 'html'; // Pretty-printing style to use on queries (html, none) +$cfg['SQP']['fmtInd'] = '1'; // Amount to indent each level (floats ok) +$cfg['SQP']['fmtIndUnit'] = 'em'; // Units for indenting each level (CSS Types - {em,px,pt}) +$cfg['SQP']['fmtColor'] = array( // Syntax colouring data + 'comment' => '#808000', + 'comment_mysql' => '', + 'comment_ansi' => '', + 'comment_c' => '', + 'digit' => '', + 'digit_hex' => 'teal', + 'digit_integer' => 'teal', + 'digit_float' => 'aqua', + 'punct' => 'fuchsia', + 'alpha' => '', + 'alpha_columnType' => '#FF9900', + 'alpha_columnAttrib' => '#0000FF', + 'alpha_reservedWord' => '#990099', + 'alpha_functionName' => '#FF0000', + 'alpha_identifier' => 'black', + 'alpha_variable' => '#800000', + 'quote' => '#008000', + 'quote_double' => '', + 'quote_single' => '', + 'quote_backtick' => '' +); + + +/** + * If you wish to use the SQL Validator service, you shoule be + * aware of the following: + * All SQL statements are stored anonymously for statistical purposes. + * Mimer SQL Validator, Copyright 2002 Upright Database Technology. + * All rights reserved. + */ +$cfg['SQLValidator']['use'] = FALSE; // Make the SQL Validator available +$cfg['SQLValidator']['username'] = ''; // If you have a custom username, specify it here (defaults to anonymous) +$cfg['SQLValidator']['password'] = ''; // Password for username /** * MySQL settings