mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 04:11:27 +02:00
Big numbers without E
This commit is contained in:
@@ -453,7 +453,7 @@ document.getElementById('username').focus();
|
||||
} elseif (ereg('^([+-]|\\|\\|)$', $function)) {
|
||||
$return = idf_escape($name) . " $function $return";
|
||||
} elseif (ereg('^[+-] interval$', $function)) {
|
||||
$return = idf_escape($name) . " $function " . (preg_match("~^([0-9]+|'[0-9.: -]') [A-Z_]+$~i", $value) ? $value : $return);
|
||||
$return = idf_escape($name) . " $function " . (preg_match("~^(\\d+|'[0-9.: -]') [A-Z_]+$~i", $value) ? $value : $return);
|
||||
} elseif (ereg('^(addtime|subtime|concat)$', $function)) {
|
||||
$return = "$function(" . idf_escape($name) . ", $return)";
|
||||
} elseif (ereg('^(md5|sha1|password|encrypt|hex)$', $function)) {
|
||||
|
@@ -39,11 +39,12 @@ if (!defined("SID")) {
|
||||
|
||||
// disable magic quotes to be able to use database escaping function
|
||||
remove_slashes(array(&$_GET, &$_POST, &$_COOKIE));
|
||||
if (function_exists("set_magic_quotes_runtime")) {
|
||||
if (function_exists("set_magic_quotes_runtime")) { // removed in PHP 6
|
||||
set_magic_quotes_runtime(false);
|
||||
}
|
||||
@set_time_limit(0); // @ - can be disabled
|
||||
@ini_set("zend.ze1_compatibility_mode", false); // @ - deprecated
|
||||
@ini_set("precision", 20); // @ - can be disabled
|
||||
|
||||
include "../adminer/include/lang.inc.php";
|
||||
include "../adminer/lang/$LANG.inc.php";
|
||||
|
@@ -618,7 +618,7 @@ function input($field, $value, $function) {
|
||||
echo "<textarea " . ($jush != "sqlite" || ereg("\n", $value) ? "cols='50' rows='12'" : "cols='30' rows='1' style='height: 1.2em;'") . "$attrs onkeydown='return textareaKeydown(this, event);'>" . h($value) . '</textarea>'; // 1.2em - line-height
|
||||
} else {
|
||||
// int(3) is only a display hint
|
||||
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^([0-9]+)(,([0-9]+))?$~', $field["length"], $match) ? ((ereg("binary", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
||||
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((ereg("binary", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
|
||||
echo "<input value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . (ereg('char|binary', $field["type"]) && $maxlength > 20 ? " size='40'" : "") . "$attrs>";
|
||||
}
|
||||
}
|
||||
@@ -760,7 +760,7 @@ function is_mail($email) {
|
||||
*/
|
||||
function is_url($string) {
|
||||
$domain = '[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])'; // one domain component //! IDN
|
||||
return (preg_match("~^(https?)://($domain?\\.)+$domain(:[0-9]+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string, $match) ? strtolower($match[1]) : ""); //! restrict path, query and fragment characters
|
||||
return (preg_match("~^(https?)://($domain?\\.)+$domain(:\\d+)?(/.*)?(\\?.*)?(#.*)?\$~i", $string, $match) ? strtolower($match[1]) : ""); //! restrict path, query and fragment characters
|
||||
}
|
||||
|
||||
/** Print header for hidden fieldset (close by </div></fieldset>)
|
||||
|
Reference in New Issue
Block a user