From 38059b61e41e16191aceba72d32b6425ab62a69b Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Tue, 30 Jun 2009 16:30:28 +0000 Subject: [PATCH] Remove empty if git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@770 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/select.inc.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 90278fec..d1c90cf8 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -101,20 +101,20 @@ if ($_POST && !$error) { } $command .= ($_POST["clone"] ? "\nSELECT " . implode(", ", $set) . " FROM " . idf_escape($_GET["select"]) : " SET" . implode(",", $set)); } - if (!$_POST["delete"] && !$set) { - // nothing - } elseif ($_POST["all"]) { - $result = queries($command . ($where ? "\nWHERE " . implode(" AND ", $where) : "")); - $affected = $dbh->affected_rows; - } else { - foreach ((array) $_POST["check"] as $val) { - parse_str($val, $check); - // where may not be unique so OR can't be used - $result = queries($command . "\nWHERE " . implode(" AND ", where($check)) . " LIMIT 1"); - if (!$result) { - break; + if ($_POST["delete"] || $set) { + if ($_POST["all"]) { + $result = queries($command . ($where ? "\nWHERE " . implode(" AND ", $where) : "")); + $affected = $dbh->affected_rows; + } else { + foreach ((array) $_POST["check"] as $val) { + parse_str($val, $check); + // where may not be unique so OR can't be used + $result = queries($command . "\nWHERE " . implode(" AND ", where($check)) . " LIMIT 1"); + if (!$result) { + break; + } + $affected += $dbh->affected_rows; } - $affected += $dbh->affected_rows; } } query_redirect(queries(), remove_from_uri("page"), lang('%d item(s) have been affected.', $affected), $result, false, !$result);