diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-03-21 20:58:56 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-03-21 20:58:56 +0000 |
commit | 77a5d783f207e586fa62df6cdff6cbfc18f30aeb (patch) | |
tree | 8143c841deb9905c2e356537912f88715036ce12 /modules | |
parent | 8e1dd1d625de02f87b15e06bd6e5d605b2386037 (diff) | |
download | brdo-77a5d783f207e586fa62df6cdff6cbfc18f30aeb.tar.gz brdo-77a5d783f207e586fa62df6cdff6cbfc18f30aeb.tar.bz2 |
- Patch #19193 by CodeMonkeyX: made taxonomy_select_nodes() return node titles.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 4 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index ef6b8b9e7..17de7a520 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -837,7 +837,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p if ($operator == 'or') { $str_tids = implode(',', call_user_func_array('array_merge', $descendant_tids)); - $sql = 'SELECT n.nid, n.sticky, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'; + $sql = 'SELECT n.nid, n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'; $sql_count = 'SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1'; } else { @@ -847,7 +847,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p $joins .= ' INNER JOIN {term_node} tn'. $index .' ON n.nid = tn'. $index .'.nid'; $wheres .= ' AND tn'. $index .'.tid IN ('. implode(',', $tids) .')'; } - $sql = 'SELECT n.nid, n.sticky, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY n.sticky DESC, n.created DESC'; + $sql = 'SELECT n.nid, n.sticky, n.title, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY n.sticky DESC, n.created DESC'; $sql_count = 'SELECT COUNT(n.nid) FROM {node} n '. $joins .' WHERE n.status = 1 ' . $wheres; } $sql = db_rewrite_sql($sql); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index ef6b8b9e7..17de7a520 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -837,7 +837,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p if ($operator == 'or') { $str_tids = implode(',', call_user_func_array('array_merge', $descendant_tids)); - $sql = 'SELECT n.nid, n.sticky, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'; + $sql = 'SELECT n.nid, n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'; $sql_count = 'SELECT COUNT(n.nid) FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1'; } else { @@ -847,7 +847,7 @@ function taxonomy_select_nodes($tids = array(), $operator = 'or', $depth = 0, $p $joins .= ' INNER JOIN {term_node} tn'. $index .' ON n.nid = tn'. $index .'.nid'; $wheres .= ' AND tn'. $index .'.tid IN ('. implode(',', $tids) .')'; } - $sql = 'SELECT n.nid, n.sticky, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY n.sticky DESC, n.created DESC'; + $sql = 'SELECT n.nid, n.sticky, n.title, n.created FROM {node} n '. $joins .' WHERE n.status = 1 '. $wheres .' ORDER BY n.sticky DESC, n.created DESC'; $sql_count = 'SELECT COUNT(n.nid) FROM {node} n '. $joins .' WHERE n.status = 1 ' . $wheres; } $sql = db_rewrite_sql($sql); |