From: jakubvrana Date: Mon, 16 Jul 2007 11:55:19 +0000 (+0000) Subject: Join two ifs X-Git-Tag: v3.0.0~1324 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=f3f7345829157f085c598183fbd30f51e768c841;p=adminer.git Join two ifs git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@184 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/foreign.inc.php b/foreign.inc.php index 15974504..f5e30dd4 100644 --- a/foreign.inc.php +++ b/foreign.inc.php @@ -1,9 +1,7 @@ query("ALTER TABLE " . idf_escape($_GET["foreign"]) . " DROP FOREIGN KEY " . idf_escape($_GET["name"])) && $_POST["drop"]) { - redirect($SELF . "table=" . urlencode($_GET["foreign"]), lang('Foreign key has been dropped.')); - } + if (strlen($_GET["name"]) && $mysql->query("ALTER TABLE " . idf_escape($_GET["foreign"]) . " DROP FOREIGN KEY " . idf_escape($_GET["name"])) && $_POST["drop"]) { + redirect($SELF . "table=" . urlencode($_GET["foreign"]), lang('Foreign key has been dropped.')); } if (!$_POST["drop"]) { $source = array_filter($_POST["source"], 'strlen');