diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-28 19:56:27 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-01-28 19:56:27 +0000 |
commit | 4bdf24ea52a0e661d84a13ec78a868cb50c46cc5 (patch) | |
tree | a7c9a3c02f7fe02481e6cffe5459afdc9f6a91ea /includes/file.inc | |
parent | bf28630a5e46d28d66d604ceea80f53c060e647b (diff) | |
download | brdo-4bdf24ea52a0e661d84a13ec78a868cb50c46cc5.tar.gz brdo-4bdf24ea52a0e661d84a13ec78a868cb50c46cc5.tar.bz2 |
#210219 by htalvitie, yched: initialize block caching properties properly on install (and update bugos RC2 sites as well)
Diffstat (limited to 'includes/file.inc')
-rw-r--r-- | includes/file.inc | 12 |
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}')); } /** |