diff --git a/appinfo/info.xml b/appinfo/info.xml index c5179f81..5127b265 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -9,9 +9,4 @@ Address book with CardDAV support. - - appinfo/remote.php - appinfo/remote.php - thumbnail.php - diff --git a/lib/contact.php b/lib/contact.php index ca19857a..aeb19407 100644 --- a/lib/contact.php +++ b/lib/contact.php @@ -672,7 +672,7 @@ class Contact extends VObject\VCard implements IPIMObject { } // TODO: Cleanup these parameters - public function cacheThumbnail(\OC_Image $image = null, $remove = false, $update = false) { + public function cacheThumbnail(\OCP\Image $image = null, $remove = false, $update = false) { $key = self::THUMBNAIL_PREFIX . $this->combinedKey(); //\OC_Cache::remove($key); if(\OC_Cache::hasKey($key) && $image === null && $remove === false && $update === false) { @@ -686,7 +686,7 @@ class Contact extends VObject\VCard implements IPIMObject { } if(is_null($image)) { $this->retrieve(); - $image = new \OC_Image(); + $image = new \OCP\Image(); if(!isset($this->PHOTO) && !isset($this->LOGO)) { return false; } @@ -698,13 +698,13 @@ class Contact extends VObject\VCard implements IPIMObject { } if(!$image->centerCrop()) { \OCP\Util::writeLog('contacts', - 'thumbnail.php. Couldn\'t crop thumbnail for ID ' . $key, + __METHOD__ .'. Couldn\'t crop thumbnail for ID ' . $key, \OCP\Util::ERROR); return false; } if(!$image->resize(self::THUMBNAIL_SIZE)) { \OCP\Util::writeLog('contacts', - 'thumbnail.php. Couldn\'t resize thumbnail for ID ' . $key, + __METHOD__ . '. Couldn\'t resize thumbnail for ID ' . $key, \OCP\Util::ERROR); return false; } diff --git a/lib/controller/contactcontroller.php b/lib/controller/contactcontroller.php index 9fa2151c..0dd8645d 100644 --- a/lib/controller/contactcontroller.php +++ b/lib/controller/contactcontroller.php @@ -129,7 +129,7 @@ class ContactController extends BaseController { return $response; } - $image = new \OC_Image(); + $image = new \OCP\Image(); if (isset($contact->PHOTO) && $image->loadFromBase64((string)$contact->PHOTO)) { // OK $etag = md5($contact->PHOTO); diff --git a/lib/imageresponse.php b/lib/imageresponse.php index 846decb7..ed1ad95c 100644 --- a/lib/imageresponse.php +++ b/lib/imageresponse.php @@ -16,7 +16,7 @@ use OCA\AppFramework\Http\Response; */ class ImageResponse extends Response { /** - * @var OC_Image + * @var OCP\Image */ protected $image; @@ -25,7 +25,7 @@ class ImageResponse extends Response { $this->setImage($image); } - public function setImage(\OC_Image $image) { + public function setImage(\OCP\Image $image) { if(!$image->valid()) { throw new InvalidArgumentException(__METHOD__. ' The image resource is not valid.'); }