summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 1fd40a017..907a7200a 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -437,17 +437,17 @@ function file_delete($path) {
}
/**
- * Determine the total amount of disk space used by a single user's files, or
- * the filesystem as a whole.
+ * Determine total disk space used by a single user or the whole filesystem.
*
- * @param $uid An optional, user id. A NULL value returns the total space used
+ * @param $uid
+ * An optional user id. A NULL value returns the total space used
* by all files.
*/
function file_space_used($uid = NULL) {
- if (is_null($uid)) {
- return db_result(db_query('SELECT SUM(filesize) FROM {files} WHERE uid = %d', $uid));
+ if (isset($uid)) {
+ return (int) db_result(db_query('SELECT SUM(filesize) FROM {files} WHERE uid = %d', $uid));
}
- return db_result(db_query('SELECT SUM(filesize) FROM {files}'));
+ return (int) db_result(db_query('SELECT SUM(filesize) FROM {files}'));
}
/**