diff options
author | kondou <kondou@ts.unde.re> | 2013-09-09 16:57:46 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-09 16:57:46 +0200 |
commit | 1832eb88726dce70d4f8a0a45bd574b0b688ab26 (patch) | |
tree | ce7c5b7a0e8a3e61f8bb93312cb7fedb6a4a58a7 /core/avatar | |
parent | d18a070a0393ac3846053bcef1833dd01856e117 (diff) | |
download | nextcloud-server-1832eb88726dce70d4f8a0a45bd574b0b688ab26.tar.gz nextcloud-server-1832eb88726dce70d4f8a0a45bd574b0b688ab26.zip |
Pass view in \OC_Avatar to constructor and use $_ for enable_avatars
Diffstat (limited to 'core/avatar')
-rw-r--r-- | core/avatar/controller.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/avatar/controller.php b/core/avatar/controller.php index bc0eb6eff3b..c7624b90b65 100644 --- a/core/avatar/controller.php +++ b/core/avatar/controller.php @@ -23,8 +23,8 @@ class Controller { $size = 64; } - $avatar = new \OC_Avatar(); - $image = $avatar->get($user, $size); + $avatar = new \OC_Avatar($user); + $image = $avatar->get($size); \OC_Response::disableCaching(); \OC_Response::setLastModifiedHeader(time()); @@ -63,8 +63,8 @@ class Controller { } try { - $avatar = new \OC_Avatar(); - $avatar->set($user, $newAvatar); + $avatar = new \OC_Avatar($user); + $avatar->set($newAvatar); \OC_JSON::success(); } catch (\OC\NotSquareException $e) { $image = new \OC_Image($newAvatar); @@ -96,8 +96,8 @@ class Controller { $user = \OC_User::getUser(); try { - $avatar = new \OC_Avatar(); - $avatar->remove($user); + $avatar = new \OC_Avatar($user); + $avatar->remove(); \OC_JSON::success(); } catch (\Exception $e) { \OC_JSON::error(array("data" => array("message" => $e->getMessage()) )); @@ -145,8 +145,8 @@ class Controller { $image = new \OC_Image($tmpavatar); $image->crop($crop['x'], $crop['y'], $crop['w'], $crop['h']); try { - $avatar = new \OC_Avatar(); - $avatar->set($user, $image->data()); + $avatar = new \OC_Avatar($user); + $avatar->set($$image->data()); // Clean up \OC_Cache::remove('tmpavatar'); \OC_JSON::success(); |