From 0d5ea847028a724df041fc5c27f826f59a622583 Mon Sep 17 00:00:00 2001 From: Silvio Date: Mon, 19 Oct 2009 10:39:42 -0200 Subject: Fixing list of vocabularies at block config page --- jquery_drawer.module | 8 ++++++-- 1 file 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; -- cgit v1.2.3