]> git.joonet.de Git - adminer.git/commitdiff
Fix big tables check
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 3 May 2010 16:08:46 +0000 (16:08 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 3 May 2010 16:08:46 +0000 (16:08 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1512 7c3ca157-0c34-0410-bff1-cbf682f78f5c

editor/include/adminer.inc.php

index d68971df3c49b5c945469e56cbe81db65bda53d4..accf18797fdda367b6137d1b913fafd93c05cf1e 100644 (file)
@@ -479,7 +479,6 @@ ORDER BY ORDINAL_POSITION");
        
        function _foreignKeyOptions($table, $column) {
                global $connection;
-               $table_status = table_status($table);
                $foreignKeys = column_foreign_keys($table);
                foreach ((array) $foreignKeys[$column] as $foreignKey) {
                        if (count($foreignKey["source"]) == 1) {
@@ -488,6 +487,7 @@ ORDER BY ORDINAL_POSITION");
                                if ($name != "") {
                                        $return = &$this->_values[$foreignKey["table"]];
                                        if (!isset($return)) {
+                                               $table_status = table_status($foreignKey["table"]);
                                                $return = ($table_status["Rows"] > 1000 ? array() : array("" => "") + get_key_vals("SELECT $id, $name FROM " . idf_escape($foreignKey["table"]) . " ORDER BY 2"));
                                        }
                                        return $return;