diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2012-05-03 11:04:51 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2012-05-03 11:15:44 +0200 |
commit | 6cc9f600d21cc54b4df76c2ffda7a45126f20d23 (patch) | |
tree | 7915e8fc6863f344290ade1b26139a256c4a4e35 /apps | |
parent | 351740601a81558843a92670ad113a61f6e2f1be (diff) | |
download | nextcloud-server-6cc9f600d21cc54b4df76c2ffda7a45126f20d23.tar.gz nextcloud-server-6cc9f600d21cc54b4df76c2ffda7a45126f20d23.zip |
Contacts: Don't resize profile picture if it's not too big.
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/contacts/ajax/savecrop.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php index 36d582eca9c..958f9fd926c 100755 --- a/apps/contacts/ajax/savecrop.php +++ b/apps/contacts/ajax/savecrop.php @@ -70,7 +70,7 @@ if(file_exists($tmp_path)) { $h = ($h != -1 ? $h : $image->height()); OCP\Util::writeLog('contacts','savecrop.php, x: '.$x1.' y: '.$y1.' w: '.$w.' h: '.$h, OCP\Util::DEBUG); if($image->crop($x1, $y1, $w, $h)) { - if($image->resize(200)) { + if(($image->width() <= 200 && $image->height() <= 200) || $image->resize(200)) { $tmpfname = tempnam("/tmp", "occCropped"); // create a new file because of caching issues. if($image->save($tmpfname)) { unlink($tmp_path); |