Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use $row instead of $data

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@194 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
commit f2cfe8c68dcb9bcef9915c41493c1ab694ceedd9 1 parent 51e0b64
jakubvrana authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 edit.inc.php
18 edit.inc.php
View
@@ -39,9 +39,9 @@
if ($_POST) {
echo "<p class='error'>" . lang('Error during saving') . ": " . htmlspecialchars($error) . "</p>\n";
- $data = (array) $_POST["fields"];
+ $row = (array) $_POST["fields"];
foreach ((array) $_POST["null"] as $key => $val) {
- $data[$key] = null;
+ $row[$key] = null;
}
} elseif ($where) {
$select = array();
@@ -52,12 +52,12 @@
}
if ($select) {
$result = $mysql->query("SELECT " . implode(", ", $select) . " FROM " . idf_escape($_GET["edit"]) . " WHERE " . implode(" AND ", $where) . " LIMIT 1");
- $data = $result->fetch_assoc();
+ $row = $result->fetch_assoc();
} else {
- $data = array();
+ $row = array();
}
} else {
- unset($data);
+ unset($row);
}
?>
@@ -67,12 +67,12 @@
echo "<table border='0' cellspacing='0' cellpadding='2'>\n";
foreach ($fields as $name => $field) {
echo "<tr><th>" . htmlspecialchars($name) . "</th><td>";
- if (!isset($data)) {
+ if (!isset($row)) {
$value = $field["default"];
- } elseif (strlen($data[$name]) && ($field["type"] == "enum" || $field["type"] == "set")) {
- $value = intval($data[$name]);
+ } elseif (strlen($row[$name]) && ($field["type"] == "enum" || $field["type"] == "set")) {
+ $value = intval($row[$name]);
} else {
- $value = $data[$name];
+ $value = $row[$name];
}
input($name, $field, $value);
echo "</td></tr>\n";
Please sign in to comment.
Something went wrong with that request. Please try again.