The branch, master has been updated via e35debd7b5ef79f2c219194e51c8724171326b37 (commit) via 3f2ffbe297210136099faf15039041ee2c921cbe (commit) via 1fae25710df561d0fed52b96cd5885fe4e05d63f (commit) via b9e17020b889bfe5e10de3e8ab8b5ab23ea81126 (commit) via dae7d3bd4a2f1c36f5a928fad015c5d099aeec9f (commit) via 21afd1786006ebd1045123446a4a87c592359dcb (commit) via 0fc55bb503fdb18dc701bc9a6a84374aad1ecc0d (commit) from f16efa15ddfa22852a9195d40c3cc39d8b26cd4f (commit)
- Log ----------------------------------------------------------------- commit e35debd7b5ef79f2c219194e51c8724171326b37 Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:50:43 2011 +0200
Proper placement of l10n comments
commit 3f2ffbe297210136099faf15039041ee2c921cbe Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:48:23 2011 +0200
Avoid defining link several times
commit 1fae25710df561d0fed52b96cd5885fe4e05d63f Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:46:37 2011 +0200
Wrap long line
commit b9e17020b889bfe5e10de3e8ab8b5ab23ea81126 Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:46:18 2011 +0200
Whitespace cleanup
commit dae7d3bd4a2f1c36f5a928fad015c5d099aeec9f Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:46:05 2011 +0200
Improve code readability
commit 21afd1786006ebd1045123446a4a87c592359dcb Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:45:47 2011 +0200
Wrap long line
commit 0fc55bb503fdb18dc701bc9a6a84374aad1ecc0d Author: Michal Čihař mcihar@suse.cz Date: Mon Aug 8 15:43:34 2011 +0200
Remove debugging code
-----------------------------------------------------------------------
Summary of changes: js/common.js | 2 - libraries/common.lib.php | 52 +++++++++++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 16 deletions(-)
diff --git a/js/common.js b/js/common.js index 9b5dcf6..47fd3bf 100644 --- a/js/common.js +++ b/js/common.js @@ -180,7 +180,6 @@ function markDbTable(db, table) */ function setAll( new_lang, new_collation_connection, new_server, new_db, new_table, new_token ) { - //alert('setAll( ' + new_lang + ', ' + new_collation_connection + ', ' + new_server + ', ' + new_db + ', ' + new_table + ', ' + new_token + ' )'); if (new_server != server || new_lang != lang || new_collation_connection != collation_connection) { // something important has changed @@ -240,7 +239,6 @@ function focus_querywindow(sql_query) if ( !querywindow || querywindow.closed || !querywindow.location) { // we need first to open the window and cannot pass the query with it // as we dont know if the query exceeds max url length - /* url = 'querywindow.php?' + common_query + '&db=' + db + '&table=' + table + '&sql_query=SELECT * FROM'; */ query_to_load = sql_query; open_querywindow(); insertQuery(0); diff --git a/libraries/common.lib.php b/libraries/common.lib.php index c3a9d69..2f61cec 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -253,7 +253,10 @@ function PMA_unQuote($quoted_string, $quote = null) && substr($quoted_string, -1, 1) === $quote) { $unquoted_string = substr($quoted_string, 1, -1); // replace escaped quotes - $unquoted_string = str_replace($quote . $quote, $quote, $unquoted_string); + $unquoted_string = str_replace( + $quote . $quote, + $quote, + $unquoted_string); return $unquoted_string; } } @@ -290,9 +293,13 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '') if (! is_array($parsed_sql)) { // We don't so just return the input directly // This is intended to be used for when the SQL Parser is turned off - $formatted_sql = '<pre>' . "\n" - . (($cfg['SQP']['fmtType'] == 'none' && $unparsed_sql != '') ? $unparsed_sql : $parsed_sql) . "\n" - . '</pre>'; + $formatted_sql = '<pre>' . "\n"; + if ($cfg['SQP']['fmtType'] == 'none' && $unparsed_sql != '') { + $formatted_sql .= $unparsed_sql; + } else { + $formatted_sql .= $parsed_sql; + } + $formatted_sql .= '</pre>'; return $formatted_sql; }
@@ -301,7 +308,9 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '') switch ($cfg['SQP']['fmtType']) { case 'none': if ($unparsed_sql != '') { - $formatted_sql = '<span class="inner_sql"><pre>' . "\n" . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n" . '</pre></span>'; + $formatted_sql = '<span class="inner_sql"><pre>' . "\n" + . PMA_SQP_formatNone(array('raw' => $unparsed_sql)) . "\n" + . '</pre></span>'; } else { $formatted_sql = PMA_SQP_formatNone($parsed_sql); } @@ -399,14 +408,15 @@ function PMA_showMySQLDocu($chapter, $link, $big_icon = false, $anchor = '', $ju break; }
+ $open_link = '<a href="' . PMA_linkURL($url) . '" target="mysql_doc">'; if ($just_open) { - return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc">'; + return $open_link; } elseif ($big_icon) { - return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc"><img class="icon ic_b_sqlhelp" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>'; + return $open_link . '<img class="icon ic_b_sqlhelp" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>'; } elseif ($GLOBALS['cfg']['ReplaceHelpImg']) { - return '<a href="' . PMA_linkURL($url) . '" target="mysql_doc"><img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>'; + return $open_link . '<img class="icon ic_b_help_s" src="themes/dot.gif" alt="' . __('Documentation') . '" title="' . __('Documentation') . '" /></a>'; } else { - return '[<a href="' . PMA_linkURL($url) . '" target="mysql_doc">' . __('Documentation') . '</a>]'; + return '[' . $open_link . __('Documentation') . '</a>]'; } } // end of the 'PMA_showMySQLDocu()' function
@@ -1287,8 +1297,22 @@ function PMA_profilingCheckbox($sql_query) */ function PMA_formatByteDown($value, $limes = 6, $comma = 0) { - /* l10n: shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa+ */ - $byteUnits = array(__('B'), __('KiB'), __('MiB'), __('GiB'), __('TiB'), __('PiB'), __('EiB')); + $byteUnits = array( + /* l10n: shortcuts for Byte */ + __('B'), + /* l10n: shortcuts for Kilobyte */ + __('KiB'), + /* l10n: shortcuts for Megabyte */ + __('MiB'), + /* l10n: shortcuts for Gigabyte */ + __('GiB'), + /* l10n: shortcuts for Terabyte */ + __('TiB'), + /* l10n: shortcuts for Petabyte */ + __('PiB'), + /* l10n: shortcuts for Exabyte */ + __('EiB') + );
$dh = PMA_pow(10, $comma); $li = PMA_pow(10, $limes); @@ -1702,7 +1726,7 @@ function PMA_linkOrButton($url, $message, $tag_params = array(), if (stristr($message, '<img') && (!$strip_img || $GLOBALS['cfg']['PropertiesIconic'] === true) && strip_tags($message)==$message) { $displayed_message = '<span>' . htmlspecialchars(preg_replace('/^.*\salt="([^"]*)".*$/si', '\1', $message)) . '</span>'; } - + // Suhosin: Check that each query parameter is not above maximum $in_suhosin_limits = true; if ($url_length <= $GLOBALS['cfg']['LinkLengthLimit']) { @@ -1732,12 +1756,12 @@ function PMA_linkOrButton($url, $message, $tag_params = array(), if (empty($tag_params['class'])) { $tag_params['class'] = 'link'; } - + if (! isset($query_parts)) { $query_parts = PMA_splitURLQuery($url); } $url_parts = parse_url($url); - + if ($new_form) { $ret = '<form action="' . $url_parts['path'] . '" class="link"' . ' method="post"' . $target . ' style="display: inline;">';
hooks/post-receive