The branch, master has been updated via 7a07c42de50c1f23bec33fc82b98179e4c452f26 (commit) via eae8396f1e10ce9fbbf5dd5755947e23130afe38 (commit) from 269599e4767d95ee0ad8f770e56fe4677e0391ce (commit)
- Log ----------------------------------------------------------------- commit 7a07c42de50c1f23bec33fc82b98179e4c452f26 Author: Michal Čihař mcihar@suse.cz Date: Thu Aug 4 13:40:49 2011 +0200
Variable include_box is not used
commit eae8396f1e10ce9fbbf5dd5755947e23130afe38 Author: Michal Čihař mcihar@suse.cz Date: Thu Aug 4 13:39:11 2011 +0200
Factor out pow function detection
-----------------------------------------------------------------------
Summary of changes: libraries/common.lib.php | 36 ++++++++++++++++++++---------------- 1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/libraries/common.lib.php b/libraries/common.lib.php index d812262..fec1c86 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -7,6 +7,25 @@ */
/** + * Detects which function to use for PMA_pow. + * + * @return string Function name. + */ +function PMA_detect_pow() +{ + if (function_exists('bcpow')) { + // BCMath Arbitrary Precision Mathematics Function + return 'bcpow'; + } elseif (function_exists('gmp_pow')) { + // GMP Function + return 'gmp_pow'; + } else { + // PHP function + return 'pow'; + } +} + +/** * Exponential expression / raise number into power * * @param string $base base to raise @@ -19,16 +38,7 @@ function PMA_pow($base, $exp, $use_function = false) static $pow_function = null;
if (null == $pow_function) { - if (function_exists('bcpow')) { - // BCMath Arbitrary Precision Mathematics Function - $pow_function = 'bcpow'; - } elseif (function_exists('gmp_pow')) { - // GMP Function - $pow_function = 'gmp_pow'; - } else { - // PHP function - $pow_function = 'pow'; - } + $pow_function = PMA_detect_pow(); }
if (! $use_function) { @@ -73,7 +83,6 @@ function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = f { $include_icon = false; $include_text = false; - $include_box = false; $alternate = htmlspecialchars($alternate); $button = '';
@@ -87,11 +96,6 @@ function PMA_getIcon($icon, $alternate = '', $container = false, $force_text = f $include_text = true; }
- if ($include_text && $include_icon && $container) { - // we have icon, text and request for container - $include_box = true; - } - // Always use a span (we rely on this in js/sql.js) $button .= '<span class="nowrap">';
hooks/post-receive