The branch, master has been updated
via f1c526f17a7e0307fa9bcc52d40c643cb0dafff8 (commit)
via b2173a8e4e2197cffce1086927a4dd149842f6e3 (commit)
from c8c68cc5882e498fe9cbd5e6954b5a5a2f55bb4f (commit)
- Log -----------------------------------------------------------------
commit f1c526f17a7e0307fa9bcc52d40c643cb0dafff8
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Thu Jul 21 13:01:32 2011 +0200
Whitespace cleanup
commit b2173a8e4e2197cffce1086927a4dd149842f6e3
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Thu Jul 21 13:01:23 2011 +0200
Localize error message
-----------------------------------------------------------------------
Summary of changes:
libraries/common.lib.php | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index f0451b6..9e27e6c 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1339,7 +1339,7 @@ function PMA_localizeNumber($value)
* @param integer $digits_left number of digits left of the comma
* @param integer $digits_right number of digits right of the comma
* @param boolean $only_down do not reformat numbers below 1
- * @param boolean $noTrailingZero removes trailing zeros right of the comma (default: true)
+ * @param boolean $noTrailingZero removes trailing zeros right of the comma (default: true)
*
* @return string the formatted value and its unit
*
@@ -1348,13 +1348,13 @@ function PMA_localizeNumber($value)
function PMA_formatNumber($value, $digits_left = 3, $digits_right = 0, $only_down = false, $noTrailingZero = true)
{
if($value==0) return '0';
-
+
$originalValue = $value;
//number_format is not multibyte safe, str_replace is safe
if ($digits_left === 0) {
$value = number_format($value, $digits_right);
if($originalValue!=0 && floatval($value) == 0) $value = ' <'.(1/PMA_pow(10,$digits_right));
-
+
return PMA_localizeNumber($value);
}
@@ -1388,7 +1388,7 @@ function PMA_formatNumber($value, $digits_left = 3, $digits_right = 0, $only_dow
}
$dh = PMA_pow(10, $digits_right);
-
+
// This gives us the right SI prefix already, but $digits_left parameter not incorporated
$d = floor(log10($value) / 3);
// Lowering the SI prefix by 1 gives us an additional 3 zeros
@@ -1397,18 +1397,18 @@ function PMA_formatNumber($value, $digits_left = 3, $digits_right = 0, $only_dow
if($digits_left > $cur_digits) {
$d-= floor(($digits_left - $cur_digits)/3);
}
-
+
if($d<0 && $only_down) $d=0;
-
+
$value = round($value / (PMA_pow(1000, $d, 'pow') / $dh)) /$dh;
$unit = $units[$d];
-
+
// If we dont want any zeros after the comma just add the thousand seperator
if($noTrailingZero)
$value = PMA_localizeNumber(preg_replace("/(?<=\d)(?=(\d{3})+(?!\d))/",",",$value));
else
$value = PMA_localizeNumber(number_format($value, $digits_right)); //number_format is not multibyte safe, str_replace is safe
-
+
if($originalValue!=0 && floatval($value) == 0) return ' <'.(1/PMA_pow(10,$digits_right)).' '.$unit;
return $sign . $value . ' ' . $unit;
@@ -1843,7 +1843,6 @@ function PMA_flipstring($string, $Separator = "<br />\n")
* Not sure we could use a strMissingParameter message here,
* would have to check if the error message file is always available
*
- * @todo localize error message
* @todo use PMA_fatalError() if $die === true?
* @param array $params The names of the parameters needed by the calling script.
* @param bool $die Stop the execution?
@@ -1874,7 +1873,8 @@ function PMA_checkParameters($params, $die = true, $request = true)
if (! isset($GLOBALS[$param])) {
$error_message .= $reported_script_name
- . ': Missing parameter: ' . $param
+ . ': ' . __('Missing parameter:') . ' '
+ . $param
. PMA_showDocu('faqmissingparameters')
. '<br />';
$found_error = true;
hooks/post-receive
--
phpMyAdmin