Fixed "viewd" spelling, changed to more apt name (trackView())

This commit is contained in:
Ingo Schommer 2012-08-30 16:07:23 +02:00
parent 150f68e382
commit 9f6c1c8d19

View File

@ -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);