aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-03-06 18:36:53 -0300
committerSilvio <silvio@socioambiental.org>2012-03-06 18:36:53 -0300
commit323606796df018cafbf59da0b53f1366ff891b36 (patch)
tree88e26f430cb2de44bd5f5a4c2f558dd59344a790
parent40d0f03ae5f34307a1b36247e956fcc4c1cb0c6b (diff)
downloadjquery_drawer-323606796df018cafbf59da0b53f1366ff891b36.tar.gz
jquery_drawer-323606796df018cafbf59da0b53f1366ff891b36.tar.bz2
Should also work when i18n is disabled
-rw-r--r--jquery_drawer.module12
1 files changed, 10 insertions, 2 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module
index b941925..0deac8f 100644
--- a/jquery_drawer.module
+++ b/jquery_drawer.module
@@ -123,7 +123,9 @@ function theme_jquery_drawer($menu) {
$output = '<ul id="drw_tabs">';
$output .= implode((array) module_invoke_all('jquery_drawer'));
- $menu = i18ntaxonomy_localize_terms($menu);
+ if (module_exists('i18n')) {
+ $menu = i18ntaxonomy_localize_terms($menu);
+ }
foreach ($menu as $item) {
$link['title'] = $item->name;
@@ -163,7 +165,13 @@ function jquery_drawer_page($tid = NULL) {
// Check for child terms
$vid = variable_get('jquery_drawer', '1');
- $terms = i18ntaxonomy_localize_terms(taxonomy_node_tree_taxonomy_get_tree($vid, $tid));
+ $terms = taxonomy_node_tree_taxonomy_get_tree($vid, $tid);
+
+ if (module_exists('i18n')) {
+ $terms = i18ntaxonomy_localize_terms($terms);
+ }
+
+
foreach ($terms as $term) {
$filter[] = $term->tid;