mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Function process_length used only in Adminer
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@916 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -82,7 +82,6 @@ include "./include/editing.inc.php";
|
|||||||
include "./include/export.inc.php";
|
include "./include/export.inc.php";
|
||||||
|
|
||||||
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
||||||
$enum_length = '\'(?:\'\'|[^\'\\\\]+|\\\\.)*\'|"(?:""|[^"\\\\]+|\\\\.)*"';
|
|
||||||
$token = $_SESSION["tokens"][$_GET["server"]];
|
$token = $_SESSION["tokens"][$_GET["server"]];
|
||||||
$error = ($_POST
|
$error = ($_POST
|
||||||
? ($_POST["token"] == $token ? "" : lang('Invalid CSRF token. Send the form again.'))
|
? ($_POST["token"] == $token ? "" : lang('Invalid CSRF token. Send the form again.'))
|
||||||
|
@@ -29,6 +29,11 @@ echo ($unsigned ? " <select name=\"$key" . '[unsigned]"' . (!$field["type"] || e
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function process_length($length) {
|
||||||
|
global $enum_length;
|
||||||
|
return (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches) ? implode(",", $matches[0]) : preg_replace('~[^0-9,+-]~', '', $length));
|
||||||
|
}
|
||||||
|
|
||||||
function process_type($field, $collate = "COLLATE") {
|
function process_type($field, $collate = "COLLATE") {
|
||||||
global $dbh, $enum_length, $unsigned;
|
global $dbh, $enum_length, $unsigned;
|
||||||
return " $field[type]"
|
return " $field[type]"
|
||||||
|
@@ -97,11 +97,6 @@ function where_link($i, $column, $value) {
|
|||||||
return "&where%5B$i%5D%5Bcol%5D=" . urlencode($column) . "&where%5B$i%5D%5Bop%5D=%3D&where%5B$i%5D%5Bval%5D=" . urlencode($value);
|
return "&where%5B$i%5D%5Bcol%5D=" . urlencode($column) . "&where%5B$i%5D%5Bop%5D=%3D&where%5B$i%5D%5Bval%5D=" . urlencode($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_length($length) {
|
|
||||||
global $enum_length;
|
|
||||||
return (preg_match("~^\\s*(?:$enum_length)(?:\\s*,\\s*(?:$enum_length))*\\s*\$~", $length) && preg_match_all("~$enum_length~", $length, $matches) ? implode(",", $matches[0]) : preg_replace('~[^0-9,+-]~', '', $length));
|
|
||||||
}
|
|
||||||
|
|
||||||
function redirect($location, $message = null) {
|
function redirect($location, $message = null) {
|
||||||
if (isset($message)) {
|
if (isset($message)) {
|
||||||
$_SESSION["messages"][] = $message;
|
$_SESSION["messages"][] = $message;
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
include "./include/bootstrap.inc.php";
|
include "./include/bootstrap.inc.php";
|
||||||
|
|
||||||
|
$enum_length = '\'(?:\'\'|[^\'\\\\]+|\\\\.)*\'|"(?:""|[^"\\\\]+|\\\\.)*"';
|
||||||
$inout = array("IN", "OUT", "INOUT");
|
$inout = array("IN", "OUT", "INOUT");
|
||||||
|
|
||||||
if (isset($_GET["download"])) {
|
if (isset($_GET["download"])) {
|
||||||
|
Reference in New Issue
Block a user