aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2009-10-19 10:39:42 -0200
committerSilvio <silvio@devlet.com.br>2010-10-14 18:23:24 -0300
commit0d5ea847028a724df041fc5c27f826f59a622583 (patch)
tree22ea7b801b89edd4668d08205a5ee2cdd3b40106
parent981c8c1b8a1c1a86115285a90d161f5277fa54ca (diff)
downloadjquery_drawer-0d5ea847028a724df041fc5c27f826f59a622583.tar.gz
jquery_drawer-0d5ea847028a724df041fc5c27f826f59a622583.tar.bz2
Fixing list of vocabularies at block config page
-rw-r--r--jquery_drawer.module8
1 files changed, 6 insertions, 2 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module
index 6def927..4a49162 100644
--- a/jquery_drawer.module
+++ b/jquery_drawer.module
@@ -35,12 +35,16 @@ function jquery_drawer_block($op = 'list', $delta = 0, $edit = array()) {
return $blocks;
case 'configure':
+ $query = 'SELECT vid, name from {vocabulary}';
+ $result = db_query(db_rewrite_sql($query));
+ while ($vocabulary = db_fetch_object($result)) {
+ $vocabularies[$vocabulary->vid] = $vocabulary->name;
+ }
$form['jquery_drawer'] = array(
'#type' => 'select',
'#title' => t('Select the vocabulary to list'),
'#default_value' => variable_get('jquery_drawer', '1'),
- // TODO: won't work with taxonomy_get_vocabularies()
- '#options' => menu_parent_options(taxonomy_get_vocabularies(), 0),
+ '#options' => $vocabularies,
);
return $form;