summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBojan Zivanovic2013-08-13 19:45:35 (GMT)
committer Bojan Zivanovic2013-08-13 19:45:35 (GMT)
commit9b1508320868284677e66dc062f96ad67bb68ccf (patch)
tree3506524ffec0842b31bdfb255952a8699b43b2ec
parent4a332ce632541ba8539f0615fafd72496bb68478 (diff)
Skip logging if the admin is downloading another user's file.
-rw-r--r--commerce_file.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/commerce_file.module b/commerce_file.module
index 8dc540d..476a8c5 100644
--- a/commerce_file.module
+++ b/commerce_file.module
@@ -498,7 +498,8 @@ function commerce_file_exit($destination = NULL) {
// in the static cache for commerce_file_get_license().
$file = $item['page_arguments'][0];
$license = commerce_file_get_license('download', $file);
- if ($license) {
+ // Skip logging if the admin is downloading another user's file.
+ if ($license && $license->uid == $GLOBALS['user']->uid) {
commerce_file_download_log_insert($license, $file);
}
}