diff --git a/design.inc.php b/design.inc.php index 433d36a5..7518b175 100644 --- a/design.inc.php +++ b/design.inc.php @@ -35,7 +35,7 @@ function toggle(id) { } foreach ($breadcrumb as $key => $val) { if (strlen($val)) { - echo '' . htmlspecialchars($val) . ' » '; + echo '' . htmlspecialchars($val) . ' » '; } } } diff --git a/edit.inc.php b/edit.inc.php index 053cb64c..564b88a7 100644 --- a/edit.inc.php +++ b/edit.inc.php @@ -1,8 +1,9 @@ $field) { - if (isset($_GET["default"]) ? $field["auto_increment"] || preg_match('~text|blob~', $field["type"]) : !isset($field["privileges"][$where && !$_GET["clone"] ? "update" : "insert"])) { + if (isset($_GET["default"]) ? $field["auto_increment"] || preg_match('~text|blob~', $field["type"]) : !isset($field["privileges"][$update ? "update" : "insert"])) { unset($fields[$name]); } } @@ -29,7 +30,7 @@ if ($_POST && !$error) { } if (isset($_GET["default"])) { query_redirect("ALTER TABLE " . idf_escape($_GET["edit"]) . implode(",", $set), $location, lang('Default values has been set.')); - } elseif ($where && !$_GET["clone"]) { + } elseif ($update) { query_redirect("UPDATE " . idf_escape($_GET["edit"]) . " SET " . implode(", ", $set) . " WHERE " . implode(" AND ", $where) . " LIMIT 1", $location, lang('Item has been updated.')); } else { query_redirect("INSERT INTO " . idf_escape($_GET["edit"]) . " SET " . implode(", ", $set), $location, lang('Item has been inserted.')); @@ -94,8 +95,8 @@ if ($fields) { -" /> + - +
diff --git a/index.php b/index.php index fe6f5bfe..87fd6edb 100644 --- a/index.php +++ b/index.php @@ -159,9 +159,8 @@ if (isset($_GET["download"])) { while ($row = $result->fetch_assoc()) { echo '