From 75dc774a08b355d4c14b18e1dc10952b9dd1ebf5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 22 May 2017 21:21:49 -0400 Subject: [PATCH] Continue to support non-USE_DEEP_STORAGE option --- web/api/app/Controller/Component/ImageComponent.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/api/app/Controller/Component/ImageComponent.php b/web/api/app/Controller/Component/ImageComponent.php index f8ed7a533..fc967a2de 100644 --- a/web/api/app/Controller/Component/ImageComponent.php +++ b/web/api/app/Controller/Component/ImageComponent.php @@ -94,7 +94,10 @@ class ImageComponent extends Component { // Take the StartTime of an Event and return // the path to its location on the filesystem public function getEventPath( $event ) { - return $event['Event']['MonitorId'].'/'.strftime( "%y/%m/%d/%H/%M/%S", strtotime($event['Event']['StartTime']) ); - } + if ( $config['ZM_USE_DEEP_STORAGE'] == 1 ) + return $event['Event']['MonitorId'].'/'.strftime( "%y/%m/%d/%H/%M/%S", strtotime($event['Event']['StartTime']) ); + else + return $event['Event']['MonitorId'].'/'.$event['Event']['Id']; + } } ?>