diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-03 12:52:27 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-11 16:37:42 +0100 |
commit | 1a0f9c375be12502d9b016c6bdb4c898ec765bbd (patch) | |
tree | 6b287f2d71e94740b364d17a5f23424d5f6668aa /lib/private/avatar.php | |
parent | cfaee93552b519b8e017e63fd5a82b1e5c9f951b (diff) | |
download | nextcloud-server-1a0f9c375be12502d9b016c6bdb4c898ec765bbd.tar.gz nextcloud-server-1a0f9c375be12502d9b016c6bdb4c898ec765bbd.zip |
Avatar controller moved to AppFrameWork
* Original avatarcontroller migrated to the appframework
* Added DataDisplayResponse that show data inline in the browser (used
to retrun the image)
* Removed some unneeded code
* Added unit tests for the avatarcontroller
Diffstat (limited to 'lib/private/avatar.php')
-rw-r--r-- | lib/private/avatar.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/avatar.php b/lib/private/avatar.php index 5e234d77bb2..23b3c82771a 100644 --- a/lib/private/avatar.php +++ b/lib/private/avatar.php @@ -6,11 +6,15 @@ * See the COPYING-README file. */ + namespace OC; + + use OC_Image; + /** * This class gets and sets users avatars. */ -class OC_Avatar implements \OCP\IAvatar { +class Avatar implements \OCP\IAvatar { private $view; @@ -54,8 +58,8 @@ class OC_Avatar implements \OCP\IAvatar { /** * sets the users avatar * @param \OC_Image|resource|string $data OC_Image, imagedata or path to set a new avatar - * @throws Exception if the provided file is not a jpg or png image - * @throws Exception if the provided image is not valid + * @throws \Exception if the provided file is not a jpg or png image + * @throws \Exception if the provided image is not valid * @throws \OC\NotSquareException if the image is not square * @return void */ |