From 3e3a7ee27562d8d6ad0a78e4ba01b49d72adeeb5 Mon Sep 17 00:00:00 2001 From: Victor Prokopiev <320220@gmail.com> Date: Mon, 14 Apr 2014 10:50:25 +0600 Subject: [PATCH] added support for presentation type & convert other types to Regular --- Unistorage/Unistorage.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Unistorage/Unistorage.php b/Unistorage/Unistorage.php index 544af53..5410807 100644 --- a/Unistorage/Unistorage.php +++ b/Unistorage/Unistorage.php @@ -134,10 +134,15 @@ public function getFile($resourceUri) 'video' => 'VideoFile', 'audio' => 'AudioFile', 'doc' => 'DocFile', + 'presentation' => 'RegularFile', 'unknown' => 'RegularFile', ); - $className = $unistorageTypeToClassName[$answer['data']['unistorage_type']]; + if(isset($unistorageTypeToClassName[$answer['data']['unistorage_type']])) { + $className = $unistorageTypeToClassName[$answer['data']['unistorage_type']]; + } else { + $className = 'RegularFile'; + } $className = $this->getFilesNamespace() . $className; $properties = $this->convertToFieldNames($answer['data']);