Merge remote-tracking branch 'origin/master'

This commit is contained in:
Pootle server 2011-11-30 18:40:15 +01:00
commit 85bbe04a83
3 changed files with 82 additions and 30 deletions

View File

@ -1194,7 +1194,7 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
PMA_cacheGet('PMA_MYSQL_INT_VERSION', true)
);
define(
'PMA_MYSQL_MAJOR_VERSION',\
'PMA_MYSQL_MAJOR_VERSION',
PMA_cacheGet('PMA_MYSQL_MAJOR_VERSION', true)
);
define(
@ -1767,7 +1767,7 @@ function PMA_DBI_formatError($error_number, $error_message)
$error .= ' - ' . $error_message;
$error .= '<br />' . __('The server is not responding.');
} elseif ($error_number == 1005) {
if (strpos($error_message, 'errno: 13') !== FALSE) {
if (strpos($error_message, 'errno: 13') !== false) {
$error .= ' - ' . $error_message;
$error .= '<br />' . __('Please check privileges of directory containing database.');
} else {

View File

@ -90,8 +90,16 @@ if ($server > 0
} else {
$conditional_class = null;
}
PMA_printListItem(__('Change password'), 'li_change_password',
'./user_password.php?' . $common_url_query, null, null, 'change_password_anchor', null, $conditional_class);
PMA_printListItem(
__('Change password'),
'li_change_password',
'./user_password.php?' . $common_url_query,
null,
null,
'change_password_anchor',
null,
$conditional_class
);
}
} // end if
echo ' <li id="li_select_mysql_collation">';
@ -141,8 +149,11 @@ echo '</ul>';
if ($server > 0) {
echo '<ul>';
echo PMA_printListItem(__('More settings'), 'li_user_preferences',
'./prefs_manage.php?' . $common_url_query);
echo PMA_printListItem(
__('More settings'),
'li_user_preferences',
'./prefs_manage.php?' . $common_url_query
);
echo '</ul>';
}
@ -160,10 +171,14 @@ if ($server > 0 && $GLOBALS['cfg']['ShowServerInfo']) {
PMA_printListItem(__('Server') . ': ' . $server_info, 'li_server_info');
PMA_printListItem(__('Software') . ': ' . PMA_getServerType(), 'li_server_type');
PMA_printListItem(__('Software version') . ': ' . PMA_MYSQL_STR_VERSION . ' - ' . PMA_MYSQL_VERSION_COMMENT, 'li_server_version');
PMA_printListItem(__('Protocol version') . ': ' . PMA_DBI_get_proto_info(),
'li_mysql_proto');
PMA_printListItem(__('User') . ': ' . htmlspecialchars($mysql_cur_user_and_host),
'li_user_info');
PMA_printListItem(
__('Protocol version') . ': ' . PMA_DBI_get_proto_info(),
'li_mysql_proto'
);
PMA_printListItem(
__('User') . ': ' . htmlspecialchars($mysql_cur_user_and_host),
'li_user_info'
);
echo ' <li id="li_select_mysql_charset">';
echo ' ' . __('Server charset') . ': '
@ -186,14 +201,19 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
if ($server > 0) {
$client_version_str = PMA_DBI_get_client_info();
if (preg_match('#\d+\.\d+\.\d+#', $client_version_str)
&& in_array($GLOBALS['cfg']['Server']['extension'], array('mysql', 'mysqli'))) {
&& in_array($GLOBALS['cfg']['Server']['extension'], array('mysql', 'mysqli'))
) {
$client_version_str = 'libmysql - ' . $client_version_str;
}
PMA_printListItem(__('Database client version') . ': ' . $client_version_str,
'li_mysql_client_version');
PMA_printListItem(__('PHP extension') . ': ' . $GLOBALS['cfg']['Server']['extension']. ' '
PMA_printListItem(
__('Database client version') . ': ' . $client_version_str,
'li_mysql_client_version'
);
PMA_printListItem(
__('PHP extension') . ': ' . $GLOBALS['cfg']['Server']['extension']. ' '
. PMA_showPHPDocu('book.' . $GLOBALS['cfg']['Server']['extension'] . '.php'),
'li_used_php_extension');
'li_used_php_extension'
);
}
}
@ -330,10 +350,20 @@ echo '</noscript>';
if (function_exists('PMA_DBI_get_client_info') && !PMA_DRIZZLE) {
$_client_info = PMA_DBI_get_client_info();
if ($server > 0 && strpos($_client_info, 'mysqlnd') === false && substr(PMA_MYSQL_CLIENT_API, 0, 3) != substr(PMA_MYSQL_INT_VERSION, 0, 3)) {
trigger_error(PMA_sanitize(sprintf(__('Your PHP MySQL library version %s differs from your MySQL server version %s. This may cause unpredictable behavior.'),
$_client_info,
substr(PMA_MYSQL_STR_VERSION, 0, strpos(PMA_MYSQL_STR_VERSION . '-', '-')))),
E_USER_NOTICE);
trigger_error(
PMA_sanitize(
sprintf(
__('Your PHP MySQL library version %s differs from your MySQL server version %s. This may cause unpredictable behavior.'),
$_client_info,
substr(
PMA_MYSQL_STR_VERSION,
0,
strpos(PMA_MYSQL_STR_VERSION . '-', '-')
)
)
),
E_USER_NOTICE
);
}
unset($_client_info);
}
@ -341,9 +371,20 @@ if (function_exists('PMA_DBI_get_client_info') && !PMA_DRIZZLE) {
/**
* Warning about Suhosin
*/
if ($cfg['SuhosinDisableWarning'] == false && @ini_get('suhosin.request.max_value_length')) {
trigger_error(PMA_sanitize(sprintf(__('Server running with Suhosin. Please refer to %sdocumentation%s for possible issues.'), '[a@./Documentation.html#faq1_38@_blank]', '[/a]')), E_USER_WARNING);
}
if ($cfg['SuhosinDisableWarning'] == false
&& @ini_get('suhosin.request.max_value_length')
) {
trigger_error(
PMA_sanitize(
sprintf(
__('Server running with Suhosin. Please refer to %sdocumentation%s for possible issues.'),
'[a@./Documentation.html#faq1_38@_blank]',
'[/a]'
)
),
E_USER_WARNING
);
}
/**
* Warning about mcrypt.

View File

@ -27,8 +27,12 @@ if (strlen($db) == 0) {
*/
if (PMA_DBI_get_columns($db, $table)) {
// table exists already
PMA_mysqlDie(sprintf(__('Table %s already exists!'), htmlspecialchars($table)), '',
'', 'db_structure.php?' . PMA_generate_common_url($db));
PMA_mysqlDie(
sprintf(__('Table %s already exists!'), htmlspecialchars($table)),
'',
'',
'db_structure.php?' . PMA_generate_common_url($db)
);
}
$err_url = 'tbl_create.php?' . PMA_generate_common_url($db, $table);
@ -47,8 +51,12 @@ if (isset($_REQUEST['submit_num_fields'])) {
* Selects the database to work with
*/
if (!PMA_DBI_select_db($db)) {
PMA_mysqlDie(sprintf(__('\'%s\' database does not exist.'), htmlspecialchars($db)),
'', '', 'main.php');
PMA_mysqlDie(
sprintf(__('\'%s\' database does not exist.'), htmlspecialchars($db)),
'',
'',
'main.php'
);
}
/**
@ -100,7 +108,8 @@ if (isset($_REQUEST['do_save_data'])) {
? $_REQUEST['field_comments'][$i]
: '',
$field_primary,
$i);
$i
);
$query .= ', ';
$sql_query .= $query;
@ -206,9 +215,11 @@ if (isset($_REQUEST['do_save_data'])) {
foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) {
if (isset($_REQUEST['field_name'][$fieldindex])
&& strlen($_REQUEST['field_name'][$fieldindex])) {
PMA_setMIME($db, $table, $_REQUEST['field_name'][$fieldindex], $mimetype,
$_REQUEST['field_transformation'][$fieldindex],
$_REQUEST['field_transformation_options'][$fieldindex]);
PMA_setMIME(
$db, $table, $_REQUEST['field_name'][$fieldindex], $mimetype,
$_REQUEST['field_transformation'][$fieldindex],
$_REQUEST['field_transformation_options'][$fieldindex]
);
}
}
}