From a61d294419a99f8d232fbcfdb258f8d09f3341f4 Mon Sep 17 00:00:00 2001 From: Mateusz Qunabu Date: Wed, 16 Aug 2017 11:23:59 +0200 Subject: [PATCH] Allow more sophisticated trackview adds `$this->extend('trackView');` into `trackView` function so developers can work on more sophisticated track view of downloaded file, eg how had downloaded or when. --- code/model/DMSDocument.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/model/DMSDocument.php b/code/model/DMSDocument.php index a4ba0ca..bafe0d2 100644 --- a/code/model/DMSDocument.php +++ b/code/model/DMSDocument.php @@ -235,6 +235,8 @@ class DMSDocument extends DataObject implements DMSDocumentInterface $this->ViewCount = $count; DB::query("UPDATE \"DMSDocument\" SET \"ViewCount\"='$count' WHERE \"ID\"={$this->ID}"); + + $this->extend('trackView'); } return $this;