summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-03-21 20:58:56 +0000
committerDries Buytaert <dries@buytaert.net>2005-03-21 20:58:56 +0000
commit77a5d783f207e586fa62df6cdff6cbfc18f30aeb (patch)
tree8143c841deb9905c2e356537912f88715036ce12
parent8e1dd1d625de02f87b15e06bd6e5d605b2386037 (diff)
downloadbrdo-77a5d783f207e586fa62df6cdff6cbfc18f30aeb.tar.gz
brdo-77a5d783f207e586fa62df6cdff6cbfc18f30aeb.tar.bz2
- Patch #19193 by CodeMonkeyX: made taxonomy_select_nodes() return node titles.
-rw-r--r--modules/taxonomy.module4
-rw-r--r--modules/taxonomy/taxonomy.module4
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);