summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-02-13 21:19:16 +0000
committerDries Buytaert <dries@buytaert.net>2010-02-13 21:19:16 +0000
commit6d68dd8c2ab654adfa885e859c73633905904071 (patch)
tree50f61e6be98f78da09dab608b6e65270095d2a56 /modules/user/user.module
parent7610357974572da9fcff5a213527b6fbaa811b9e (diff)
downloadbrdo-6d68dd8c2ab654adfa885e859c73633905904071.tar.gz
brdo-6d68dd8c2ab654adfa885e859c73633905904071.tar.bz2
- Patch #337947 by codycraven, cwgordon7, axyjo, Jacine, grndlvl, seutje, ksenzee, Jaza, chx, sun, JacobSingh, yoroy, peximo: fixed whitespace issue for 'recent content block' in dashboard.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 6f7f1c997..9417f57a8 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -809,8 +809,8 @@ function user_file_download($uri) {
*/
function user_file_references($file) {
// Determine if the file is used by this module.
- $count = db_query('SELECT COUNT(*) FROM {users} WHERE picture = :fid', array(':fid' => $file->fid))->fetchField();
- if ($count) {
+ $file_used = (bool) db_query_range('SELECT 1 FROM {users} WHERE picture = :fid', 0, 1, array(':fid' => $file->fid))->fetchField();
+ if ($file_used) {
// Return the name of the module and how many references it has to the file.
return array('user' => $count);
}