diff options
author | Silvio <silvio@socioambiental.org> | 2009-10-19 10:39:42 -0200 |
---|---|---|
committer | Silvio <silvio@devlet.com.br> | 2010-10-14 18:23:24 -0300 |
commit | 0d5ea847028a724df041fc5c27f826f59a622583 (patch) | |
tree | 22ea7b801b89edd4668d08205a5ee2cdd3b40106 | |
parent | 981c8c1b8a1c1a86115285a90d161f5277fa54ca (diff) | |
download | jquery_drawer-0d5ea847028a724df041fc5c27f826f59a622583.tar.gz jquery_drawer-0d5ea847028a724df041fc5c27f826f59a622583.tar.bz2 |
Fixing list of vocabularies at block config page
-rw-r--r-- | jquery_drawer.module | 8 |
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; |