diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-06-19 10:39:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-06-19 10:39:36 +0000 |
commit | cbc230a36c16fc246064e9e8c2766cae951ef99c (patch) | |
tree | f2f885568eaff4d3968bc48540ef2af73218f5f6 /modules/taxonomy.module | |
parent | c51805aa8a1444db173c63881e2e7147d7d4839b (diff) | |
download | brdo-cbc230a36c16fc246064e9e8c2766cae951ef99c.tar.gz brdo-cbc230a36c16fc246064e9e8c2766cae951ef99c.tar.bz2 |
- Patch #7696 by TDobes: renamed 'static' to 'sticky' which is a more
logical name. Requires a database upgrade.
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r-- | modules/taxonomy.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index f907edf64..d18185980 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -745,11 +745,11 @@ function _prepare_insert($data, $stage) { function taxonomy_select_nodes($taxonomy, $pager = TRUE) { if ($taxonomy->str_tids) { if ($taxonomy->operator == 'or') { - $sql = "SELECT DISTINCT(n.nid), n.title, n.type, n.created, n.changed, n.uid, n.static, n.created, u.name FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid INNER JOIN {users} u ON n.uid = u.uid WHERE r.tid IN ($taxonomy->str_tids) AND n.status = 1 ORDER BY static DESC, created DESC"; + $sql = "SELECT DISTINCT(n.nid), n.title, n.type, n.created, n.changed, n.uid, n.sticky, n.created, u.name FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid INNER JOIN {users} u ON n.uid = u.uid WHERE r.tid IN ($taxonomy->str_tids) AND n.status = 1 ORDER BY sticky DESC, created DESC"; $sql_count = "SELECT COUNT(DISTINCT(n.nid)) FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid INNER JOIN {users} u ON n.uid = u.uid WHERE r.tid IN ($taxonomy->str_tids) AND n.status = 1"; } else { - $sql = "SELECT n.nid, n.title, n.type, n.created, n.changed, n.uid, u.name FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid INNER JOIN {users} u ON n.uid = u.uid WHERE r.tid IN ($taxonomy->str_tids) AND n.status = 1 GROUP BY n.nid, n.title, n.type, n.created, n.changed, n.uid, u.name HAVING COUNT(n.nid) = ". count($taxonomy->tids) ." ORDER BY static DESC, created DESC"; + $sql = "SELECT n.nid, n.title, n.type, n.created, n.changed, n.uid, u.name FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid INNER JOIN {users} u ON n.uid = u.uid WHERE r.tid IN ($taxonomy->str_tids) AND n.status = 1 GROUP BY n.nid, n.title, n.type, n.created, n.changed, n.uid, u.name HAVING COUNT(n.nid) = ". count($taxonomy->tids) ." ORDER BY sticky DESC, created DESC"; // Special trick as we could not find anything better: $count = db_num_rows(db_query("SELECT n.nid FROM {node} n INNER JOIN {term_node} r ON n.nid = r.nid WHERE r.tid IN ($taxonomy->str_tids) AND n.status = 1 GROUP BY n.nid HAVING COUNT(n.nid) = ". count($taxonomy->tids))); |