Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2013-10-16 12:34:05 +0400
committerBjörn Schießle <bjoern@schiessle.org>2013-10-16 12:34:05 +0400
commitada94fb5581569b24ae4f2ffcf6fdf46d7b67f84 (patch)
tree921eac17cf72c531ce5dd5fecff81ffa04825e1b
parent630be99ddf8508dd5d4b84bd5b9493bf84cc2e6a (diff)
parente2cc7e7bf9a5c9ee44769429347833b7b748708a (diff)
Merge pull request #5333 from owncloud/avater_with_encryption
avatars should also work with encryption after pr #5332 was merged
-rw-r--r--lib/private/avatar.php4
-rw-r--r--tests/lib/avatar.php3
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/private/avatar.php b/lib/private/avatar.php
index f20980c364b..720740569df 100644
--- a/lib/private/avatar.php
+++ b/lib/private/avatar.php
@@ -51,10 +51,6 @@ class OC_Avatar {
* @return void
*/
public function set ($data) {
- if (\OC_App::isEnabled('files_encryption')) {
- $l = \OC_L10N::get('lib');
- throw new \Exception($l->t("Custom profile pictures don't work with encryption yet"));
- }
$img = new OC_Image($data);
$type = substr($img->mimeType(), -3);
diff --git a/tests/lib/avatar.php b/tests/lib/avatar.php
index 1c5195f8eb1..6e6faed2d2c 100644
--- a/tests/lib/avatar.php
+++ b/tests/lib/avatar.php
@@ -9,15 +9,14 @@
class Test_Avatar extends PHPUnit_Framework_TestCase {
public function testAvatar() {
- $this->markTestSkipped("Setting custom avatars with encryption doesn't work yet");
$avatar = new \OC_Avatar(\OC_User::getUser());
$this->assertEquals(false, $avatar->get());
$expected = new OC_Image(\OC::$SERVERROOT.'/tests/data/testavatar.png');
- $avatar->set($expected->data());
$expected->resize(64);
+ $avatar->set($expected->data());
$this->assertEquals($expected->data(), $avatar->get()->data());
$avatar->remove();