Merge remote branch 'origin/master' into browsemode

This commit is contained in:
Aris Feryanto 2011-05-07 14:52:13 +07:00
commit 576fca3dc2
109 changed files with 18706 additions and 18996 deletions

View File

@ -1,6 +1,8 @@
phpMyAdmin - ChangeLog
======================
3.5.0.0 (not yet released)
3.4.0.0 (not yet released)
+ rfe #2890226 [view] Enable VIEW rename
+ rfe #838637 [privileges] Export a user's privileges

View File

@ -9,7 +9,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<link rel="icon" href="./favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>phpMyAdmin 3.4.0-rc3-dev - Documentation</title>
<title>phpMyAdmin 3.5.0-dev - Documentation</title>
<link rel="stylesheet" type="text/css" href="docs.css" />
</head>
@ -17,7 +17,7 @@ vim: expandtab ts=4 sw=4 sts=4 tw=78
<div id="header">
<h1>
<a href="http://www.phpmyadmin.net/">php<span class="myadmin">MyAdmin</span></a>
3.4.0-rc3-dev
3.5.0-dev
Documentation
</h1>
</div>

2
README
View File

@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================
Version 3.4.0-rc3-dev
Version 3.5.0-dev
A set of PHP-scripts to manage MySQL over the web.

View File

@ -349,11 +349,6 @@ if ($db == 'information_schema') {
}
if (!$is_information_schema) {
?>
<div class="operations_half_width">
<?php require './libraries/display_create_table.lib.php'; ?>
</div>
<?php
if ($cfgRelation['commwork']) {
/**
* database comment
@ -377,6 +372,11 @@ if (!$is_information_schema) {
</div>
<?php
}
?>
<div class="operations_half_width">
<?php require './libraries/display_create_table.lib.php'; ?>
</div>
<?php
/**
* rename database
*/

View File

@ -18,26 +18,29 @@ $cfgRelation = PMA_getRelationsParam();
/**
* A query has been submitted -> execute it, else display the headers
* A query has been submitted -> (maybe) execute it
*/
$message_to_display = false;
if (isset($_REQUEST['submit_sql']) && ! empty($sql_query)) {
$goto = 'db_sql.php';
$message_to_show = htmlspecialchars(__('Your SQL query has been executed successfully'));
require './sql.php';
exit;
} else {
$sub_part = '_qbe';
require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_qbe.php';
$url_params['goto'] = 'db_qbe.php';
require './libraries/db_info.inc.php';
if (! preg_match('@^SELECT@i', $sql_query)) {
$message_to_display = true;
} else {
$goto = 'db_sql.php';
require './sql.php';
exit;
}
}
if (isset($_REQUEST['submit_sql'])
&& ! preg_match('@^SELECT@i', $sql_query)) {
PMA_Message::warning(__('You have to choose at least one column to display'))->display();
}
$sub_part = '_qbe';
require './libraries/db_common.inc.php';
$url_query .= '&amp;goto=db_qbe.php';
$url_params['goto'] = 'db_qbe.php';
require './libraries/db_info.inc.php';
if ($message_to_display) {
PMA_Message::error(__('You have to choose at least one column to display'))->display();
}
unset($message_to_display);
/**
* Initialize some variables

View File

@ -1118,25 +1118,32 @@ function changeMIMEType(db, table, reference, mime_type)
* Jquery Coding for inline editing SQL_QUERY
*/
$(document).ready(function(){
var oldText,db,table,token,sql_query;
oldText=$(".inner_sql").html();
$("#inline_edit").live('click',function(){
db=$("input[name='db']").val();
table=$("input[name='table']").val();
token=$("input[name='token']").val();
sql_query=$("input[name='sql_query']").val();
$(".inner_sql").replaceWith("<textarea name=\"sql_query_edit\" id=\"sql_query_edit\">"+ sql_query +"</textarea><input type=\"button\" id=\"btnSave\" value=\"" + PMA_messages['strGo'] + "\"><input type=\"button\" id=\"btnDiscard\" value=\"" + PMA_messages['strCancel'] + "\">");
$(".inline_edit").click( function(){
var db = $(this).prev().find("input[name='db']").val();
var table = $(this).prev().find("input[name='table']").val();
var token = $(this).prev().find("input[name='token']").val();
var sql_query = $(this).prev().find("input[name='sql_query']").val();
var $inner_sql = $(this).parent().prev().find('.inner_sql');
var old_text = $inner_sql.html();
var new_content = "<textarea name=\"sql_query_edit\" id=\"sql_query_edit\">" + sql_query + "</textarea>\n";
new_content += "<input type=\"button\" class=\"btnSave\" value=\"" + PMA_messages['strGo'] + "\">\n";
new_content += "<input type=\"button\" class=\"btnDiscard\" value=\"" + PMA_messages['strCancel'] + "\">\n";
$inner_sql.replaceWith(new_content);
$(".btnSave").each(function(){
$(this).click(function(){
sql_query = $(this).prev().val();
window.location.replace("import.php?db=" + db +"&table=" + table + "&sql_query=" + sql_query + "&show_query=1&token=" + token);
});
});
$(".btnDiscard").each(function(){
$(this).click(function(){
$(this).closest(".sql").html("<span class=\"syntax\"><span class=\"inner_sql\">" + old_text + "</span></span>");
});
});
return false;
});
$("#btnSave").live("click",function(){
window.location.replace("import.php?db=" + db +"&table=" + table + "&sql_query=" + $("#sql_query_edit").val()+"&show_query=1&token=" + token + "");
});
$("#btnDiscard").live("click",function(){
$(".sql").html("<span class=\"syntax\"><span class=\"inner_sql\">" + oldText + "</span></span>");
});
$('.sqlbutton').click(function(evt){
insertQuery(evt.target.id);
return false;

View File

@ -96,7 +96,7 @@ class PMA_Config
*/
function checkSystem()
{
$this->set('PMA_VERSION', '3.4.0-rc3-dev');
$this->set('PMA_VERSION', '3.5.0-dev');
/**
* @deprecated
*/

View File

@ -424,7 +424,7 @@ class PMA_Index
$indexes = PMA_Index::getFromTable($table, $schema);
if (count($indexes) < 1) {
return PMA_Message::warning(__('No index defined!'))->getDisplay();
return PMA_Message::error(__('No index defined!'))->getDisplay();
}
$r = '';
@ -576,7 +576,7 @@ class PMA_Index
// did not find any difference
// so it makes no sense to have this two equal indexes
$message = PMA_Message::warning(__('The indexes %1$s and %2$s seem to be equal and one of them could possibly be removed.'));
$message = PMA_Message::error(__('The indexes %1$s and %2$s seem to be equal and one of them could possibly be removed.'));
$message->addParam($each_index->getName());
$message->addParam($while_index->getName());
$output .= $message->getDisplay();

View File

@ -19,9 +19,6 @@
*
* // get special notice 'Some locale notice'
* $message = PMA_Message::notice('strSomeLocaleNotice');
*
* // display raw warning message 'This is a warning!'
* PMA_Message::rawWarning('This is a warning!')->display();
* </code>
*
* more advanced usage example:
@ -63,7 +60,6 @@ class PMA_Message
{
const SUCCESS = 1; // 0001
const NOTICE = 2; // 0010
const WARNING = 4; // 0100
const ERROR = 8; // 1000
const SANITIZE_NONE = 0; // 0000 0000
@ -79,7 +75,6 @@ class PMA_Message
static public $level = array (
PMA_Message::SUCCESS => 'success',
PMA_Message::NOTICE => 'notice',
PMA_Message::WARNING => 'warning',
PMA_Message::ERROR => 'error',
);
@ -151,8 +146,8 @@ class PMA_Message
* @uses PMA_Message::SANITIZE_PARAMS
* @param string $string
* @param integer $number
* @param array $$params
* @param boolean $sanitize
* @param array $params
* @param integer $sanitize
*/
public function __construct($string = '', $number = PMA_Message::NOTICE,
$params = array(), $sanitize = PMA_Message::SANITIZE_NONE)
@ -213,22 +208,6 @@ class PMA_Message
return new PMA_Message($string, PMA_Message::ERROR);
}
/**
* get PMA_Message of type warning
*
* shorthand for getting a simple warning message
*
* @static
* @uses PMA_Message as returned object
* @uses PMA_Message::WARNING
* @param string $string a localized string e.g. 'strSetupWarning'
* @return PMA_Message
*/
static public function warning($string)
{
return new PMA_Message($string, PMA_Message::WARNING);
}
/**
* get PMA_Message of type notice
*
@ -337,22 +316,6 @@ class PMA_Message
return PMA_Message::raw($message, PMA_Message::ERROR);
}
/**
* get PMA_Message of type warning with custom content
*
* shorthand for getting a customized warning message
*
* @static
* @uses PMA_Message::raw()
* @uses PMA_Message::WARNING
* @param string $message
* @return PMA_Message
*/
static public function rawWarning($message)
{
return PMA_Message::raw($message, PMA_Message::WARNING);
}
/**
* get PMA_Message of type notice with custom content
*
@ -423,25 +386,6 @@ class PMA_Message
return $this->getNumber() === PMA_Message::NOTICE;
}
/**
* returns whether this message is a warning message or not
* and optionally makes this message a warning message
*
* @uses PMA_Message::WARNING
* @uses PMA_Message::setNumber()
* @uses PMA_Message::getNumber()
* @param boolean $set
* @return boolean whether this is a warning message or not
*/
public function isWarning($set = false)
{
if ($set) {
$this->setNumber(PMA_Message::WARNING);
}
return $this->getNumber() === PMA_Message::WARNING;
}
/**
* returns whether this message is an error message or not
* and optionally makes this message an error message
@ -624,9 +568,9 @@ class PMA_Message
* @static
* @uses is_array()
* @uses htmlspecialchars()
* @uses PMA_Message::sanitize() recursiv
* @param mixed the message(s)
* @return mixed the sanitized message(s)
* @uses PMA_Message::sanitize() recursive
* @param mixed $message the message(s)
* @return mixed the sanitized message(s)
* @access public
*/
static public function sanitize($message)
@ -686,7 +630,6 @@ class PMA_Message
* @uses PMA_Message::$_string
* @uses PMA_Message::$_message
* @uses md5()
* @param string $file
* @return string PMA_Message::$_hash
*/
public function getHash()

View File

@ -69,21 +69,9 @@ abstract class PMA_pChart_chart extends PMA_chart
// as in CSS (top, right, bottom, left)
$this->setAreaMargins(array(20, 20, 40, 60));
// when graph area gradient is used, this is the color of the graph
// area border
$this->settings['graphAreaColor'] = '#D5D9DD';
// the background color of the graph area
$this->settings['graphAreaGradientColor'] = '#A3CBA7';
// the color of the grid lines in the graph area
$this->settings['gridColor'] = '#E6E6E6';
// the color of the scale and the labels
$this->settings['scaleColor'] = '#D5D9DD';
$this->settings['titleBgColor'] = '#000000';
// Get color settings from theme
$this->settings = array_merge($this->settings,$GLOBALS['cfg']['chartColor']);
}
protected function init()
@ -149,8 +137,11 @@ abstract class PMA_pChart_chart extends PMA_chart
$this->getBgColor(RED),
$this->getBgColor(GREEN),
$this->getBgColor(BLUE),
50,TARGET_BACKGROUND);
$this->chart->addBorder(2);
// With a gradientIntensity of 0 the background does't draw, oddly
($this->settings['gradientIntensity']==0)?1:$this->settings['gradientIntensity'],TARGET_BACKGROUND);
if(is_string($this->settings['border']))
$this->chart->addBorder(1,$this->getBorderColor(RED),$this->getBorderColor(GREEN),$this->getBorderColor(BLUE));
}
/**
@ -170,11 +161,10 @@ abstract class PMA_pChart_chart extends PMA_chart
$this->getTitleColor(GREEN),
$this->getTitleColor(BLUE),
ALIGN_CENTER,
True,
false,
$this->getTitleBgColor(RED),
$this->getTitleBgColor(GREEN),
$this->getTitleBgColor(BLUE),
30
$this->getTitleBgColor(BLUE)
);
}
@ -211,12 +201,21 @@ abstract class PMA_pChart_chart extends PMA_chart
$this->getScaleColor(BLUE),
TRUE,0,2,TRUE
);
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
50
);
if($this->settings['gradientIntensity']>0)
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
$this->settings['gradientIntensity']
);
else
$this->chart->drawGraphArea(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE)
);
$this->chart->drawGrid(
4,
TRUE,
@ -393,6 +392,11 @@ abstract class PMA_pChart_chart extends PMA_chart
{
return $this->hexStrToDecComp($this->settings['titleBgColor'], $component);
}
protected function getBorderColor($component)
{
return $this->hexStrToDecComp($this->settings['border'], $component);
}
}
?>

View File

@ -57,12 +57,20 @@ class PMA_pChart_multi_radar extends PMA_pChart_multi
$this->getGraphAreaColor(BLUE),
FALSE
);
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
50
);
if($this->settings['gradientIntensity']>0)
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
$this->settings['gradientIntensity']
);
else
$this->chart->drawGraphArea(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE)
);
}
/**

View File

@ -47,12 +47,21 @@ class PMA_pChart_Pie extends PMA_pChart_multi
$this->getGraphAreaColor(BLUE),
FALSE
);
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
50
);
if($this->settings['gradientIntensity']>0)
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
$this->settings['gradientIntensity']
);
else
$this->chart->drawGraphArea(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE)
);
}
/**

View File

@ -48,12 +48,21 @@ class PMA_pChart_single_radar extends PMA_pChart_single
$this->getGraphAreaColor(BLUE),
FALSE
);
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
50
);
if($this->settings['gradientIntensity']>0)
$this->chart->drawGraphAreaGradient(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE),
$this->settings['gradientIntensity']
);
else
$this->chart->drawGraphArea(
$this->getGraphAreaGradientColor(RED),
$this->getGraphAreaGradientColor(GREEN),
$this->getGraphAreaGradientColor(BLUE)
);
}
/**

View File

@ -838,7 +838,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/aaa/mod_access.c?rev=1.37&content-type=text/vnd.viewcvs-markup
// Look at: "static int check_dir_access(request_rec *r)"
if (isset($cfg['Server']['AllowDeny'])
&& isset($cfg['Server']['AllowDeny']['order'])) {
&& isset($cfg['Server']['AllowDeny']['order'])) {
/**
* ip based access library

View File

@ -706,11 +706,11 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
* @uses uksort()
* @uses strstr()
* @uses explode()
* @param string $db name of db
* @param string $tables name of tables
* @param integer $limit_offset list offset
* @param integer $limit_count max tables to return
* return array (recursive) grouped table list
* @param string $db name of db
* @param string $tables name of tables
* @param integer $limit_offset list offset
* @param int|bool $limit_count max tables to return
* @return array (recursive) grouped table list
*/
function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count = false)
{
@ -1261,9 +1261,9 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
// document.write conflicts with jQuery, hence used $().append()
echo "<script type=\"text/javascript\">\n" .
"//<![CDATA[\n" .
"$('.tools form').after('[<a href=\"#\" title=\"" .
"$('.tools form').last().after('[<a href=\"#\" title=\"" .
PMA_escapeJsString(__('Inline edit of this query')) .
"\" id=\"inline_edit\">" .
"\" class=\"inline_edit\">" .
PMA_escapeJsString(__('Inline')) .
"</a>]');\n" .
"//]]>\n" .
@ -1674,7 +1674,7 @@ function PMA_generate_html_tab($tab, $url_params = array())
}
if (!empty($tab['warning'])) {
$tab['class'] .= ' warning';
$tab['class'] .= ' error';
$tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
}

View File

@ -254,7 +254,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
$tables = array();
if (! $GLOBALS['cfg']['Server']['DisableIS']) {
// get table information from information_schema
// get table information from information_schema
if ($table) {
if (true === $tbl_is_group) {
$sql_where_table = 'AND `TABLE_NAME` LIKE \''
@ -269,20 +269,20 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
$sql_where_table = '';
}
// for PMA bc:
// `SCHEMA_FIELD_NAME` AS `SHOW_TABLE_STATUS_FIELD_NAME`
//
// on non-Windows servers,
// added BINARY in the WHERE clause to force a case sensitive
// comparison (if we are looking for the db Aa we don't want
// to find the db aa)
// for PMA bc:
// `SCHEMA_FIELD_NAME` AS `SHOW_TABLE_STATUS_FIELD_NAME`
//
// on non-Windows servers,
// added BINARY in the WHERE clause to force a case sensitive
// comparison (if we are looking for the db Aa we don't want
// to find the db aa)
$this_databases = array_map('PMA_sqlAddslashes', $databases);
$sql = '
SELECT *,
`TABLE_SCHEMA` AS `Db`,
`TABLE_NAME` AS `Name`,
`TABLE_TYPE` ÀS `TABLE_TYPE`,
`TABLE_TYPE` AS `TABLE_TYPE`,
`ENGINE` AS `Engine`,
`ENGINE` AS `Type`,
`VERSION` AS `Version`,
@ -479,7 +479,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
* returns array with databases containing extended infos about them
*
* @todo move into PMA_List_Database?
* @param string $databases database
* @param string $database database
* @param boolean $force_stats retrieve stats also for MySQL < 5
* @param resource $link mysql link
* @param string $sort_by column to order by
@ -508,9 +508,8 @@ function PMA_DBI_get_databases_full($database = null, $force_stats = false,
* if $GLOBALS['cfg']['NaturalOrder'] is enabled, we cannot use LIMIT
* cause MySQL does not support natural ordering, we have to do it afterward
*/
if ($GLOBALS['cfg']['NaturalOrder']) {
$limit = '';
} else {
$limit = '';
if (!$GLOBALS['cfg']['NaturalOrder']) {
if ($limit_count) {
$limit = ' LIMIT ' . $limit_count . ' OFFSET ' . $limit_offset;
}
@ -945,7 +944,6 @@ function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null
* @uses $GLOBALS['mysql_charset_map']
* @uses $GLOBALS['charset']
* @uses $GLOBALS['lang']
* @uses $GLOBALS['server']
* @uses $GLOBALS['cfg']['Lang']
* @uses defined()
* @uses explode()
@ -989,7 +987,7 @@ function PMA_DBI_postConnect($link, $is_controluser = false)
define('PMA_DRIZZLE', PMA_MYSQL_MAJOR_VERSION >= 2009);
}
/* Skip charsets for Drizzle */
// Skip charsets for Drizzle
if (!PMA_DRIZZLE) {
if (! empty($GLOBALS['collation_connection'])) {
PMA_DBI_query("SET CHARACTER SET 'utf8';", $link, PMA_DBI_QUERY_STORE);

View File

@ -175,7 +175,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
$uid = uniqid("");
PMA_browseUploadFile($max_upload_size);
} else if (!$GLOBALS['is_upload']) {
PMA_Message::warning(__('File uploads are not allowed on this server.'))->display();
PMA_Message::notice(__('File uploads are not allowed on this server.'))->display();
} else if (!empty($cfg['UploadDir'])) {
PMA_selectUploadFile($import_list, $cfg['UploadDir']);
} // end if (web-server upload directory)

View File

@ -339,6 +339,11 @@ function PMA_langList()
/* We can always speak English */
$result = array('en' => PMA_langDetails('en'));
/* Check for existing directory */
if (!is_dir($GLOBALS['lang_path'])) {
return $result;
}
/* Open the directory */
$handle = @opendir($GLOBALS['lang_path']);
/* This can happen if the kit is English-only */

View File

@ -360,7 +360,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$pos = $pos_quote_separator;
}
if (class_exists('PMA_Message')) {
PMA_Message::warning(__('Automatically appended backtick to the end of query!'))->display();
PMA_Message::notice(__('Automatically appended backtick to the end of query!'))->display();
}
} else {
$debugstr = __('Unclosed quote') . ' @ ' . $startquotepos. "\n"
@ -1960,7 +1960,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($seen_create_table && $in_create_table_fields) {
$current_identifier = $identifier;
// warning: we set this one even for non TIMESTAMP type
// we set this one even for non TIMESTAMP type
$create_table_fields[$current_identifier]['timestamp_not_null'] = FALSE;
}

View File

@ -305,7 +305,7 @@ if ($server > 0) {
}
/**
* Show warning when javascript support is missing.
* Show notice when javascript support is missing.
*/
echo '<noscript>';
$message = PMA_Message::notice(__('Javascript support is missing or disabled in your browser, some phpMyAdmin functionality will be missing. For example navigation frame will not refresh automatically.'));

View File

@ -270,8 +270,8 @@ $element_counter = 0;
if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
$table_list = PMA_getTableList($GLOBALS['db']);
$table_count = count($table_list);
$table_list = PMA_getTableList($GLOBALS['db'], null, $tpos, $cfg['MaxTableList']);
$table_count = PMA_getTableCount($GLOBALS['db']);
// show selected databasename as link to DefaultTabDatabase-page
// with table count in ()
@ -308,7 +308,6 @@ if ($GLOBALS['cfg']['LeftFrameLight'] && strlen($GLOBALS['db'])) {
* user can find a navigator to page thru all tables.
*
*/
$table_list = array_slice($table_list, $tpos, $cfg['MaxTableList']);
if (! empty($table_list)) {
// upper table list paginator
if (count($table_list) <= $GLOBALS['cfg']['MaxTableList'] && $table_count > $GLOBALS['cfg']['MaxTableList']) {

548
po/af.po

File diff suppressed because it is too large Load Diff

548
po/ar.po

File diff suppressed because it is too large Load Diff

548
po/az.po

File diff suppressed because it is too large Load Diff

548
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

548
po/bg.po

File diff suppressed because it is too large Load Diff

548
po/bn.po

File diff suppressed because it is too large Load Diff

548
po/bs.po

File diff suppressed because it is too large Load Diff

548
po/ca.po

File diff suppressed because it is too large Load Diff

548
po/cs.po

File diff suppressed because it is too large Load Diff

548
po/cy.po

File diff suppressed because it is too large Load Diff

548
po/da.po

File diff suppressed because it is too large Load Diff

548
po/de.po

File diff suppressed because it is too large Load Diff

548
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

548
po/es.po

File diff suppressed because it is too large Load Diff

548
po/et.po

File diff suppressed because it is too large Load Diff

548
po/eu.po

File diff suppressed because it is too large Load Diff

548
po/fa.po

File diff suppressed because it is too large Load Diff

548
po/fi.po

File diff suppressed because it is too large Load Diff

548
po/fr.po

File diff suppressed because it is too large Load Diff

548
po/gl.po

File diff suppressed because it is too large Load Diff

548
po/he.po

File diff suppressed because it is too large Load Diff

580
po/hi.po

File diff suppressed because it is too large Load Diff

548
po/hr.po

File diff suppressed because it is too large Load Diff

1139
po/hu.po

File diff suppressed because it is too large Load Diff

548
po/id.po

File diff suppressed because it is too large Load Diff

548
po/it.po

File diff suppressed because it is too large Load Diff

1300
po/ja.po

File diff suppressed because it is too large Load Diff

548
po/ka.po

File diff suppressed because it is too large Load Diff

548
po/ko.po

File diff suppressed because it is too large Load Diff

548
po/lt.po

File diff suppressed because it is too large Load Diff

548
po/lv.po

File diff suppressed because it is too large Load Diff

548
po/mk.po

File diff suppressed because it is too large Load Diff

548
po/ml.po

File diff suppressed because it is too large Load Diff

548
po/mn.po

File diff suppressed because it is too large Load Diff

548
po/ms.po

File diff suppressed because it is too large Load Diff

548
po/nb.po

File diff suppressed because it is too large Load Diff

548
po/nl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

548
po/pl.po

File diff suppressed because it is too large Load Diff

548
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

548
po/ro.po

File diff suppressed because it is too large Load Diff

548
po/ru.po

File diff suppressed because it is too large Load Diff

1173
po/si.po

File diff suppressed because it is too large Load Diff

548
po/sk.po

File diff suppressed because it is too large Load Diff

548
po/sl.po

File diff suppressed because it is too large Load Diff

548
po/sq.po

File diff suppressed because it is too large Load Diff

548
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

548
po/sv.po

File diff suppressed because it is too large Load Diff

548
po/ta.po

File diff suppressed because it is too large Load Diff

548
po/te.po

File diff suppressed because it is too large Load Diff

548
po/th.po

File diff suppressed because it is too large Load Diff

548
po/tr.po

File diff suppressed because it is too large Load Diff

548
po/tt.po

File diff suppressed because it is too large Load Diff

548
po/ug.po

File diff suppressed because it is too large Load Diff

548
po/uk.po

File diff suppressed because it is too large Load Diff

564
po/ur.po

File diff suppressed because it is too large Load Diff

548
po/uz.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -74,7 +74,7 @@ if ($error) {
if ($form_display->hasErrors()) {
// form has errors
?>
<div class="warning config-form">
<div class="error config-form">
<b><?php echo __('Cannot save settings, submitted form contains errors') ?></b>
<?php $form_display->displayErrors(); ?>
</div>
@ -86,4 +86,4 @@ $form_display->display(true, true);
* Displays the footer
*/
require './libraries/footer.inc.php';
?>
?>

View File

@ -109,7 +109,7 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
// mimic original form and post json in a hidden field
require './libraries/header.inc.php';
require './libraries/user_preferences.inc.php';
$msg = PMA_Message::warning(__('Configuration contains incorrect data for some fields.'));
$msg = PMA_Message::error(__('Configuration contains incorrect data for some fields.'));
$msg->display();
echo '<div class="config-form">';
$form_display->displayErrors();

View File

@ -13,20 +13,21 @@ THRESHOLD=50
#
# Generated output file
#
TMPOUTPUTFILE=libraries/language_stats.inc.php.tmp
OUTPUTFILE=libraries/language_stats.inc.php
if [ ! -z "$1" ] ; then
THRESHOLD=$1
fi
echo '<?php' > $OUTPUTFILE
echo '/* Automatically generated file, do not edit! */' >> $OUTPUTFILE
echo '/* Generated by scripts/remove-incomplete-mo */' >> $OUTPUTFILE
echo '' >> $OUTPUTFILE
echo '$GLOBALS["language_stats"] = array (' >> $OUTPUTFILE
echo '<?php' > $TMPOUTPUTFILE
echo '/* Automatically generated file, do not edit! */' >> $TMPOUTPUTFILE
echo '/* Generated by scripts/remove-incomplete-mo */' >> $TMPOUTPUTFILE
echo '' >> $TMPOUTPUTFILE
echo '$GLOBALS["language_stats"] = array (' >> $TMPOUTPUTFILE
check() {
OUTPUTFILE=$2
TMPOUTPUTFILE=$2
lang=`echo $1 | sed 's@po/\(.*\)\.po@\1@'`
STATS=`LC_ALL=C msgfmt --statistics -o /dev/null $1 2>&1`
if echo $STATS | grep -q ' translated ' ; then
@ -45,7 +46,7 @@ check() {
UNTRANSLATED=0
fi
PERCENT=`expr 100 \* $TRANSLATED / \( $TRANSLATED + $FUZZY + $UNTRANSLATED \) || true`
echo " '$lang' => $PERCENT," >> $OUTPUTFILE
echo " '$lang' => $PERCENT," >> $TMPOUTPUTFILE
if [ $PERCENT -lt $THRESHOLD ] ; then
echo "Removing $lang, only $PERCENT%"
@ -54,8 +55,10 @@ check() {
}
for x in po/*.po ; do
check $x $OUTPUTFILE
check $x $TMPOUTPUTFILE
done
echo ');' >> $OUTPUTFILE
echo '?>' >> $OUTPUTFILE
echo ');' >> $TMPOUTPUTFILE
echo '?>' >> $TMPOUTPUTFILE
mv $TMPOUTPUTFILE $OUTPUTFILE

View File

@ -1790,7 +1790,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
$user_does_not_exists = (bool) ! PMA_DBI_fetch_value($sql);
unset($sql);
if ($user_does_not_exists) {
PMA_Message::warning(__('The selected user was not found in the privilege table.'))->display();
PMA_Message::error(__('The selected user was not found in the privilege table.'))->display();
PMA_displayLoginInformationFields();
//require './libraries/footer.inc.php';
}

View File

@ -288,10 +288,10 @@ if (! isset($GLOBALS['repl_clear_scr'])) {
$slave_skip_error_link = PMA_generate_common_url($_url_params);
if ($server_slave_replication[0]['Slave_SQL_Running'] == 'No') {
PMA_Message::warning(__('Slave SQL Thread not running!'))->display();
PMA_Message::error(__('Slave SQL Thread not running!'))->display();
}
if ($server_slave_replication[0]['Slave_IO_Running'] == 'No') {
PMA_Message::warning(__('Slave IO Thread not running!'))->display();
PMA_Message::error(__('Slave IO Thread not running!'))->display();
}
$_url_params = $GLOBALS['url_params'];
@ -337,7 +337,7 @@ if (! isset($GLOBALS['repl_clear_scr'])) {
echo ' </li>';
echo ' <li><a href="#" id="slave_errormanagement_href">' . __('Error management:') . '</a>';
echo ' <div id="slave_errormanagement_gui" style="display: none">';
PMA_Message::warning(__('Skipping errors might lead into unsynchronized master and slave!'))->display();
PMA_Message::error(__('Skipping errors might lead into unsynchronized master and slave!'))->display();
echo ' <ul>';
echo ' <li><a href="' . $slave_skip_error_link . '">' . __('Skip current error') . '</a></li>';
echo ' <li>' . __('Skip next');

View File

@ -61,7 +61,7 @@ if (!$is_https) {
$text .= ' ' . PMA_lang($strInsecureConnectionMsg2,
'https://' . htmlspecialchars($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
}
messages_set('warning', 'no_https', __('Insecure connection'), $text);
messages_set('notice', 'no_https', __('Insecure connection'), $text);
}
?>

View File

@ -38,7 +38,7 @@ function process_formset(FormDisplay $form_display) {
}
$id = $id ? "{$separator}id=$id" : '';
?>
<div class="warning">
<div class="error">
<h4><?php echo __('Warning') ?></h4>
<?php echo __('Submitted form contains errors') ?><br />
<a href="?page=<?php echo $page . $formset . $id . $separator ?>mode=revert"><?php echo __('Try to revert erroneous fields to their default values') ?></a>

View File

@ -19,7 +19,7 @@ if (!defined('PHPMYADMIN')) {
function messages_begin()
{
if (!isset($_SESSION['messages']) || !is_array($_SESSION['messages'])) {
$_SESSION['messages'] = array('error' => array(), 'warning' => array(), 'notice' => array());
$_SESSION['messages'] = array('error' => array(), 'notice' => array());
} else {
// reset message states
foreach ($_SESSION['messages'] as &$messages) {
@ -35,7 +35,7 @@ function messages_begin()
* Adds a new message to message list
*
* @param string $id unique message identifier
* @param string $type one of: notice, warning, error
* @param string $type one of: notice, error
* @param string $title language string id (in $str array)
* @param string $message message text
*/
@ -314,7 +314,7 @@ function perform_config_checks()
&& $cf->getValue("Servers/$i/user") != ''
&& $cf->getValue("Servers/$i/password") != '') {
$title = PMA_lang(PMA_lang_name('Servers/1/auth_type')) . " ($server_name)";
messages_set('warning', "Servers/$i/auth_type", $title,
messages_set('notice', "Servers/$i/auth_type", $title,
PMA_lang($strServerAuthConfigMsg, $i) . ' ' .
PMA_lang($strSecurityInfoMsg, $i));
}
@ -327,7 +327,7 @@ function perform_config_checks()
if ($cf->getValue("Servers/$i/AllowRoot")
&& $cf->getValue("Servers/$i/AllowNoPassword")) {
$title = PMA_lang(PMA_lang_name('Servers/1/AllowNoPassword')) . " ($server_name)";
messages_set('warning', "Servers/$i/AllowNoPassword", $title,
messages_set('notice', "Servers/$i/AllowNoPassword", $title,
__('You allow for connecting to the server without a password.') . ' ' .
PMA_lang($strSecurityInfoMsg, $i));
}
@ -358,7 +358,7 @@ function perform_config_checks()
$blowfish_warnings[] = PMA_lang(__('Key should contain letters, numbers [em]and[/em] special characters.'));
}
if (!empty($blowfish_warnings)) {
messages_set('warning', 'blowfish_warnings' . count($blowfish_warnings),
messages_set('error', 'blowfish_warnings' . count($blowfish_warnings),
PMA_lang(PMA_lang_name('blowfish_secret')),
implode('<br />', $blowfish_warnings));
}
@ -380,7 +380,7 @@ function perform_config_checks()
// should be disabled
//
if ($cf->getValue('AllowArbitraryServer')) {
messages_set('warning', 'AllowArbitraryServer',
messages_set('notice', 'AllowArbitraryServer',
PMA_lang(PMA_lang_name('AllowArbitraryServer')),
PMA_lang($strAllowArbitraryServerWarning));
}
@ -393,7 +393,7 @@ function perform_config_checks()
|| $cf->getValue('LoginCookieValidity') > ini_get('session.gc_maxlifetime')) {
$message_type = $cf->getValue('LoginCookieValidity') > ini_get('session.gc_maxlifetime')
? 'error'
: 'warning';
: 'notice';
messages_set($message_type, 'LoginCookieValidity',
PMA_lang(PMA_lang_name('LoginCookieValidity')),
PMA_lang($strLoginCookieValidityWarning));
@ -404,7 +404,7 @@ function perform_config_checks()
// should be at most 1800 (30 min)
//
if ($cf->getValue('LoginCookieValidity') > 1800) {
messages_set('warning', 'LoginCookieValidity',
messages_set('notice', 'LoginCookieValidity',
PMA_lang(PMA_lang_name('LoginCookieValidity')),
PMA_lang($strLoginCookieValidityWarning2));
}
@ -446,7 +446,7 @@ function perform_config_checks()
//
if ($cf->getValue('GZipDump')
&& (@!function_exists('gzopen') || @!function_exists('gzencode'))) {
messages_set('warning', 'GZipDump',
messages_set('error', 'GZipDump',
PMA_lang(PMA_lang_name('GZipDump')),
PMA_lang($strGZipDumpWarning, 'gzencode'));
}
@ -463,7 +463,7 @@ function perform_config_checks()
$functions .= @function_exists('bzcompress')
? ''
: ($functions ? ', ' : '') . 'bzcompress';
messages_set('warning', 'BZipDump',
messages_set('error', 'BZipDump',
PMA_lang(PMA_lang_name('BZipDump')),
PMA_lang($strBZipDumpWarning, $functions));
}
@ -473,7 +473,7 @@ function perform_config_checks()
// requires zip_open in import
//
if ($cf->getValue('ZipDump') && !@function_exists('zip_open')) {
messages_set('warning', 'ZipDump_import',
messages_set('error', 'ZipDump_import',
PMA_lang(PMA_lang_name('ZipDump')),
PMA_lang($strZipDumpImportWarning, 'zip_open'));
}
@ -483,7 +483,7 @@ function perform_config_checks()
// requires gzcompress in export
//
if ($cf->getValue('ZipDump') && !@function_exists('gzcompress')) {
messages_set('warning', 'ZipDump_export',
messages_set('error', 'ZipDump_export',
PMA_lang(PMA_lang_name('ZipDump')),
PMA_lang($strZipDumpExportWarning, 'gzcompress'));
}

View File

@ -275,7 +275,7 @@ if ($do_confirm) {
$stripped_sql_query = $sql_query;
require_once './libraries/header.inc.php';
if ($is_drop_database) {
echo '<h1 class="warning">' . __('You are about to DESTROY a complete database!') . '</h1>';
echo '<h1 class="error">' . __('You are about to DESTROY a complete database!') . '</h1>';
}
echo '<form action="sql.php" method="post">' . "\n"
.PMA_generate_common_hidden_inputs($db, $table);

View File

@ -179,7 +179,7 @@ if (isset($_REQUEST['create_index'])) {
<br class="clearfloat" />
<?php
PMA_Message::warning(__('("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)'))->display();
PMA_Message::error(__('("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)'))->display();
?>
<table>

View File

@ -228,7 +228,7 @@ if (isset($result) && empty($message_to_show)) {
if (! empty($warning_messages)) {
$_message = new PMA_Message;
$_message->addMessages($warning_messages);
$_message->isWarning(true);
$_message->isError(true);
unset($warning_messages);
}
PMA_showMessage($_message, $sql_query, $_type);

View File

@ -273,7 +273,7 @@ if (isset($_REQUEST['destination_foreign'])) {
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";
}
if (substr($tmp_error, 1, 4) == '1005') {
$message = PMA_Message::warning( __('Error creating foreign key on %1$s (check data types)'));
$message = PMA_Message::error( __('Error creating foreign key on %1$s (check data types)'));
$message->addParam($master_field);
$message->display();
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";

View File

@ -410,11 +410,11 @@ $message->addMessages($last_messages, '<br />');
if (! empty($warning_messages)) {
/**
* @todo use a <div class="warning"> in PMA_showMessage() for this part of
* @todo use a <div class="error"> in PMA_showMessage() for this part of
* the message
*/
$message->addMessages($warning_messages, '<br />');
$message->isWarning(true);
$message->isError(true);
}
if (! empty($error_messages)) {
$message->addMessages($error_messages);

View File

@ -466,8 +466,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
<?php
} // end if... else...
echo "\n";
} // end if (! $tbl_is_view && ! $db_is_information_schema)
?>
?>
<td class="more_opts" id="more_opts<?php echo $rownum; ?>">
<?php echo __('More'); ?> <img src="<?php echo $pmaThemeImage . 'more.png'; ?>" alt="<?php echo __('Show more actions'); ?>" />
<div class="structure_actions_dropdown" id="row_<?php echo $rownum; ?>">
@ -531,6 +530,9 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
</div>
</div>
</td>
<?php
} // end if (! $tbl_is_view && ! $db_is_information_schema)
?>
</tr>
<?php
unset($field_charset);
@ -771,7 +773,7 @@ if ($cfg['ShowStats']) {
}
if (isset($free_size)) {
?>
<tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?> warning">
<tr class="<?php echo ($odd_row = !$odd_row) ? 'odd' : 'even'; ?> error">
<th class="name"><?php echo __('Overhead'); ?></th>
<td class="value"><?php echo $free_size; ?></td>
<td class="unit"><?php echo $free_unit; ?></td>

View File

@ -79,15 +79,6 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
$this->assertEquals('Error', PMA_Message::error()->getString());
}
/**
* test warning method
*/
public function testWarning()
{
$this->object = new PMA_Message('test<&>', PMA_Message::WARNING);
$this->assertEquals($this->object, PMA_Message::warning('test<&>'));
}
/**
* test notice method
*/
@ -156,20 +147,11 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
public function testIsNotice()
{
$this->assertTrue($this->object->isNotice());
$this->object->isWarning(true);
$this->object->isError(true);
$this->assertFalse($this->object->isNotice());
$this->assertTrue($this->object->isNotice(true));
}
/**
* testing isWarning method
*/
public function testIsWarning()
{
$this->assertFalse($this->object->isWarning());
$this->assertTrue($this->object->isWarning(true));
}
/**
* testing isError method
*/
@ -368,8 +350,6 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
$this->assertEquals('success', $this->object->getLevel());
$this->object->setNumber(PMA_Message::ERROR);
$this->assertEquals('error', $this->object->getLevel());
$this->object->setNumber(PMA_Message::WARNING);
$this->assertEquals('warning', $this->object->getLevel());
}
/**

Some files were not shown because too many files have changed in this diff Show More