Skip to content

Commit

Permalink
Plugin edit-foreign: Backwards compatible default
Browse files Browse the repository at this point in the history
  • Loading branch information
vrana committed Sep 15, 2014
1 parent 45bc098 commit d029cad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/edit-foreign.php
Expand Up @@ -9,7 +9,7 @@
class AdminerEditForeign {
var $_limit;

function AdminerEditForeign($limit = 50) {
function AdminerEditForeign($limit = 0) {
$this->_limit = $limit;
}

Expand All @@ -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;
}
}
Expand Down

0 comments on commit d029cad

Please sign in to comment.