summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-03-01 08:47:17 +0000
committerDries Buytaert <dries@buytaert.net>2006-03-01 08:47:17 +0000
commite3db356ad5ce7bf56ca4db88f564a57b69b4ca67 (patch)
tree30274401a7e209c277b36e6d4c682b853d812a6e /modules
parent61fa1f5dc893d63674c3302978719d094e221223 (diff)
downloadbrdo-e3db356ad5ce7bf56ca4db88f564a57b69b4ca67.tar.gz
brdo-e3db356ad5ce7bf56ca4db88f564a57b69b4ca67.tar.bz2
- Patch #51850 by webchick: work around a db_rewrite_sql() bug.
Diffstat (limited to 'modules')
-rw-r--r--modules/statistics.module2
-rw-r--r--modules/statistics/statistics.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/statistics.module b/modules/statistics.module
index cb5024984..ed6c28d17 100644
--- a/modules/statistics.module
+++ b/modules/statistics.module
@@ -375,7 +375,7 @@ function statistics_cron() {
* or FALSE if the query could not be executed correctly.
*/
function statistics_title_list($dbfield, $dbrows) {
- return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node_counter} s INNER JOIN {node} n ON s.nid = n.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
+ return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
}
diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module
index cb5024984..ed6c28d17 100644
--- a/modules/statistics/statistics.module
+++ b/modules/statistics/statistics.module
@@ -375,7 +375,7 @@ function statistics_cron() {
* or FALSE if the query could not be executed correctly.
*/
function statistics_title_list($dbfield, $dbrows) {
- return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node_counter} s INNER JOIN {node} n ON s.nid = n.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
+ return db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.uid, u.name FROM {node} n INNER JOIN {node_counter} s ON n.nid = s.nid INNER JOIN {users} u ON n.uid = u.uid WHERE %s <> '0' AND n.status = 1 ORDER BY %s DESC"), 's.'. $dbfield, 's.'. $dbfield, 0, $dbrows);
}