merging changes from origin
This commit is contained in:
@@ -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
|
||||
|
@@ -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 &eacute; in
|
||||
|
@@ -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";
|
||||
|
||||
|
@@ -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"> </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>
|
||||
|
@@ -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 {
|
||||
|
@@ -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)
|
||||
|
@@ -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']
|
||||
*/
|
||||
|
@@ -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;
|
||||
|
@@ -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 { ?>
|
||||
|
@@ -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();
|
||||
|
@@ -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
@@ -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;' : '') . '"> ';
|
||||
|
@@ -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');
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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).'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -5,6 +5,12 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function PMA_transformation_image_jpeg__link_info() {
|
||||
return array(
|
||||
'info' => __('Displays a link to download this image.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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).'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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
|
||||
*
|
||||
|
@@ -5,6 +5,12 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
function PMA_transformation_text_plain__sql_info() {
|
||||
return array(
|
||||
'info' => __('Formats text as SQL query with syntax highlighting.'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@@ -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: "...").'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
6854
po/be@latin.po
6854
po/be@latin.po
File diff suppressed because it is too large
Load Diff
7205
po/en_GB.po
7205
po/en_GB.po
File diff suppressed because it is too large
Load Diff
6520
po/phpmyadmin.pot
6520
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
6870
po/pt_BR.po
6870
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
6893
po/sr@latin.po
6893
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
7061
po/uz@latin.po
7061
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
6797
po/zh_CN.po
6797
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
6796
po/zh_TW.po
6796
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
@@ -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";
|
||||
}
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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) {
|
||||
|
@@ -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
|
||||
|
@@ -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') .'" />';
|
||||
|
@@ -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&string<>', PMA_Message::sanitize($this->object));
|
||||
$this->assertEquals(array('test&string<>', 'test&string<>'), 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));
|
||||
|
@@ -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;}
|
||||
|
@@ -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;}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user