summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-08-30 15:04:54 +0000
committerDries Buytaert <dries@buytaert.net>2005-08-30 15:04:54 +0000
commit7e5d0c947a23c0931614b167b7107c97cdd82136 (patch)
tree66218d1599e0cdb456fdc5efc57ee894321513d9 /modules
parent246274eb1643d3d6643cdf85559ab204491d93ac (diff)
downloadbrdo-7e5d0c947a23c0931614b167b7107c97cdd82136.tar.gz
brdo-7e5d0c947a23c0931614b167b7107c97cdd82136.tar.bz2
- Patch #20255 by Cvbge: simplified a query in the throttle.module. Fixes a PostgreSQL compatibility bug too.
Diffstat (limited to 'modules')
-rw-r--r--modules/throttle.module2
-rw-r--r--modules/throttle/throttle.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/throttle.module b/modules/throttle.module
index 2c9c93368..069729cf8 100644
--- a/modules/throttle.module
+++ b/modules/throttle.module
@@ -56,7 +56,7 @@ function throttle_exit() {
$guests = 0;
}
if ($max_users = variable_get('throttle_user', 0)) {
- $users = db_result(db_query('SELECT COUNT(DISTINCT(uid)) AS count FROM {sessions} WHERE timestamp >= %d AND uid != 0 GROUP BY uid ORDER BY timestamp DESC', time() - $time_period));
+ $users = db_result(db_query('SELECT COUNT(DISTINCT(uid)) AS count FROM {sessions} WHERE timestamp >= %d AND uid != 0', time() - $time_period));
}
else {
$users = 0;
diff --git a/modules/throttle/throttle.module b/modules/throttle/throttle.module
index 2c9c93368..069729cf8 100644
--- a/modules/throttle/throttle.module
+++ b/modules/throttle/throttle.module
@@ -56,7 +56,7 @@ function throttle_exit() {
$guests = 0;
}
if ($max_users = variable_get('throttle_user', 0)) {
- $users = db_result(db_query('SELECT COUNT(DISTINCT(uid)) AS count FROM {sessions} WHERE timestamp >= %d AND uid != 0 GROUP BY uid ORDER BY timestamp DESC', time() - $time_period));
+ $users = db_result(db_query('SELECT COUNT(DISTINCT(uid)) AS count FROM {sessions} WHERE timestamp >= %d AND uid != 0', time() - $time_period));
}
else {
$users = 0;