Plugin edit-foreign: Backwards compatible default
This commit is contained in:
parent
45bc098262
commit
d029cadd60
|
@ -9,7 +9,7 @@
|
|||
class AdminerEditForeign {
|
||||
var $_limit;
|
||||
|
||||
function AdminerEditForeign($limit = 50) {
|
||||
function AdminerEditForeign($limit = 0) {
|
||||
$this->_limit = $limit;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ class AdminerEditForeign {
|
|||
$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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue