From 9f6c1c8d19787bb89392d9e2f34543a4eb1519f5 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Thu, 30 Aug 2012 16:07:23 +0200 Subject: [PATCH] Fixed "viewd" spelling, changed to more apt name (trackView()) --- code/DMSDocument.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/DMSDocument.php b/code/DMSDocument.php index ef4b5c0..bb058da 100644 --- a/code/DMSDocument.php +++ b/code/DMSDocument.php @@ -90,7 +90,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface { /** * increase ViewCount by 1, without update any other record fields such as LastEdited */ - function viewd(){ + function trackView(){ if ($this->ID > 0) { $count = $this->ViewCount + 1; DB::query("UPDATE \"DMSDocument\" SET \"ViewCount\"='$count' WHERE \"ID\"={$this->ID}"); @@ -802,7 +802,7 @@ class DMSDocument_Controller extends Controller { //if a DMSDocument can be downlaoded and all the permissions/privileges has passed, //its ViewCount should be increased by 1 just before the browser sending the file to front. - $doc->viewd(); + $doc->trackView(); header('Content-Type: ' . $mime); header('Content-Length: ' . filesize($path), null);