diff --git a/Documentation.html b/Documentation.html
index b2b5f085a..14718953a 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -2160,7 +2160,7 @@ setfacl -d -m "g:www-data:rwx" tmp
$cfg['TitleDatabase'] string
$cfg['TitleServer'] string
$cfg['TitleDefault'] string
- Allows you to specify window's title bar. Following magic string can
+ Allows you to specify windows' title bar. Following magic strings can
be used to get special values:
@HTTP_HOST@
diff --git a/js/config.js b/js/config.js
index 4f19e4a1d..ce0830c51 100644
--- a/js/config.js
+++ b/js/config.js
@@ -200,6 +200,18 @@ var validators = {
}
return result;
},
+ /**
+ * DefaultPropDisplay validator
+ *
+ * @param {boolean} isKeyUp
+ */
+ validate_DefaultPropDisplay: function(isKeyUp) {
+ if (isKeyUp && this.value == '') {
+ return true;
+ }
+ var valid = this.value.match(/^(?:horizontal|vertical|[0-9]+)$/) != null;
+ return valid ? true : PMA_messages['error_invalid_value']
+ },
// field validators
_field: {
},
diff --git a/libraries/config.default.php b/libraries/config.default.php
index b2a393275..6bc339557 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -2149,7 +2149,7 @@ $cfg['DefaultDisplay'] = 'horizontal';
/**
* default display direction for altering/creating columns (tbl_properties)
* (horizontal|vertical|)
- * number indicates maximal number for which vertical model is used
+ * number indicates maximum number for which vertical model is used
*
* @global integer $cfg['DefaultPropDisplay']
*/
diff --git a/libraries/config.values.php b/libraries/config.values.php
index 188335477..db9f5161b 100644
--- a/libraries/config.values.php
+++ b/libraries/config.values.php
@@ -64,6 +64,7 @@ $cfg_db['QueryWindowDefTab'] = array(
'files', // Import files
'history', // SQL history
'full'); // All (SQL and SQL history)
+$cfg_db['InitialSlidersState'] = array('open', 'closed');
$cfg_db['Import']['format'] = array(
'csv', // CSV
'docsql', // DocSQL
@@ -110,5 +111,6 @@ $cfg_db['_validators'] = array(
'CharTextareaRows' => 'validate_positive_number',
'InsertRows' => 'validate_positive_number',
'ForeignKeyMaxLimit' => 'validate_positive_number',
+ 'DefaultPropDisplay' => 'validate_DefaultPropDisplay',
'Import/skip_queries' => 'validate_non_negative_number');
?>
\ No newline at end of file
diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php
index 274a58588..7d812fbe2 100644
--- a/libraries/config/FormDisplay.class.php
+++ b/libraries/config/FormDisplay.class.php
@@ -58,8 +58,7 @@ class FormDisplay
* Will be looked up in $GLOBALS: str{value} or strSetup{value}
* @var array
*/
- private $js_lang_strings = array('error_nan_p', 'error_nan_nneg',
- 'error_incorrect_port');
+ private $js_lang_strings = array();
/**
* Tells whether forms have been validated
@@ -67,6 +66,16 @@ class FormDisplay
*/
private $is_valdiated = true;
+ public function __construct()
+ {
+ $this->js_lang_strings = array(
+ 'error_nan_p' => __('Not a positive number'),
+ 'error_nan_nneg' => __('Not a non-negative number'),
+ 'error_incorrect_port' => __('Not a valid port number'),
+ 'error_invalid_value' => __('Incorrect value')
+ );
+ }
+
/**
* Registers form in form manager
*
@@ -222,11 +231,8 @@ class FormDisplay
if (!$js_lang_sent) {
$js_lang_sent = true;
$js_lang = array();
- foreach ($this->js_lang_strings as $str) {
- $lang = isset($GLOBALS["strSetup$str"])
- ? $GLOBALS["strSetup$str"]
- : filter_var($GLOBALS["str$str"]); // null if not set
- $js_lang[] = "'$str': '" . PMA_jsFormat($lang, false) . '\'';
+ foreach ($this->js_lang_strings as $strName => $strValue) {
+ $js_lang[] = "'$strName': '" . PMA_jsFormat($strValue, false) . '\'';
}
$js[] = '$.extend(PMA_messages, {' . implode(",\n\t", $js_lang) . '})';
}
@@ -434,8 +440,8 @@ class FormDisplay
if ($form->getOptionType($field) == 'boolean') {
$_POST[$key] = false;
} else {
- $this->errors[$form->name][] = PMA_lang(
- 'error_missing_field_data',
+ $this->errors[$form->name][] = sprintf(
+ __('Missing data for %s'),
'' . PMA_lang_name($system_path) . '');
$result = false;
continue;
diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php
index 7b58193aa..e22ed5424 100644
--- a/libraries/config/messages.inc.php
+++ b/libraries/config/messages.inc.php
@@ -18,10 +18,7 @@ $strSetupAllowArbitraryServer_desc = __('If enabled user can enter any MySQL ser
$strSetupAllowArbitraryServerMsg = __('This [a@?page=form&formset=features#tab_Security]option[/a] should be disabled as it allows attackers to bruteforce login to any MySQL server. If you feel this is necessary, use [a@?page=form&formset=features#tab_Security]trusted proxies list[/a]. However, IP-based protection may not be reliable if your IP belongs to an ISP where thousands of users, including you, are connected to.');
$strSetupAllowArbitraryServer_name = __('Allow login to any MySQL server');
$strSetupAllowUserDropDatabase_name = __('Show "Drop database" link to normal users');
-$strSetupBlowfishSecretCharsMsg = __('Key should contain letters, numbers [em]and[/em] special characters');
$strSetupblowfish_secret_desc = __('Secret passphrase used for encrypting cookies in [kbd]cookie[/kbd] authentication');
-$strSetupBlowfishSecretLengthMsg = __('Key is too short, it should have at least 8 characters');
-$strSetupBlowfishSecretMsg = __('You didn\'t have blowfish secret set and have enabled cookie authentication, so a key was automatically generated for you. It is used to encrypt cookies; you don\'t need to remember it.');
$strSetupblowfish_secret_name = __('Blowfish secret');
$strSetupBrowseMarkerEnable_desc = __('Highlight selected rows');
$strSetupBrowseMarkerEnable_name = __('Row marker');
@@ -29,9 +26,8 @@ $strSetupBrowsePointerEnable_desc = __('Highlight row pointed by the mouse curso
$strSetupBrowsePointerEnable_name = __('Highlight pointer');
$strSetupBZipDump_desc = __('Enable [a@http://en.wikipedia.org/wiki/Bzip2]bzip2[/a] compression for import and export operations');
$strSetupBZipDump_name = __('Bzip2');
-$strSetupBZipDumpWarning = __('[a@?page=form&formset=features#tab_Import_export]Bzip2 compression and decompression[/a] requires functions (%s) which are unavailable on this system.');
$strSetupCannotLoadConfig = __('Cannot load or save configuration');
-$strSetupCannotLoadConfigMsg = __('Please create web server writable folder [em]config[/em] in phpMyAdmin top level directory as described in [a@../Documentation.html#setup_script]documentation[/a]. Otherwise you will be only able to download or display it.');
+$strSetupCannotLoadConfigMsg = __('Please create web server writable folder [em]config[/em] in phpMyAdmin top level directory as described in [a@Documentation.html#setup_script]documentation[/a]. Otherwise you will be only able to download or display it.');
$strSetupCharEditing_desc = __('Defines which type of editing controls should be used for CHAR and VARCHAR columns; [kbd]input[/kbd] - allows limiting of input length, [kbd]textarea[/kbd] - allows newlines in columns');
$strSetupCharEditing_name = __('CHAR columns editing');
$strSetupCharTextareaCols_desc = __('Number of columns for CHAR/VARCHAR textareas');
@@ -39,15 +35,17 @@ $strSetupCharTextareaCols_name = __('CHAR textarea columns');
$strSetupCharTextareaRows_desc = __('Number of rows for CHAR/VARCHAR textareas');
$strSetupCharTextareaRows_name = __('CHAR textarea rows');
$strSetupCheckConfigurationPermissions_name = __('Check config file permissions');
-$strSetupClear = __('Clear');
$strSetupCompressOnFly_desc = __('Compress gzip/bzip2 exports on the fly without the need for much memory; if you encounter problems with created gzip/bzip2 files disable this feature');
$strSetupCompressOnFly_name = __('Compress on the fly');
$strSetupConfigurationFile = __('Configuration file');
$strSetupConfirm_desc = __('Whether a warning ("Are your really sure...") should be displayed when you\'re about to lose data');
$strSetupConfirm_name = __('Confirm DROP queries');
+$strSetupCtrlArrowsMoving_name = __('Field navigation using Ctrl+Arrows');
$strSetupDefaultCharset_desc = __('Default character set used for conversions');
$strSetupDefaultCharset_name = __('Default character set');
$strSetupDefaultLanguage = __('Default language');
+$strSetupDefaultPropDisplay_name = __('Display direction for altering/creating columns');
+$strSetupDefaultPropDisplay_desc = __('[kbd]horizontal[/kbd], [kbd]vertical[/kbd] or a number that indicates maximum number for which vertical model is used');
$strSetupDefaultServer = __('Default server');
$strSetupDefaultTabDatabase_desc = __('Tab that is displayed when entering a database');
$strSetupDefaultTabDatabase_name = __('Default database tab');
@@ -64,19 +62,8 @@ $strSetupDisplayServersList_name = __('Display servers as a list');
$strSetupDonateLink = __('Donate');
$strSetupDownload = __('Download');
$strSetupEndOfLine = __('End of line');
-$strSetuperror_connection = __('Could not connect to MySQL server');
-$strSetuperror_empty_pmadb_password = __('Empty phpMyAdmin control user password while using pmadb');
-$strSetuperror_empty_pmadb_user = __('Empty phpMyAdmin control user while using pmadb');
-$strSetuperror_empty_signon_session = __('Empty signon session name while using signon authentication method');
-$strSetuperror_empty_signon_url = __('Empty signon URL while using signon authentication method');
-$strSetuperror_empty_user_for_config_auth = __('Empty username while using config authentication method');
-$strSetuperror_form = __('Submitted form contains errors');
-$strSetuperror_incorrect_ip_address = __('Incorrect IP address: %s');
-$strSetuperror_incorrect_port = __('Not a valid port number');
-$strSetuperror_incorrect_value = __('Incorrect value');
-$strSetuperror_missing_field_data = __('Missing data for %s');
-$strSetuperror_nan_nneg = __('Not a non-negative number');
-$strSetuperror_nan_p = __('Not a positive number');
+$strSetupErrorIconic_name = __('Iconic errors');
+$strSetupErrorIconic_desc = __('Show icons for warning, error and information messages');
$strSetupExecTimeLimit_desc = __('Set the number of seconds a script is allowed to run ([kbd]0[/kbd] for no limit)');
$strSetupExecTimeLimit_name = __('Maximum execution time');
$strSetupExport_asfile_name = __('Save as file');
@@ -103,6 +90,7 @@ $strSetupForm_Edit_desc = __('Customize edit mode');
$strSetupForm_Edit = __('Edit mode');
$strSetupForm_Export_defaults_desc = __('Customize default export options');
$strSetupForm_Export_defaults = __('Export defaults');
+$strSetupForm_General = __('General settings');
$strSetupForm_Import_defaults_desc = __('Customize default common import options');
$strSetupForm_Import_defaults = __('Import defaults');
$strSetupForm_Import_export_desc = __('Set import and export directories and compression options');
@@ -120,6 +108,8 @@ $strSetupForm_Other_core_settings_desc = __('Settings that didn\'t fit enywhere
$strSetupForm_Other_core_settings = __('Other core settings');
$strSetupForm_Query_window_desc = __('Customize query window options');
$strSetupForm_Query_window = __('Query window');
+$strSetupForm_Page_titles = __('Page titles');
+$strSetupForm_Page_titles_desc = __('Specify windows\' title bar. Refer to [a@Documentation.html#cfg_TitleTable]documentation[/a] for magic strings that can be used to get special values.');
$strSetupForm_Security_desc = __('Please note that phpMyAdmin is just a user interface and its features do not limit MySQL');
$strSetupForm_Security = __('Security');
$strSetupForm_Server = __('Basic settings');
@@ -128,7 +118,7 @@ $strSetupForm_Server_config = __('Server configuration');
$strSetupForm_Server_desc = __('Enter server connection parameters');
$strSetupForm_Server_login_options_desc = __('Enter login options for signon authentication');
$strSetupForm_Server_login_options = __('Signon login options');
-$strSetupForm_Server_pmadb_desc = __('Configure phpMyAdmin database to gain access to additional features, see [a@../Documentation.html#linked-tables]linked-tables infrastructure[/a] in documentation');
+$strSetupForm_Server_pmadb_desc = __('Configure phpMyAdmin database to gain access to additional features, see [a@Documentation.html#linked-tables]linked-tables infrastructure[/a] in documentation');
$strSetupForm_Server_pmadb = __('PMA database');
$strSetupForm_Server_tracking_desc = __('Tracking of changes made in database. Requires configured PMA database.');
$strSetupForm_Server_tracking = __('Changes tracking');
@@ -160,6 +150,7 @@ $strSetupImport_format_desc = __('Default format; be aware that this list depend
$strSetupImport_format_name = __('Format of imported file');
$strSetupImport_skip_queries_desc = __('Number of queries to skip from start');
$strSetupImport_skip_queries_name = __('Partial import: skip queries');
+$strSetupInitialSlidersState_name = __('Initial state for sliders');
$strSetupInsecureConnection = __('Insecure connection');
$strSetupInsecureConnectionMsg1 = __('You are not using a secure connection; all data (including potentially sensitive information, like passwords) is transferred unencrypted!');
$strSetupInsecureConnectionMsg2 = __('If your server is also configured to accept HTTPS requests follow [a@%s]this link[/a] to use a secure connection.');
@@ -197,6 +188,8 @@ $strSetupLoginCookieStore_name = __('Login cookie store');
$strSetupLoginCookieValidity_desc = __('Define how long (in seconds) a login cookie is valid');
$strSetupLoginCookieValidityMsg = __('[a@?page=form&formset=features#tab_Security]Login cookie validity[/a] should be set to 1800 seconds (30 minutes) at most. Values larger than 1800 may pose a security risk such as impersonation.');
$strSetupLoginCookieValidity_name = __('Login cookie validity');
+$strSetupLongtextDoubleTextarea_name = __('Bigger textarea for LONGTEXT');
+$strSetupLongtextDoubleTextarea_desc = __('Double size of textarea for LONGTEXT fields');
$strSetupMainPageIconic_name = __('Use icons on main page');
$strSetupMaxCharactersInDisplayedSQL_desc = __('Maximum number of characters used when a SQL query is displayed');
$strSetupMaxCharactersInDisplayedSQL_name = __('Maximum displayed SQL length');
@@ -208,6 +201,8 @@ $strSetupMaxTableList_desc = __('Maximum number of tables displayed in table lis
$strSetupMaxTableList_name = __('Maximum tables');
$strSetupMemoryLimit_desc = __('The number of bytes a script is allowed to allocate, eg. [kbd]32M[/kbd] ([kbd]0[/kbd] for no limit)');
$strSetupMemoryLimit_name = __('Memory limit');
+$strSetupNaturalOrder_name = __('Natural order');
+$strSetupNaturalOrder_desc = __('Use natural order for sorting table and database names');
$strSetupNavigationBarIconic_desc = __('Use only icons, only text or both');
$strSetupNavigationBarIconic_name = __('Iconic navigation bar');
$strSetupNewServer = __('New server');
@@ -232,6 +227,8 @@ $strSetupQueryWindowDefTab_desc = __('Tab displayed when opening a new query win
$strSetupQueryWindowDefTab_name = __('Default query window tab');
$strSetupRecodingEngine_desc = __('Select which functions will be used for character set conversion');
$strSetupRecodingEngine_name = __('Recoding engine');
+$strSetupReplaceHelpImg_name = __('Show help button');
+$strSetupReplaceHelpImg_desc = __('Show help button instead of Documentation text');
$strSetupRestoreDefaultValue = __('Restore default value');
$strSetupRevertErroneousFields = __('Try to revert erroneous fields to their default values');
$strSetupSaveDir_desc = __('Directory where exports can be saved on server');
@@ -270,7 +267,6 @@ $strSetupServers_designer_coords_name = __('Designer table');
$strSetupServers_DisableIS_desc = __('More information on [a@http://sf.net/support/tracker.php?aid=1849494]PMA bug tracker[/a] and [a@http://bugs.mysql.com/19588]MySQL Bugs[/a]');
$strSetupServers_DisableIS_name = __('Disable use of INFORMATION_SCHEMA');
$strSetupServerSecurityInfoMsg = __('If you feel this is necessary, use additional protection settings - [a@?page=servers&mode=edit&id=%1$d#tab_Server_config]host authentication[/a] settings and [a@?page=form&formset=features#tab_Security]trusted proxies list[/a]. However, IP-based protection may not be reliable if your IP belongs to an ISP where thousands of users, including you, are connected to.');
-$strSetupServersEdit = __('Edit server');
$strSetupServers_extension_desc = __('What PHP extension to use; you should use mysqli if supported');
$strSetupServers_extension_name = __('PHP extension to use');
$strSetupServers_hide_db_desc = __('Hide databases matching regular expression (PCRE)');
@@ -357,6 +353,17 @@ $strSetupSQLQuery_ShowAsPHP_name = __('Create PHP Code');
$strSetupSQLQuery_Validate_name = __('Validate SQL');
$strSetupSuggestDBName_desc = __('Suggest a database name on the "Create Database" form (if possible) or keep the text field empty');
$strSetupSuggestDBName_name = __('Suggest new database name');
+$strSetupTextareaCols_name = __('Textarea columns');
+$strSetupTextareaCols_desc = __('Textarea size (columns) in edit mode, this value will be emphasized for SQL query textareas (*2) and for query window (*1.25)');
+$strSetupTextareaRows_name = __('Textarea rows');
+$strSetupTitleDefault_name = __('Default title');
+$strSetupTitleDefault_desc = __('Title of browser window when nothing is selected');
+$strSetupTitleTable_name = __('Table');
+$strSetupTitleTable_desc = __('Title of browser window when a table is selected');
+$strSetupTitleDatabase_name = __('Database');
+$strSetupTitleDatabase_desc = __('Title of browser window when a database is selected');
+$strSetupTitleServer_name = __('Server');
+$strSetupTitleServer_desc = __('Title of browser window when a server is selected');
$strSetupTrue = __('yes');
$strSetupTrustedProxies_desc = __('Input proxies as [kbd]IP: trusted HTTP header[/kbd]. The following example specifies that phpMyAdmin should trust a HTTP_X_FORWARDED_FOR (X-Forwarded-For) header coming from the proxy 1.2.3.4:[br][kbd]1.2.3.4: HTTP_X_FORWARDED_FOR[/kbd]');
$strSetupTrustedProxies_name = __('List of trusted proxies for IP allow/deny');
@@ -381,4 +388,4 @@ $strSetupZipDumpExportWarning = __('[a@?page=form&formset=features#tab_Impor
$strSetupZipDumpImportWarning = __('[a@?page=form&formset=features#tab_Import_export]Zip decompression[/a] requires functions (%s) which are unavailable on this system.');
$strSetupZipDump_name = __('ZIP');
-?>
+?>
\ No newline at end of file
diff --git a/libraries/user_preferences.lib.php b/libraries/user_preferences.lib.php
index c53c3dd75..dd0b8ffc7 100644
--- a/libraries/user_preferences.lib.php
+++ b/libraries/user_preferences.lib.php
@@ -8,9 +8,6 @@
$forms = array();
$forms['Features']['General'] = array(
- 'DefaultLang',
- 'DefaultConnectionCollation',
- 'ThemeDefault',
'NaturalOrder',
'InitialSlidersState',
'ErrorIconic',
@@ -28,26 +25,21 @@ $forms['Sql_queries']['Sql_queries'] = array(
'IgnoreMultiSubmitErrors',
'VerboseMultiSubmit',
'MaxCharactersInDisplayedSQL',// [s-]
- 'SQLQuery/Edit',// [s-]
- 'SQLQuery/Explain',// [s-]
- 'SQLQuery/ShowAsPHP',// [s-]
- 'SQLQuery/Validate',// [false or no override]
- 'SQLQuery/Refresh',// [s-]
'EditInWindow',// [s-]
'QueryWindowWidth',// [s-]
'QueryWindowHeight',// [s-]
'QueryWindowDefTab');// [s-]
$forms['Sql_queries']['Sql_box'] = array(
- 'Edit',
- 'Explain',
- 'ShowAsPHP',
- 'Validate',// (false or no override)
- 'Refresh');
+ 'SQLQuery/Edit',// [s-]
+ 'SQLQuery/Explain',// [s-]
+ 'SQLQuery/ShowAsPHP',// [s-]
+ 'SQLQuery/Validate',// [false or no override]
+ 'SQLQuery/Refresh');// [s-]
$forms['Features']['Page_titles'] = array(
+ 'TitleDefault',// [s-]
'TitleTable',// [s-]
'TitleDatabase',// [s-]
- 'TitleServer',// [s-]
- 'TitleDefault');// [s-]
+ 'TitleServer');// [s-]
$forms['Left_frame']['Left_frame'] = array(
'LeftFrameLight',
'LeftDisplayLogo',
diff --git a/setup/lib/form_processing.lib.php b/setup/lib/form_processing.lib.php
index 7128a6119..5e95f8bfb 100644
--- a/setup/lib/form_processing.lib.php
+++ b/setup/lib/form_processing.lib.php
@@ -41,7 +41,7 @@ function process_formset(FormDisplay $form_display) {
?>
displayErrors() ?>
diff --git a/setup/lib/index.lib.php b/setup/lib/index.lib.php
index 8cb2ed1c2..ce0b99e81 100644
--- a/setup/lib/index.lib.php
+++ b/setup/lib/index.lib.php
@@ -323,20 +323,20 @@ function perform_config_checks()
if ($blowfish_secret_set) {
// 'cookie' auth used, blowfish_secret was generated
messages_set('notice', 'blowfish_secret_created', 'blowfish_secret_name',
- PMA_lang('BlowfishSecretMsg'));
+ __('You didn\'t have blowfish secret set and have enabled cookie authentication, so a key was automatically generated for you. It is used to encrypt cookies; you don\'t need to remember it.'));
} else {
$blowfish_warnings = array();
// check length
if (strlen($blowfish_secret) < 8) {
// too short key
- $blowfish_warnings[] = PMA_lang('BlowfishSecretLengthMsg');
+ $blowfish_warnings[] = __('Key is too short, it should have at least 8 characters');
}
// check used characters
$has_digits = (bool) preg_match('/\d/', $blowfish_secret);
$has_chars = (bool) preg_match('/\S/', $blowfish_secret);
$has_nonword = (bool) preg_match('/\W/', $blowfish_secret);
if (!$has_digits || !$has_chars || !$has_nonword) {
- $blowfish_warnings[] = PMA_lang('BlowfishSecretCharsMsg');
+ $blowfish_warnings[] = PMA_sanitize(__('Key should contain letters, numbers [em]and[/em] special characters'));
}
if (!empty($blowfish_warnings)) {
messages_set('warning', 'blowfish_warnings' . count($blowfish_warnings),
@@ -413,7 +413,7 @@ function perform_config_checks()
? ''
: ($functions ? ', ' : '') . 'bzcompress';
messages_set('warning', 'BZipDump', 'BZipDump_name',
- PMA_lang('BZipDumpWarning', $functions));
+ PMA_sanitize(sprintf(__('[a@?page=form&formset=features#tab_Import_export]Bzip2 compression and decompression[/a] requires functions (%s) which are unavailable on this system.'), $functions)));
}
//
diff --git a/setup/lib/validate.lib.php b/setup/lib/validate.lib.php
index 05b09783c..34c5d98bb 100644
--- a/setup/lib/validate.lib.php
+++ b/setup/lib/validate.lib.php
@@ -131,14 +131,14 @@ function test_db_connection($extension, $connect_type, $host, $port, $socket, $u
if ($extension == 'mysql') {
$conn = @mysql_connect($host . $socket . $port, $user, $pass);
if (!$conn) {
- $error = PMA_lang('error_connection');
+ $error = __('Could not connect to MySQL server');
} else {
mysql_close($conn);
}
} else {
$conn = @mysqli_connect($host, $user, $pass, null, $port, $socket);
if (!$conn) {
- $error = PMA_lang('error_connection');
+ $error = __('Could not connect to MySQL server');
} else {
mysqli_close($conn);
}
@@ -162,15 +162,15 @@ function validate_server($path, $values)
$result = array('Server' => '', 'Servers/1/user' => '', 'Servers/1/SignonSession' => '', 'Servers/1/SignonURL' => '');
$error = false;
if ($values['Servers/1/auth_type'] == 'config' && empty($values['Servers/1/user'])) {
- $result['Servers/1/user'] = PMA_lang('error_empty_user_for_config_auth');
+ $result['Servers/1/user'] = __('Empty username while using config authentication method');
$error = true;
}
if ($values['Servers/1/auth_type'] == 'signon' && empty($values['Servers/1/SignonSession'])) {
- $result['Servers/1/SignonSession'] = PMA_lang('error_empty_signon_session');
+ $result['Servers/1/SignonSession'] = __('Empty signon session name while using signon authentication method');
$error = true;
}
if ($values['Servers/1/auth_type'] == 'signon' && empty($values['Servers/1/SignonURL'])) {
- $result['Servers/1/SignonURL'] = PMA_lang('error_empty_signon_url');
+ $result['Servers/1/SignonURL'] = __('Empty signon URL while using signon authentication method');
$error = true;
}
@@ -203,15 +203,17 @@ function validate_pmadb($path, $values)
$result = array();
if ($values['Servers/1/controluser'] == '') {
- $result['Servers/1/controluser'] = PMA_lang('error_empty_pmadb_user');
+ $result['Servers/1/controluser'] = __('Empty phpMyAdmin control user while using pmadb');
$error = true;
}
if ($values['Servers/1/controlpass'] == '') {
- $result['Servers/1/controlpass'] = PMA_lang('error_empty_pmadb_password');
+ $result['Servers/1/controlpass'] = __('Empty phpMyAdmin control user password while using pmadb');
$error = true;
}
if (!$error) {
- $test = test_db_connection($values['Servers/1/extension'], $values['Servers/1/connect_type'], $values['Servers/1/host'], $values['Servers/1/port'], $values['Servers/1/socket'], $values['Servers/1/controluser'], $values['Servers/1/controlpass'], 'Server_pmadb');
+ $test = test_db_connection($values['Servers/1/extension'], $values['Servers/1/connect_type'],
+ $values['Servers/1/host'], $values['Servers/1/port'], $values['Servers/1/socket'],
+ $values['Servers/1/controluser'], $values['Servers/1/controlpass'], 'Server_pmadb');
if ($test !== true) {
$result = array_merge($result, $test);
}
@@ -283,14 +285,14 @@ function validate_trusted_proxies($path, $values)
$matches = array();
// we catch anything that may (or may not) be an IP
if (!preg_match("/^(.+):(?:[ ]?)\\w+$/", $line, $matches)) {
- $result[$path][] = PMA_lang('error_incorrect_value') . ': ' . $line;
+ $result[$path][] = __('Incorrect value') . ': ' . $line;
continue;
}
// now let's check whether we really have an IP address
if (filter_var($matches[1], FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === false
&& filter_var($matches[1], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === false) {
$ip = htmlspecialchars(trim($matches[1]));
- $result[$path][] = PMA_lang('error_incorrect_ip_address', $ip);
+ $result[$path][] = sprintf(__('Incorrect IP address: %s'), $ip);
continue;
}
}
@@ -307,17 +309,17 @@ function validate_trusted_proxies($path, $values)
* @param bool $allow_neg allow negative values
* @param bool $allow_zero allow zero
* @param int $max_value max allowed value
- * @param string $error_lang_key error message key: $GLOBALS["strSetup$error_lang_key"]
+ * @param string $error_string error message key: $GLOBALS["strSetup$error_lang_key"]
* @return string empty string if test is successful
*/
-function test_number($path, $values, $allow_neg, $allow_zero, $max_value, $error_lang_key)
+function test_number($path, $values, $allow_neg, $allow_zero, $max_value, $error_string)
{
if ($values[$path] === '') {
return '';
}
if (intval($values[$path]) != $values[$path] || (!$allow_neg && $values[$path] < 0) || (!$allow_zero && $values[$path] == 0) || $values[$path] > $max_value) {
- return PMA_lang($error_lang_key);
+ return $error_string;
}
return '';
@@ -332,7 +334,7 @@ function test_number($path, $values, $allow_neg, $allow_zero, $max_value, $error
*/
function validate_port_number($path, $values)
{
- return array($path => test_number($path, $values, false, false, 65536, 'error_incorrect_port'));
+ return array($path => test_number($path, $values, false, false, 65536, __('Not a valid port number')));
}
/**
@@ -344,7 +346,7 @@ function validate_port_number($path, $values)
*/
function validate_positive_number($path, $values)
{
- return array($path => test_number($path, $values, false, false, PHP_INT_MAX, 'error_nan_p'));
+ return array($path => test_number($path, $values, false, false, PHP_INT_MAX, __('Not a positive number')));
}
/**
@@ -356,6 +358,19 @@ function validate_positive_number($path, $values)
*/
function validate_non_negative_number($path, $values)
{
- return array($path => test_number($path, $values, false, true, PHP_INT_MAX, 'error_nan_nneg'));
+ return array($path => test_number($path, $values, false, true, PHP_INT_MAX, __('Not a non-negative number')));
}
-?>
+
+/**
+ * Validates DefaultPropDisplay field
+ *
+ * @param $path
+ * @param $values
+ * @return array
+ */
+function validate_DefaultPropDisplay($path, $values)
+{
+ $result = preg_match('/^(?:horizontal|vertical|\d+)$/', $values[$path]);
+ return array($path => ($result ? '' : __('Incorrect value')));
+}
+?>
\ No newline at end of file
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 0f5de45d6..86d6e7422 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1251,7 +1251,6 @@ table#serverconnection_trg_local {
padding: 0.1em 0.4em;
white-space: nowrap;
text-decoration: none;
- background-color: ;
border: 1px solid ;
border-bottom: none;
}
@@ -1264,7 +1263,7 @@ table#serverconnection_trg_local {
}
.config-form ul.tabs li a.active {
- background-color: ;
+ background-color: ;
}
.config-form fieldset {
@@ -1375,3 +1374,12 @@ table#serverconnection_trg_local {
border: 1px #6676FF solid;
background: #F7FBFF;
}
+
+/* error list */
+dd {
+ margin-left: 0.5em;
+}
+
+dd:before {
+ content: "\25B8 ";
+}
diff --git a/user_preferences.php b/user_preferences.php
index 1241b3a8a..a6817d750 100644
--- a/user_preferences.php
+++ b/user_preferences.php
@@ -68,7 +68,7 @@ if (!$form_display->process(false)) {
?>
displayErrors() ?>