Skip to content

Commit

Permalink
Merge pull request #13 from unistorage/presentationSupport
Browse files Browse the repository at this point in the history
added support for presentation type & convert other types to Regular
  • Loading branch information
Prokopiev committed Apr 14, 2014
2 parents b1ef29a + 3e3a7ee commit adca941
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Unistorage/Unistorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit adca941

Please sign in to comment.