summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorMike Cochrane <mikec@mikenz.geek.nz>2008-07-20 06:00:24 -0400
committerMike Cochrane <mikec@mikenz.geek.nz>2008-07-20 06:00:24 -0400
commitbd0b6970ae9f4261986ea23e054aa0ba801aef16 (patch)
tree2d645cc6c59988e7a05481d7b1eed238e0753dce /lib/util.php
parent02325570a6590ff1651f83fbcdf2c3e770fceb20 (diff)
Fix undefined variable error
darcs-hash:20080720100024-533db-d2b5b63f169b6e16e08e81c8da63b7f9f69e7521.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/util.php b/lib/util.php
index ec39cefad..9ebb487a1 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -370,20 +370,20 @@ function common_checkbox($id, $label, $checked=false, $instructions=NULL, $value
}
function common_dropdown($id, $label, $content, $instructions=NULL, $blank_select=FALSE, $selected=NULL) {
- common_element_start('p');
- common_element('label', array('for' => $id), $label);
- common_element_start('select', array('id' => $id, 'name' => $id));
- if ($blank_select) {
- common_element('option', array('value' => $value));
- }
- foreach ($content as $value => $option) {
- if ($value == $selected) {
- common_element('option', array('value' => $value, 'selected' => $value), $option);
- } else {
- common_element('option', array('value' => $value), $option);
- }
- }
- common_element_end('select');
+ common_element_start('p');
+ common_element('label', array('for' => $id), $label);
+ common_element_start('select', array('id' => $id, 'name' => $id));
+ if ($blank_select) {
+ common_element('option', array('value' => ''));
+ }
+ foreach ($content as $value => $option) {
+ if ($value == $selected) {
+ common_element('option', array('value' => $value, 'selected' => $value), $option);
+ } else {
+ common_element('option', array('value' => $value), $option);
+ }
+ }
+ common_element_end('select');
if ($instructions) {
common_element('span', 'input_instructions', $instructions);
}