From f4d2df394154eba45f7d7a5678896851ba1117dd Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Thu, 30 May 2013 20:30:09 -0400 Subject: [PATCH] Function to determine the path to an event in the filesystem. --- web/app/Model/AppModel.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/app/Model/AppModel.php b/web/app/Model/AppModel.php index 2add386f6..9297aa609 100644 --- a/web/app/Model/AppModel.php +++ b/web/app/Model/AppModel.php @@ -51,4 +51,13 @@ class AppModel extends Model { return( $dimension ); } + public function getEventPath( $event ){ + if (Configure::read('ZM_USE_DEEP_STORAGE')) { + $eventPath = $event['MonitorId'].'/'.strftime("%y/%m/%d/%H/%M/%S", strtotime($event['StartTime'])); + } else { + $eventPath = $event['MonitorId'].'/'.$event['Id']; + } + return($eventPath); + } + }