From d029cadd603352828bd8fdcf35e5bb48bf04a4bc Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 14 Sep 2014 21:46:52 -0700 Subject: [PATCH] Plugin edit-foreign: Backwards compatible default --- plugins/edit-foreign.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/edit-foreign.php b/plugins/edit-foreign.php index 82520d3ea..c859119bb 100644 --- a/plugins/edit-foreign.php +++ b/plugins/edit-foreign.php @@ -9,7 +9,7 @@ class AdminerEditForeign { var $_limit; - function AdminerEditForeign($limit = 50) { + function AdminerEditForeign($limit = 0) { $this->_limit = $limit; } @@ -27,7 +27,7 @@ function editInput($table, $field, $attrs, $value) { $options = &$values[$target][$id]; if (!$options) { $options = array("" => "") + get_vals("SELECT " . idf_escape($id) . " FROM " . table($target) . " ORDER BY 1"); - if (count($options) - 1 > $this->_limit) { + if ($this->_limit && count($options) - 1 > $this->_limit) { return; } }