summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 4fb56e8a4..69e2a6242 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -605,7 +605,8 @@ function file_save(stdClass $file) {
*
* @return
* A nested array with usage data. The first level is keyed by module name,
- * the second by object type, the third has 'id' and 'count' keys.
+ * the second by object type and the third by the object id. The value
+ * of the third level contains the usage count.
*
* @see file_usage_add()
* @see file_usage_delete()
@@ -618,7 +619,7 @@ function file_usage_list(stdClass $file) {
->execute();
$references = array();
foreach ($result as $usage) {
- $references[$usage->module][$usage->type] = array('id' => $usage->id, 'count' => $usage->count);
+ $references[$usage->module][$usage->type][$usage->id] = $usage->count;
}
return $references;
}