@@ 111-116 (lines=6) @@ | ||
108 | public function updateImageProperty(&$property, $entry, $version=null) { |
|
109 | $image = new \OC_Image(); |
|
110 | $image->loadFromData($entry); |
|
111 | if (strcmp($version, '4.0') == 0) { |
|
112 | $type = $image->mimeType(); |
|
113 | } else { |
|
114 | $arrayType = explode('/', $image->mimeType()); |
|
115 | $type = strtoupper(array_pop($arrayType)); |
|
116 | } |
|
117 | $property->add('ENCODING', 'b'); |
|
118 | $property->add('TYPE', $type); |
|
119 | $property->setValue($image->__toString()); |
@@ 174-179 (lines=6) @@ | ||
171 | for ($i=0; $i<count($v_property); $i++) { |
|
172 | $image = new \OC_Image(); |
|
173 | $image->loadFromData($ldap_entry); |
|
174 | if (strcmp($version, '4.0') == 0) { |
|
175 | $type = $image->mimeType(); |
|
176 | } else { |
|
177 | $arrayType = explode('/', $image->mimeType()); |
|
178 | $type = strtoupper(array_pop($arrayType)); |
|
179 | } |
|
180 | $v_property[$i]->add('ENCODING', 'b'); |
|
181 | $v_property[$i]->add('TYPE', $type); |
|
182 | $v_property[$i]->setValue($image->__toString()); |