]> git.joonet.de Git - adminer.git/commitdiff
Increase readability
authorJakub Vrana <jakub@vrana.cz>
Thu, 8 Aug 2013 23:01:49 +0000 (16:01 -0700)
committerJakub Vrana <jakub@vrana.cz>
Thu, 8 Aug 2013 23:01:49 +0000 (16:01 -0700)
adminer/edit.inc.php

index 6a12a785416f1b2b8bfd102df50e10e207460c75..78f7b0b75fce6fd6cf0fe372d6c88f7df22dbe4c 100644 (file)
@@ -138,8 +138,14 @@ if (!$fields) {
                        }
                }
                $value = ($row !== null
-                       ? ($row[$name] != "" && $jush == "sql" && preg_match("~enum|set~", $field["type"]) ? (is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name]) : $row[$name])
-                       : (!$update && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : $default))
+                       ? ($row[$name] != "" && $jush == "sql" && preg_match("~enum|set~", $field["type"])
+                               ? (is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name])
+                               : $row[$name]
+                       )
+                       : (!$update && $field["auto_increment"]
+                               ? ""
+                               : (isset($_GET["select"]) ? false : $default)
+                       )
                );
                if (!$_POST["save"] && is_string($value)) {
                        $value = $adminer->editVal($value, $field);