summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2002-08-16 07:21:01 +0000
committerDries Buytaert <dries@buytaert.net>2002-08-16 07:21:01 +0000
commit333e47aced84cd1acf5cd4f4e05203883338699f (patch)
tree480fd7b872d2e00ed1dd2ecc6c57ba47648c9b4b /modules/taxonomy/taxonomy.module
parent2c77a38848d313a0e19fec4d60b2aa9f027e3de1 (diff)
downloadbrdo-333e47aced84cd1acf5cd4f4e05203883338699f.tar.gz
brdo-333e47aced84cd1acf5cd4f4e05203883338699f.tar.bz2
- Made sure the selection boxes don't grow too long. Requisted by kika,
patch by Marco.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index b74480624..43bdb1c73 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -513,8 +513,7 @@ function _taxonomy_term_select($title, $name, $value, $vocabulary_id, $descripti
$select .= "<option value=\"$key\"". (is_array($value) ? (in_array($key, $value) ? " selected=\"selected\"" : "") : ($key == $value ? " selected=\"selected\"" : "")) .">". check_form($choice) ."</option>";
}
- // min 8, possibly options/3 (set max too?)
- $size = max(8, round(count($options)) / 3);
+ $size = min(12, count($options));
return form_item($title, "<select name=\"edit[$name][]\"". ($multiple ? " multiple size=\"$size\"" : "") . ($extra ? " $extra" : "") .">$select</select>", $description);
}