From 4bdf24ea52a0e661d84a13ec78a868cb50c46cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Mon, 28 Jan 2008 19:56:27 +0000 Subject: #210219 by htalvitie, yched: initialize block caching properties properly on install (and update bugos RC2 sites as well) --- includes/file.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes') 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}')); } /** -- cgit v1.2.3