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
path: root/apps
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-05-03 13:04:51 +0400
committerThomas Tanghus <thomas@tanghus.net>2012-05-03 13:15:44 +0400
commit6cc9f600d21cc54b4df76c2ffda7a45126f20d23 (patch)
tree7915e8fc6863f344290ade1b26139a256c4a4e35 /apps
parent351740601a81558843a92670ad113a61f6e2f1be (diff)
Contacts: Don't resize profile picture if it's not too big.
Diffstat (limited to 'apps')
-rwxr-xr-xapps/contacts/ajax/savecrop.php2
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);