1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 01:24:17 +02:00

Driver specific BEGIN

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1490 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2010-04-23 23:49:21 +00:00
parent 4681cc56b0
commit d0c72eca93
5 changed files with 21 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ if ($_POST && !$error) {
$cols = array_keys($fields);
preg_match_all('~(?>"[^"]*"|[^"\\r\\n]+)+~', $file, $matches);
$affected = count($matches[0]);
queries("START TRANSACTION");
begin();
$separator = ($_POST["separator"] == "csv" ? "," : ";");
foreach ($matches[0] as $key => $val) {
preg_match_all("~((\"[^\"]*\")+|[^$separator]*)$separator~", $val . $separator, $matches2);
@@ -313,7 +313,7 @@ if (!$columns) {
$id = h("val[$unique_idf][" . bracket_escape($key) . "]");
$value = $_POST["val"][$unique_idf][bracket_escape($key)];
$h_value = h(isset($value) ? $value : $row[$key]);
$editable = is_utf8($val) && !strpos($val, "<em>...</em>");
$editable = is_utf8($val) && !strpos($val, "<em>...</em>"); //! function results, not unique key
$text = ereg('text|blob', $field["type"]);
echo (($_GET["modify"] && $editable) || isset($value)
? "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>")