merging changes from origin

This commit is contained in:
ninadsp
2010-05-24 18:32:42 +05:30
parent bed1948d04
commit 38ac78e3ba
98 changed files with 203311 additions and 221985 deletions

View File

@@ -81,6 +81,7 @@ $Id$
to Muhammad Adnan.
+ [doc] Incorporate synchronisation docs into main document.
+ [core] Include Content Security Policy HTTP headers.
- bug #3004216 [CSS] Field attributes use inline CSS
3.3.4.0 (not yet released)
- bug #2996161 [import] properly escape import value

View File

@@ -2576,6 +2576,18 @@ setfacl -d -m "g:www-data:rwx" tmp
field (i.e. 'text/plain', 'image/jpeg' etc.)</li>
</ol>
<p> Additionally you should also provide additional function to provide
information about the transformation to the user. This function should
have same name as transformation function just with appended
<code>_info</code> suffix. This function accepts no parameters and returns
array with information about the transformation. Currently following keys
can be used:
</p>
<dl>
<dt><code>info</code></dt>
<dd>Long description of the transformation.</dd>
</dl>
<!-- FAQ -->
<h2 id="faq">FAQ - Frequently Asked Questions</h2>
@@ -4348,7 +4360,7 @@ chmod o+rwx tmp
<code>po/LANG_CODE.po</code> for your language (you can use
<code>msginit -i po/phpmyadmin.pot -l LANG_CODE --no-translator -o po/LANG_CODE.po</code>
to do this) or ask on mailing list to add the translation to the web
interface. More details are available on <a href="http://wiki.phpmyadmin.net/pma/Devel:Gettext_for_translators">our wiki</a>.</p>
interface. More details are available on <a href="http://wiki.phpmyadmin.net/pma/Devel:Gettext_for_translators">our wiki</a>.
</p>
<p>
Please note that we try not to use HTML entities like &amp;eacute; in

View File

@@ -463,18 +463,18 @@ if (!$is_information_schema) {
?>
<input type="checkbox" name="create_database_before_copying" value="1"
id="checkbox_create_database_before_copying"
style="vertical-align: middle" checked="checked" />
checked="checked" />
<label for="checkbox_create_database_before_copying">
<?php echo __('CREATE DATABASE before copying'); ?></label><br />
<input type="checkbox" name="drop_if_exists" value="true"
id="checkbox_drop" style="vertical-align: middle" />
id="checkbox_drop" />
<label for="checkbox_drop"><?php echo sprintf(__('Add %s'), $drop_clause); ?></label><br />
<input type="checkbox" name="sql_auto_increment" value="1" checked="checked"
id="checkbox_auto_increment" style="vertical-align: middle" />
id="checkbox_auto_increment" />
<label for="checkbox_auto_increment">
<?php echo __('Add AUTO_INCREMENT value'); ?></label><br />
<input type="checkbox" name="add_constraints" value="1"
id="checkbox_constraints" style="vertical-align: middle" />
id="checkbox_constraints" />
<label for="checkbox_constraints">
<?php echo __('Add constraints'); ?></label><br />
<?php
@@ -488,7 +488,7 @@ if (!$is_information_schema) {
<input type="checkbox" name="switch_to_new" value="true"
id="checkbox_switch"
<?php echo ((isset($pma_switch_to_new) && $pma_switch_to_new == 'true') ? ' checked="checked"' : ''); ?>
style="vertical-align: middle" />
/>
<label for="checkbox_switch"><?php echo __('Switch to copied database'); ?></label>
</fieldset>
<fieldset class="tblFooters">
@@ -600,7 +600,7 @@ if (!$is_information_schema) {
. PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION,
'db_collation', 'select_db_collation', $db_collation, false, 3)
. ' <input type="submit" name="submitcollation"'
. ' value="' . __('Go') . '" style="vertical-align: middle" />' . "\n"
. ' value="' . __('Go') . '" />' . "\n"
. '</fieldset>' . "\n"
. '</form>' . "\n";

View File

@@ -582,7 +582,7 @@ echo PMA_generate_common_hidden_inputs($url_params);
<tr>
<td nowrap="nowrap">
<?php echo __('Add/Delete Criteria Row'); ?>:
<select size="1" name="add_row" style="vertical-align: middle">
<select size="1" name="add_row">
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>
@@ -594,7 +594,7 @@ echo PMA_generate_common_hidden_inputs($url_params);
</td>
<td width="10">&nbsp;</td>
<td nowrap="nowrap"><?php echo __('Add/Delete Field Columns'); ?>:
<select size="1" name="add_col" style="vertical-align: middle">
<select size="1" name="add_col">
<option value="-3">-3</option>
<option value="-2">-2</option>
<option value="-1">-1</option>

View File

@@ -18,14 +18,17 @@ if (isset($GLOBALS["message"]) && $GLOBALS["message"]) {
header('Content-type: text/html');
usleep(300000); // wait 0.3 sec before we check for $_SESSION variable, which is set inside import.php
while ($_SESSION['Import_message']['message'] == null) { // wait until message is available
// wait 0.3 sec before we check for $_SESSION variable, which is set inside import.php
usleep(300000);
// wait until message is available
while ($_SESSION['Import_message']['message'] == null) {
usleep(250000); // 0.25 sec
}
echo $_SESSION['Import_message']['message'];
echo '<fieldset class="tblFooters">' . "\n";
echo ' [ <a href="' . $_SESSION['Import_message']['go_back_url'] . '">' . $GLOBALS["strBack"] . '</a> ]' . "\n";
echo ' [ <a href="' . $_SESSION['Import_message']['go_back_url'] . '">' . __('Back') . '</a> ]' . "\n";
echo '</fieldset>'."\n";
} else {

View File

@@ -2814,7 +2814,22 @@ function PMA_duplicateFirstNewline($string){
* or $cfg['DefaultTabDatabase']
*/
function PMA_getTitleForTarget($target) {
return $GLOBALS[$GLOBALS['cfg']['DefaultTabTranslationMapping'][$target]];
$mapping = array(
// Values for $cfg['DefaultTabTable']
'tbl_structure.php' => __('Structure'),
'tbl_sql.php' => __('SQL'),
'tbl_select.php' =>__('Search'),
'tbl_change.php' =>__('Insert'),
'sql.php' => __('Browse'),
// Values for $cfg['DefaultTabDatabase']
'db_structure.php' => __('Structure'),
'db_sql.php' => __('SQL'),
'db_search.php' => __('Search'),
'db_operations.php' => __('Operations'),
);
return $mapping[$target];
}
function PMA_js($code, $print=true)

View File

@@ -1055,29 +1055,6 @@ $cfg['DefaultTabDatabase'] = 'db_structure.php';
*/
$cfg['DefaultTabTable'] = 'sql.php';
/**
* Mapping between script filenames and translation keys
*
* Lookup can be performed by PMA_getTitleForTarget()
*
* @global string $cfg['DefaultTabTranslationMapping']
*/
$cfg['DefaultTabTranslationMapping'] = array(
// Values for $cfg['DefaultTabTable']
'tbl_structure.php' => 'strStructure',
'tbl_sql.php' => 'strSQL',
'tbl_select.php' => 'strSearch',
'tbl_change.php' => 'strInsert',
'sql.php' => 'strBrowse',
// Values for $cfg['DefaultTabDatabase']
'db_structure.php' => 'strStructure',
'db_sql.php' => 'strSQL',
'db_search.php' => 'strSearch',
'db_operations.php' => 'strOperations',
);
/*******************************************************************************
* Export defaults
*/
@@ -2352,7 +2329,7 @@ $cfg['ErrorIconic'] = true;
$cfg['MainPageIconic'] = true;
/**
* show help button instead of strDocu (true|false)?
* show help button instead of Documentation text (true|false)?
*
* @global boolean $cfg['ReplaceHelpImg']
*/

View File

@@ -231,8 +231,6 @@ function PMA_fatalError($error_message, $message_args = null)
// Loads the language file
require_once './libraries/select_lang.lib.php';
$GLOBALS['strError'] = __('Error');
// $text_dir is set in po file
if (isset($text_dir)) {
$GLOBALS['text_dir'] = $text_dir;

View File

@@ -244,19 +244,19 @@ if ($is_zip || $is_gzip || $is_bzip) { ?>
id="radio_compression_zip"
onclick="document.getElementById('checkbox_dump_asfile').checked = true;"
<?php PMA_exportIsActive('compression', 'zip'); ?> />
<label for="radio_compression_zip"><?php echo __('zipped'); ?></label>
<label for="radio_compression_zip"><?php echo __('"zipped"'); ?></label>
<?php } if ($is_gzip) { ?>
<input type="radio" name="compression" value="gzip"
id="radio_compression_gzip"
onclick="document.getElementById('checkbox_dump_asfile').checked = true;"
<?php PMA_exportIsActive('compression', 'gzip'); ?> />
<label for="radio_compression_gzip"><?php echo __('gzipped'); ?></label>
<label for="radio_compression_gzip"><?php echo __('"gzipped"'); ?></label>
<?php } if ($is_bzip) { ?>
<input type="radio" name="compression" value="bzip"
id="radio_compression_bzip"
onclick="document.getElementById('checkbox_dump_asfile').checked = true;"
<?php PMA_exportIsActive('compression', 'bzip2'); ?> />
<label for="radio_compression_bzip"><?php echo __('bzipped'); ?></label>
<label for="radio_compression_bzip"><?php echo __('"bzipped"'); ?></label>
<?php } ?>
</div>
<?php } else { ?>

View File

@@ -26,8 +26,7 @@ if (isset($plugin_list)) {
'extension' => 'sql',
'mime_type' => 'text/x-sql',
'options' => array(
array('type' => 'text', 'name' => 'header_comment', 'text' => __('Add custom comment into header (
splits lines)')),
array('type' => 'text', 'name' => 'header_comment', 'text' => __('Add custom comment into header (\\n splits lines)')),
array('type' => 'bool', 'name' => 'include_comments', 'text' => __('Comments')),
array('type' => 'bool', 'name' => 'use_transaction', 'text' => __('Enclose export in a transaction')),
array('type' => 'bool', 'name' => 'disable_fk', 'text' => __('Disable foreign key checks')),
@@ -153,7 +152,7 @@ function PMA_exportComment($text = '')
/**
* Possibly outputs CRLF
*
* @return string $crlf or nothing
* @return string $crlf or nothing
*/
function PMA_possibleCRLF()
{
@@ -723,7 +722,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mim
}
if (isset($mime_map) && count($mime_map) > 0) {
$schema_create .= PMA_possibleCRLF()
$schema_create .= PMA_possibleCRLF()
. PMA_exportComment()
. PMA_exportComment(__('MIME TYPES FOR TABLE'). ' ' . PMA_backquote($table, $sql_backquotes) . ':');
@reset($mime_map);
@@ -735,7 +734,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mim
}
if ($have_rel) {
$schema_create .= PMA_possibleCRLF()
$schema_create .= PMA_possibleCRLF()
. PMA_exportComment()
. PMA_exportComment(__('RELATIONS FOR TABLE'). ' ' . PMA_backquote($table, $sql_backquotes) . ':');
foreach ($res_rel AS $rel_field => $rel) {
@@ -776,9 +775,9 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = FALSE,
$formatted_table_name = (isset($GLOBALS['sql_backquotes']))
? PMA_backquote($table)
: '\'' . $table . '\'';
$dump = PMA_possibleCRLF()
$dump = PMA_possibleCRLF()
. PMA_exportComment(str_repeat('-', 56))
. PMA_possibleCRLF()
. PMA_possibleCRLF()
. PMA_exportComment();
switch($export_mode) {
@@ -789,10 +788,10 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = FALSE,
$dump .= PMA_getTableComments($db, $table, $crlf, $relation, $mime);
break;
case 'triggers':
$dump = '';
$dump = '';
$triggers = PMA_DBI_get_triggers($db, $table);
if ($triggers) {
$dump .= PMA_possibleCRLF()
$dump .= PMA_possibleCRLF()
. PMA_exportComment()
. PMA_exportComment(__('Triggers') . ' ' . $formatted_table_name)
. PMA_exportComment();
@@ -863,7 +862,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
// Do not export data for a VIEW
// (For a VIEW, this is called only when exporting a single VIEW)
if (PMA_Table::isView($db, $table)) {
$head = PMA_possibleCRLF()
$head = PMA_possibleCRLF()
. PMA_exportComment()
. PMA_exportComment('VIEW ' . ' ' . $formatted_table_name)
. PMA_exportComment(__('Data') . ': ' . __('None'))
@@ -877,7 +876,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
}
// it's not a VIEW
$head = PMA_possibleCRLF()
$head = PMA_possibleCRLF()
. PMA_exportComment()
. PMA_exportComment(__('Dumping data for table') . ' ' . $formatted_table_name)
. PMA_exportComment();

View File

@@ -4,7 +4,7 @@
* OpenDocument Spreadsheet import plugin for phpMyAdmin
*
* @todo Pretty much everything
* @todo Importing of accented characters seems to fail
* @todo Importing of accented characters seems to fail
* @version 0.5-beta
* @package phpMyAdmin-Import
*/
@@ -25,7 +25,7 @@ if (isset($plugin_list)) {
array('type' => 'bool', 'name' => 'col_names', 'text' => __('Column names in first row')),
array('type' => 'bool', 'name' => 'empty_rows', 'text' => __('Do not import empty rows')),
array('type' => 'bool', 'name' => 'recognize_percentages', 'text' => __('Import percentages as proper decimals (12.00% to .12)')),
array('type' => 'bool', 'name' => 'recognize_currency', 'text' => __('Import currencies (.00 to 5.00)')),
array('type' => 'bool', 'name' => 'recognize_currency', 'text' => __('Import currencies ($5.00 to 5.00)')),
),
'options_text' => __('Options'),
);
@@ -89,7 +89,7 @@ $rows = array();
/* Iterate over tables */
foreach ($sheets as $sheet) {
$col_names_in_first_row = $_REQUEST['ods_col_names'];
/* Iterate over rows */
foreach ($sheet as $row) {
$type = $row->getName();
@@ -98,7 +98,7 @@ foreach ($sheets as $sheet) {
foreach ($row as $cell) {
$text = $cell->children('text', true);
$cell_attrs = $cell->attributes('office', true);
if (count($text) != 0) {
if (! $col_names_in_first_row) {
if ($_REQUEST['ods_recognize_percentages'] && !strcmp('percentage', $cell_attrs['value-type'])) {
@@ -117,14 +117,14 @@ foreach ($sheets as $sheet) {
$col_names[] = (string)$text;
}
}
++$col_count;
} else {
/* Number of blank columns repeated */
if ($col_count < count($row->children('table', true)) - 1) {
$attr = $cell->attributes('table', true);
$num_null = (int)$attr['number-columns-repeated'];
if ($num_null) {
if (! $col_names_in_first_row) {
for ($i = 0; $i < $num_null; ++$i) {
@@ -143,18 +143,18 @@ foreach ($sheets as $sheet) {
} else {
$col_names[] = PMA_getColumnAlphaName($col_count + 1);
}
++$col_count;
}
}
}
}
/* Find the widest row */
if ($col_count > $max_cols) {
$max_cols = $col_count;
}
/* Don't include a row that is full of NULL values */
if (! $col_names_in_first_row) {
if ($_REQUEST['ods_empty_rows']) {
@@ -168,13 +168,13 @@ foreach ($sheets as $sheet) {
$tempRows[] = $tempRow;
}
}
$col_count = 0;
$col_names_in_first_row = false;
$tempRow = array();
}
}
/* Skip over empty sheets */
if (count($tempRows) == 0 || count($tempRows[0]) == 0) {
$col_names = array();
@@ -182,18 +182,18 @@ foreach ($sheets as $sheet) {
$tempRows = array();
continue;
}
/**
* Fill out each row as necessary to make
* every one exactly as wide as the widest
* row. This included column names.
*/
/* Fill out column names */
for ($i = count($col_names); $i < $max_cols; ++$i) {
$col_names[] = PMA_getColumnAlphaName($i + 1);
}
/* Fill out all rows */
$num_rows = count($tempRows);
for ($i = 0; $i < $num_rows; ++$i) {
@@ -201,11 +201,11 @@ foreach ($sheets as $sheet) {
$tempRows[$i][] = 'NULL';
}
}
/* Store the table name so we know where to place the row set */
$tbl_attr = $sheet->attributes('table', true);
$tables[] = array((string)$tbl_attr['name']);
/* Store the current sheet in the accumulator */
$rows[] = array((string)$tbl_attr['name'], $col_names, $tempRows);
$tempRows = array();
@@ -229,7 +229,7 @@ for ($i = 0; $i < $num_tbls; ++$i) {
if (! isset($tables[$i][COL_NAMES])) {
$tables[$i][] = $rows[$j][COL_NAMES];
}
$tables[$i][ROWS] = $rows[$j][ROWS];
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -38,7 +38,7 @@ function PMA_replication_db_multibox()
/**
* prints out code for changing master
*
* @param String $submitname - submit button name
* @param String $submitname - submit button name
*/
function PMA_replication_gui_changemaster($submitname) {
@@ -46,7 +46,7 @@ function PMA_replication_gui_changemaster($submitname) {
list($username_length, $hostname_length) = PMA_replication_get_username_hostname_length();
echo '<form method="post" action="server_replication.php">';
echo PMA_generate_common_hidden_inputs('', '');
echo PMA_generate_common_hidden_inputs('', '');
echo ' <fieldset id="fieldset_add_user_login">';
echo ' <legend>' . __('Slave configuration') . ' - ' . __('Change or reconfigure master server') . '</legend>';
echo __('Make sure, you have unique server-id in your configuration file (my.cnf). If not, please add the following line into [mysqld] section:') . '<br />';
@@ -99,7 +99,11 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru
echo '<div id="replication_' . $type . '_section" style="' . ($hidden ? 'display: none;' : '') . '"> ';
if ($title) {
echo '<h4><a name="replication_' . $type . '"></a>' . ${"strReplicationStatus_{$type}"} . '</h4>';
if ($type == 'master') {
echo '<h4><a name="replication_' . $type . '"></a>' . __('Master status') . '</h4>';
} else {
echo '<h4><a name="replication_' . $type . '"></a>' . __('Slave status') . '</h4>';
}
} else {
echo '<br />';
}
@@ -123,19 +127,19 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru
// TODO change to regexp or something, to allow for negative match
if (isset(${"{$type}_variables_alerts"}[$variable])
if (isset(${"{$type}_variables_alerts"}[$variable])
&& ${"{$type}_variables_alerts"}[$variable] == ${"server_{$type}_replication"}[0][$variable]
) {
echo '<span class="attention">';
} elseif (isset(${"{$type}_variables_oks"}[$variable])
} elseif (isset(${"{$type}_variables_oks"}[$variable])
&& ${"{$type}_variables_oks"}[$variable] == ${"server_{$type}_replication"}[0][$variable]
) {
echo '<span class="allfine">';
} else {
echo '<span>';
}
echo ${"server_{$type}_replication"}[0][$variable];
echo ${"server_{$type}_replication"}[0][$variable];
echo '</span>';
echo ' </td>';
@@ -159,7 +163,7 @@ function PMA_replication_print_status_table($type, $hidden = false, $title = tru
function PMA_replication_print_slaves_table($hidden = false) {
// Fetch data
$data = PMA_DBI_fetch_result('SHOW SLAVE HOSTS', null, null);
$data = PMA_DBI_fetch_result('SHOW SLAVE HOSTS', null, null);
echo ' <br />';
echo ' <div id="replication_slaves_section" style="' . ($hidden ? 'display: none;' : '') . '"> ';

View File

@@ -12,6 +12,12 @@
* extension. For further information regarding naming conventions see the /Documentation.html file.
*/
function PMA_transformation_[ENTER_FILENAME_HERE]_info() {
return array(
'info' => __('Description of the transformation.'),
);
}
function PMA_transformation_[ENTER_FILENAME_HERE]($buffer, $options = array(), $meta = '') {
// possibly use a global transform and feed it with special options:
// include('./libraries/transformations/global.inc.php');

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_application_octetstream__download_info() {
return array(
'info' => __('Displays a link to download the binary data of the field. You can use the first option to specify the filename, or use the second option as the name of a field which contains the filename. If you use the second option, you need to set the first option to the empty string.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_application_octetstream__hex_info() {
return array(
'info' => __('Displays hexadecimal representation of data. Optional first parameter specifies how often space will be added (defaults to 2 nibbles).'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_image_jpeg__inline_info() {
return array(
'info' => __('Displays a clickable thumbnail. The options are the maximum width and height in pixels. The original aspect ratio is preserved.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_image_jpeg__link_info() {
return array(
'info' => __('Displays a link to download this image.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_image_png__inline_info() {
return array(
'info' => __('Displays a clickable thumbnail. The options are the maximum width and height in pixels. The original aspect ratio is preserved.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__dateformat_info() {
return array(
'info' => __('Displays a TIME, TIMESTAMP, DATETIME or numeric unix timestamp field as formatted date. The first option is the offset (in hours) which will be added to the timestamp (Default: 0). Use second option to specify a different date/time format string. Third option determines whether you want to see local date or UTC one (use "local" or "utc" strings) for that. According to that, date format has different value - for "local" see the documentation for PHP\'s strftime() function and for "utc" it is done using gmdate() function.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__external_info() {
return array(
'info' => __('LINUX ONLY: Launches an external application and feeds it the field data via standard input. Returns the standard output of the application. The default is Tidy, to pretty-print HTML code. For security reasons, you have to manually edit the file libraries/transformations/text_plain__external.inc.php and list the tools you want to make available. The first option is then the number of the program you want to use and the second option is the parameters for the program. The third option, if set to 1, will convert the output using htmlspecialchars() (Default 1). The fourth option, if set to 1, will prevent wrapping and ensure that the output appears all on one line (Default 1).'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__formatted_info() {
return array(
'info' => __('Displays the contents of the field as-is, without running it through htmlspecialchars(). That is, the field is assumed to contain valid HTML.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__imagelink_info() {
return array(
'info' => __('Displays an image and a link; the field contains the filename. The first option is a URL prefix like "http://www.example.com/". The second and third options are the width and the height in pixels.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__link_info() {
return array(
'info' => __('Displays a link; the field contains the filename. The first option is a URL prefix like "http://www.example.com/". The second option is a title for the link.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__longToIpv4_info() {
return array(
'info' => __('Converts an (IPv4) Internet network address into a string in Internet standard dotted format.'),
);
}
/**
* returns IPv4 address
*

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__sql_info() {
return array(
'info' => __('Formats text as SQL query with syntax highlighting.'),
);
}
/**
*
*/

View File

@@ -5,6 +5,12 @@
* @version $Id$
*/
function PMA_transformation_text_plain__substr_info() {
return array(
'info' => __('Displays a part of a string. The first option is the number of characters to skip from the beginning of the string (Default 0). The second option is the number of characters to return (Default: until end of string). The third option is the string to append and/or prepend when truncation occurs (Default: "...").'),
);
}
/**
*
*/

6747
po/af.po

File diff suppressed because it is too large Load Diff

6714
po/ar.po

File diff suppressed because it is too large Load Diff

7416
po/az.po

File diff suppressed because it is too large Load Diff

6914
po/be.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6890
po/bg.po

File diff suppressed because it is too large Load Diff

7788
po/bn.po

File diff suppressed because it is too large Load Diff

6853
po/bs.po

File diff suppressed because it is too large Load Diff

6969
po/ca.po

File diff suppressed because it is too large Load Diff

6911
po/cs.po

File diff suppressed because it is too large Load Diff

6817
po/da.po

File diff suppressed because it is too large Load Diff

6952
po/de.po

File diff suppressed because it is too large Load Diff

7162
po/el.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6976
po/es.po

File diff suppressed because it is too large Load Diff

6866
po/et.po

File diff suppressed because it is too large Load Diff

6884
po/eu.po

File diff suppressed because it is too large Load Diff

6823
po/fa.po

File diff suppressed because it is too large Load Diff

6943
po/fi.po

File diff suppressed because it is too large Load Diff

6996
po/fr.po

File diff suppressed because it is too large Load Diff

6964
po/gl.po

File diff suppressed because it is too large Load Diff

6789
po/he.po

File diff suppressed because it is too large Load Diff

6653
po/hi.po

File diff suppressed because it is too large Load Diff

6900
po/hr.po

File diff suppressed because it is too large Load Diff

6968
po/hu.po

File diff suppressed because it is too large Load Diff

6883
po/id.po

File diff suppressed because it is too large Load Diff

7266
po/it.po

File diff suppressed because it is too large Load Diff

6794
po/ja.po

File diff suppressed because it is too large Load Diff

8081
po/ka.po

File diff suppressed because it is too large Load Diff

6767
po/ko.po

File diff suppressed because it is too large Load Diff

6878
po/lt.po

File diff suppressed because it is too large Load Diff

6860
po/lv.po

File diff suppressed because it is too large Load Diff

6882
po/mk.po

File diff suppressed because it is too large Load Diff

6805
po/mn.po

File diff suppressed because it is too large Load Diff

6769
po/ms.po

File diff suppressed because it is too large Load Diff

6923
po/nb.po

File diff suppressed because it is too large Load Diff

6973
po/nl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6918
po/pl.po

File diff suppressed because it is too large Load Diff

6867
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6934
po/ro.po

File diff suppressed because it is too large Load Diff

6982
po/ru.po

File diff suppressed because it is too large Load Diff

7779
po/si.po

File diff suppressed because it is too large Load Diff

6900
po/sk.po

File diff suppressed because it is too large Load Diff

6956
po/sl.po

File diff suppressed because it is too large Load Diff

7134
po/sq.po

File diff suppressed because it is too large Load Diff

6889
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

6927
po/sv.po

File diff suppressed because it is too large Load Diff

6525
po/ta.po

File diff suppressed because it is too large Load Diff

6620
po/te.po

File diff suppressed because it is too large Load Diff

6790
po/th.po

File diff suppressed because it is too large Load Diff

6968
po/tr.po

File diff suppressed because it is too large Load Diff

7581
po/tt.po

File diff suppressed because it is too large Load Diff

6716
po/uk.po

File diff suppressed because it is too large Load Diff

6529
po/ur.po

File diff suppressed because it is too large Load Diff

7005
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

@@ -10,7 +10,7 @@ tmp2=`mktemp`
grep -o '^\$\<str[A-Z][a-zA-Z0-9_]*\>' libraries/messages.inc.php \
| tr -d '$' \
| grep -Ev '^str(Transformation_|ShowStatus)' | sort -u > $tmp1
grep -ho '\<str[A-Z][a-zA-Z0-9_]*\>' `find . -type f -a -name '*.php' -a -not -path '*/libraries/messages.inc.php'` \
grep -ho '\<str[A-Z][a-zA-Z0-9_]*\>' `find . -type f -a -name '*.php' -a -not -path '*/libraries/messages.inc.php' -a -not -path '*/js/messages.php' -a -not -path '*.js'` \
| grep -Ev '^str(Transformation_|ShowStatus|Setup)' | sort -u > $tmp2
echo Please note that you need to check results of this script, it doesn\'t

View File

@@ -35,7 +35,7 @@ if (isset($_REQUEST['sort_order'])
$dbstats = empty($_REQUEST['dbstats']) ? 0 : 1;
$pos = empty($_REQUEST['pos']) ? 0 : (int) $_REQUEST['pos'];
/**
* Drops multiple databases
*/
@@ -188,17 +188,17 @@ if ($databases_count > 0) {
.' </a></th>' . "\n";
}
}
foreach ($replication_types as $type)
foreach ($replication_types as $type)
{
if ($type=="master")
$name = "strReplicationMaster";
$name = __('Master replication');
elseif($type == "slave")
$name = "strReplicationSlave";
if (${"server_{$type}_status"})
$name = __('Slave replication');
if (${"server_{$type}_status"})
echo ' <th>'.$GLOBALS[$name].'</th>' . "\n";
}
if ($is_superuser) {
echo ' <th>' . ($cfg['PropertiesIconic'] ? '' : __('Action')) . "\n"
. ' </th>' . "\n";
@@ -326,10 +326,10 @@ if ($databases_count > 0) {
}
}
}
foreach ($replication_types as $type)
foreach ($replication_types as $type)
{
if (${"server_{$type}_status"})
if (${"server_{$type}_status"})
echo ' <th></th>' . "\n";
}

View File

@@ -546,7 +546,7 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) {
?>
<fieldset>
<label><?php echo __('Choose field to display') . ': '; ?></label>
<select name="display_field" style="vertical-align: middle">
<select name="display_field">
<option value="">---</option>
<?php
foreach ($save_row AS $row) {

View File

@@ -299,7 +299,7 @@ $(function() {
<fieldset id="fieldset_display_order">
<legend><?php echo __('Display order:'); ?></legend>
<select name="orderField" style="vertical-align: middle">
<select name="orderField">
<option value="--nil--"></option>
<?php
foreach ($fields_list as $each_field) {

View File

@@ -327,9 +327,8 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
// underline commented fields and display a hover-title (CSS only)
$comment_style = '';
if (isset($comments_map[$row['Field']])) {
$displayed_field_name = '<span style="border-bottom: 1px dashed black;" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>';
$displayed_field_name = '<span class="commented_column" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>';
}
if ($primary && $primary->hasColumn($field_name)) {
@@ -347,7 +346,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
<th nowrap="nowrap"><label for="checkbox_row_<?php echo $rownum; ?>"><?php echo $displayed_field_name; ?></label></th>
<td<?php echo $type_nowrap; ?>><bdo dir="ltr" xml:lang="en"><?php echo $type; echo $type_mime; ?></bdo></td>
<td><?php echo (empty($field_charset) ? '' : '<dfn title="' . PMA_getCollationDescr($field_charset) . '">' . $field_charset . '</dfn>'); ?></td>
<td nowrap="nowrap" style="font-size: 70%"><?php echo $attribute; ?></td>
<td nowrap="nowrap" class="column_attribute"><?php echo $attribute; ?></td>
<td><?php echo (($row['Null'] == 'YES') ? __('Yes') : __('No')); ?></td>
<td nowrap="nowrap"><?php
if (isset($row['Default'])) {
@@ -540,11 +539,11 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
if ($cfg['PropertiesIconic']) {
echo '<img class="icon" src="' . $pmaThemeImage . 'b_insrow.png" width="16" height="16" alt="' . __('Add new field') . '"/>';
}
echo sprintf(__('Add %s field(s)'), '<input type="text" name="num_fields" size="2" maxlength="2" value="1" style="vertical-align: middle" onfocus="this.select()" />');
echo sprintf(__('Add %s field(s)'), '<input type="text" name="num_fields" size="2" maxlength="2" value="1" onfocus="this.select()" />');
// I tried displaying the drop-down inside the label but with Firefox
// the drop-down was blinking
$fieldOptions = '<select name="after_field" style="vertical-align: middle" onclick="this.form.field_where[2].checked=true" onchange="this.form.field_where[2].checked=true">';
$fieldOptions = '<select name="after_field" onclick="this.form.field_where[2].checked=true" onchange="this.form.field_where[2].checked=true">';
foreach ($aryFields as $fieldname) {
$fieldOptions .= '<option value="' . htmlspecialchars($fieldname) . '">' . htmlspecialchars($fieldname) . '</option>' . "\n";
}
@@ -560,7 +559,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
echo $fieldOptions;
unset($fieldOptions, $choices);
?>
<input type="submit" value="<?php echo __('Go'); ?>" style="vertical-align: middle" />
<input type="submit" value="<?php echo __('Go'); ?>" />
</form>
<hr />
<?php

View File

@@ -506,7 +506,7 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
$str_export1 = '<select name="export_type">' .
'<option value="sqldumpfile">' . __('SQL dump (file download)') . '</option>' .
'<option value="sqldump">' . __('SQL dump') . '</option>' .
'<option value="execution" onclick="alert(\'' . __('SQL execution') .'\')">' . __('SQL execution') . '</option>' .
'<option value="execution" onclick="alert(\'' . PMA_escapeJsString(__('This option will replace your table and contained data.')) .'\')">' . __('SQL execution') . '</option>' .
'</select>';
$str_export2 = '<input type="submit" name="report_export" value="' . __('Go') .'" />';

View File

@@ -67,7 +67,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
{
$this->object = new PMA_Message('test<&>', PMA_Message::SUCCESS);
$this->assertEquals($this->object, PMA_Message::success('test<&>'));
$this->assertEquals('strSuccess', PMA_Message::success()->getString());
$this->assertEquals('Your SQL query has been executed successfully', PMA_Message::success()->getString());
}
/**
@@ -77,7 +77,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
{
$this->object = new PMA_Message('test<&>', PMA_Message::ERROR);
$this->assertEquals($this->object, PMA_Message::error('test<&>'));
$this->assertEquals('strError', PMA_Message::error()->getString());
$this->assertEquals('Error', PMA_Message::error()->getString());
}
/**
@@ -112,7 +112,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* test rawWarning method
*/
public function testRawWarning()
public function testRawWarning()
{
$this->object = new PMA_Message('', PMA_Message::WARNING);
$this->object->setMessage('test<&>');
@@ -123,7 +123,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* test rawNotice method
*/
public function testRawNotice()
public function testRawNotice()
{
$this->object = new PMA_Message('', PMA_Message::NOTICE);
$this->object->setMessage('test<&>');
@@ -134,7 +134,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* test rawSuccess method
*/
public function testRawSuccess()
public function testRawSuccess()
{
$this->object = new PMA_Message('', PMA_Message::SUCCESS);
$this->object->setMessage('test<&>');
@@ -145,7 +145,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isSuccess method
*/
public function testIsSuccess()
public function testIsSuccess()
{
$this->assertFalse($this->object->isSuccess());
$this->assertTrue($this->object->isSuccess(true));
@@ -154,7 +154,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isNotice method
*/
public function testIsNotice()
public function testIsNotice()
{
$this->assertTrue($this->object->isNotice());
$this->object->isWarning(true);
@@ -165,7 +165,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isWarning method
*/
public function testIsWarning()
public function testIsWarning()
{
$this->assertFalse($this->object->isWarning());
$this->assertTrue($this->object->isWarning(true));
@@ -174,7 +174,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing isError method
*/
public function testIsError()
public function testIsError()
{
$this->assertFalse($this->object->isError());
$this->assertTrue($this->object->isError(true));
@@ -183,7 +183,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testign setter of message
*/
public function testSetMessage()
public function testSetMessage()
{
$this->object->setMessage('test&<>', false);
$this->assertEquals('test&<>', $this->object->getMessage());
@@ -194,7 +194,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing setter of string
*/
public function testSetString()
public function testSetString()
{
$this->object->setString('test&<>', false);
$this->assertEquals('test&<>', $this->object->getString());
@@ -205,7 +205,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add param method
*/
public function testAddParam()
public function testAddParam()
{
$this->object->addParam(PMA_Message::notice('test'));
$this->assertEquals(array(PMA_Message::notice('test')), $this->object->getParams());
@@ -218,7 +218,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add string method
*/
public function testAddString()
public function testAddString()
{
$this->object->addString('test', '*');
$this->assertEquals(array('*', PMA_Message::notice('test')), $this->object->getAddedMessages());
@@ -229,7 +229,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add messages method
*/
public function testAddMessages()
public function testAddMessages()
{
$this->object->addMessages(array('test', PMA_Message::rawWarning('test')), '&');
$this->assertEquals(array('&', PMA_Message::rawNotice('test'), '&', PMA_Message::rawWarning('test')), $this->object->getAddedMessages());
@@ -238,7 +238,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing add message method
*/
public function testAddMessage()
public function testAddMessage()
{
$this->object->addMessage('test', '');
$this->assertEquals(array(PMA_Message::rawNotice('test')), $this->object->getAddedMessages());
@@ -251,7 +251,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing setter of params
*/
public function testSetParams()
public function testSetParams()
{
$this->object->setParams('test&<>');
$this->assertEquals('test&<>', $this->object->getParams());
@@ -262,14 +262,14 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing sanitize method
*/
public function testSanitize()
public function testSanitize()
{
$this->object->setString('test&string<>', false);
$this->assertEquals('test&amp;string&lt;&gt;', PMA_Message::sanitize($this->object));
$this->assertEquals(array('test&amp;string&lt;&gt;', 'test&amp;string&lt;&gt;'), PMA_Message::sanitize(array($this->object, $this->object)));
}
public function decodeBBDataProvider()
public function decodeBBDataProvider()
{
return array(
array('[i]test[/i][i]aa[i/][em]test[/em]', '<em>test</em><em>aa[i/]<em>test</em>'),
@@ -284,27 +284,27 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* @dataProvider decodeBBDataProvider
*/
public function testDecodeBB($actual, $expected)
public function testDecodeBB($actual, $expected)
{
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
$this->assertEquals($expected, PMA_Message::decodeBB($actual));
}
/**
* testing format method
*/
public function testFormat()
public function testFormat()
{
$this->assertEquals('test string', PMA_Message::format('test string'));
$this->assertEquals('test string', PMA_Message::format('test string', 'a'));
$this->assertEquals('test string', PMA_Message::format('test string', array()));
$this->assertEquals('test string', PMA_Message::format('%s string', array('test')));
}
/**
* testing getHash method
*/
public function testGetHash()
public function testGetHash()
{
$this->object->setString('<&>test', false);
$this->object->setMessage('<&>test', false);
@@ -315,7 +315,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* getMessage test - with empty message and with non-empty string - not key in globals
* additional params are defined
*/
public function testGetMessageWithoutMessageWithStringWithParams()
public function testGetMessageWithoutMessageWithStringWithParams()
{
$this->object->setMessage('');
$this->object->setString('test string %s %s');
@@ -327,7 +327,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* getMessage test - with empty message and with empty string
*/
public function testGetMessageWithoutMessageWithEmptyString()
public function testGetMessageWithoutMessageWithEmptyString()
{
$this->object->setMessage('');
$this->object->setString('');
@@ -338,7 +338,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* getMessage test - with empty message and with string, which is key to GLOBALS
* additional messages are defined
*/
public function testGetMessageWithoutMessageWithGlobalStringWithAddMessages()
public function testGetMessageWithoutMessageWithGlobalStringWithAddMessages()
{
$GLOBALS['key'] = 'test message';
$this->object->setMessage('');
@@ -353,7 +353,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
* getMessage test - message is defined
* message with BBCode defined
*/
public function testGetMessageWithMessageWithBBCode()
public function testGetMessageWithMessageWithBBCode()
{
$this->object->setMessage('[kbd]test[/kbd] [a@./Documentation.html#cfg_Example@_blank]test[/a]');
$this->assertEquals('<kbd>test</kbd> <a href="./Documentation.html#cfg_Example" target="_blank">test</a>', $this->object->getMessage());
@@ -362,7 +362,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* getLevel test
*/
public function testGetLevel()
public function testGetLevel()
{
$this->assertEquals('notice', $this->object->getLevel());
$this->object->setNumber(PMA_Message::SUCCESS);
@@ -376,7 +376,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* testing display method (output string and _is_displayed varible)
*/
public function testDisplay()
public function testDisplay()
{
$this->assertFalse($this->object->isDisplayed());
$this->object->setMessage('Test Message');
@@ -390,7 +390,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* getDisplay test
*/
public function testGetDisplay()
public function testGetDisplay()
{
$this->object->setMessage('Test Message');
$this->assertEquals('<div class="notice">Test Message</div>', $this->object->getDisplay());
@@ -399,7 +399,7 @@ class PMA_Message_test extends PHPUnit_Extensions_OutputTestCase
/**
* isDisplayed test
*/
public function testIsDisplayed()
public function testIsDisplayed()
{
$this->assertFalse($this->object->isDisplayed(false));
$this->assertTrue($this->object->isDisplayed(true));

View File

@@ -595,6 +595,13 @@ form.login label {
font-weight: bolder;
}
.commented_column {
border-bottom: 1px dashed black;
}
.column_attribute {
font-size: 70%;
}
/******************************************************************************/
/* specific elements */
@@ -1288,4 +1295,4 @@ table#serverconnection_trg_local {
* Validation error message styles
*/
.invalid_value
{background:#F00;}
{background:#F00;}

View File

@@ -570,6 +570,13 @@ form.login label {
font-weight: bolder;
}
.commented_column {
border-bottom: 1px dashed black;
}
.column_attribute {
font-size: 70%;
}
/******************************************************************************/
/* specific elements */
@@ -1220,4 +1227,4 @@ table#serverconnection_trg_local {
* Validation error message styles
*/
.invalid_value
{background:#F00;}
{background:#F00;}

View File

@@ -53,11 +53,19 @@ foreach ($types['mimetype'] as $key => $mimetype) {
$odd_row = true;
foreach ($types['transformation'] as $key => $transform) {
$func = strtolower(str_ireplace('.inc.php', '', $types['transformation_file'][$key]));
$desc = 'strTransformation_' . $func;
require './libraries/transformations/' . $types['transformation_file'][$key];
$funcname = 'PMA_transformation_' . $func . '_info';
$desc = '<i>' . sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()') . '</i>';
if (function_exists($funcname)) {
$desc_arr = $funcname();
if (isset($desc_arr['info'])) {
$desc = $desc_arr['info'];
}
}
?>
<tr class="<?php echo $odd_row ? 'odd' : 'even'; ?>">
<td><?php echo $transform; ?></td>
<td><?php echo (isset($$desc) ? $$desc : '<i>' . sprintf(__('No description is available for this transformation.<br />Please ask the author what %s does.'), 'PMA_transformation_' . $func . '()') . '</i>'); ?></td>
<td><?php echo $desc; ?></td>
</tr>
<?php
$odd_row = !$odd_row;