From a8ed8e61233ff0b6517b901160e99689ad7a92fd Mon Sep 17 00:00:00 2001 From: Crack Date: Tue, 20 Jul 2010 16:36:22 +0200 Subject: [PATCH] SQL Validator forms --- libraries/config/messages.inc.php | 8 ++++++++ libraries/config/setup.forms.php | 4 ++++ libraries/config/user_preferences.forms.php | 6 +++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php index 852e94db4..318ab2b98 100644 --- a/libraries/config/messages.inc.php +++ b/libraries/config/messages.inc.php @@ -208,6 +208,8 @@ $strConfigForm_Sql_box_desc = __('Customize links shown in SQL Query boxes'); $strConfigForm_Sql_desc = __('Customize default options'); $strConfigForm_Sql_queries = __('SQL queries'); $strConfigForm_Sql_queries_desc = __('SQL queries settings'); +$strConfigForm_Sql_validator = __('SQL Validator'); +$strConfigForm_Sql_validator_desc = __('If you wish to use the SQL Validator service, you should be aware that [strong]all SQL statements are stored anonymously for statistical purposes[/strong].[br][em][a@http://sqlvalidator.mimer.com/]Mimer SQL Validator[/a], Copyright 2002 Upright Database Technology. All rights reserved.[/em]'); $strConfigForm_Startup = __('Startup'); $strConfigForm_Startup_desc = __('Customize startup page'); $strConfigForm_Tabs = __('Tabs'); @@ -445,7 +447,13 @@ $strConfigSQLQuery_Edit_name = __('Edit'); $strConfigSQLQuery_Explain_name = __('Explain SQL'); $strConfigSQLQuery_Refresh_name = __('Refresh'); $strConfigSQLQuery_ShowAsPHP_name = __('Create PHP Code'); +$strConfigSQLQuery_Validate_desc = __('Requires [a@#tab_Sql_validator]SQL Validator[/a] to be enabled'); $strConfigSQLQuery_Validate_name = __('Validate SQL'); +$strConfigSQLValidator_password_name = __('Password'); +$strConfigSQLValidator_use_desc = __('[strong]Warning:[/strong] requires PEAR SOAP to be installed'); +$strConfigSQLValidator_use_name = __('Enable SQL Validator'); +$strConfigSQLValidator_username_name = __('Username'); +$strConfigSQLValidator_username_desc = __('If you have a custom username, specify it here (defaults to [kbd]anonymous[/kbd])'); $strConfigSuggestDBName_desc = __('Suggest a database name on the "Create Database" form (if possible) or keep the text field empty'); $strConfigSuggestDBName_name = __('Suggest new database name'); $strConfigTextareaCols_desc = __('Textarea size (columns) in edit mode, this value will be emphasized for SQL query textareas (*2) and for query window (*1.25)'); diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php index f1ee4dbf7..5a27413bb 100644 --- a/libraries/config/setup.forms.php +++ b/libraries/config/setup.forms.php @@ -129,6 +129,10 @@ $forms['Sql_queries']['Sql_box'] = array('SQLQuery' => array( 'ShowAsPHP', 'Validate', 'Refresh')); +$forms['Sql_queries']['Sql_validator'] = array('SQLValidator' => array( + 'use', + 'username', + 'password')); $forms['Left_frame']['Left_frame'] = array( 'LeftFrameLight', 'LeftDisplayLogo', diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php index 746ef82bd..6281a618f 100644 --- a/libraries/config/user_preferences.forms.php +++ b/libraries/config/user_preferences.forms.php @@ -42,8 +42,12 @@ $forms['Sql_queries']['Sql_box'] = array( 'SQLQuery/Edit', 'SQLQuery/Explain', 'SQLQuery/ShowAsPHP', -// 'SQLQuery/Validate',// [false or no override] + 'SQLQuery/Validate', 'SQLQuery/Refresh'); +$forms['Sql_queries']['Sql_validator'] = array('SQLValidator' => array( + 'use', + 'username', + 'password')); $forms['Features']['Page_titles'] = array( 'TitleDefault', 'TitleTable',