diff options
author | Silvio <silvio@socioambiental.org> | 2016-06-13 18:17:46 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2016-06-13 18:17:46 -0300 |
commit | c19718e809f66dc1148f93d87ad2f0b33c37cf3b (patch) | |
tree | 9bcc72e20fde47c404ca8848d1b3f5c1a191f0da | |
parent | 4ac4b9abc82abeadd65130323e523fe03c31d42d (diff) | |
download | jquery_drawer-c19718e809f66dc1148f93d87ad2f0b33c37cf3b.tar.gz jquery_drawer-c19718e809f66dc1148f93d87ad2f0b33c37cf3b.tar.bz2 |
-rw-r--r-- | jquery_drawer.module | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module index c0481e0..289168a 100644 --- a/jquery_drawer.module +++ b/jquery_drawer.module @@ -207,9 +207,12 @@ function jquery_drawer_get_children($tid = NULL) { if (isset($filter) && !empty($filter)) { // Then render all nodes whose terms are children of $term - $query = 'SELECT DISTINCT n.nid, n.title, term_node.tid FROM {node} n LEFT JOIN - {term_node} ON term_node.nid = n.nid WHERE term_node.tid IN (%s) - AND n.status = "1" ORDER BY term_node.weight_in_tid ASC'; + $query = 'SELECT DISTINCT n.nid, n.title, term_node.tid, term_node.weight_in_tid + FROM {node} n + LEFT JOIN {term_node} ON term_node.nid = n.nid + WHERE term_node.tid IN (%s) + AND n.status = "1" + ORDER BY term_node.weight_in_tid ASC'; //$query = db_rewrite_sql($query); $nodes = db_query(db_rewrite_sql($query), implode(',', $filter)); |