]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'develop' of https://github.com/friendica/friendica into develop
authorRalf Thees <ralf@herrthees.de>
Tue, 23 Oct 2018 15:18:23 +0000 (17:18 +0200)
committerRalf Thees <ralf@herrthees.de>
Tue, 23 Oct 2018 15:18:23 +0000 (17:18 +0200)
16 files changed:
doc/api.md
images/person-300.jpg [new file with mode: 0644]
include/api.php
mod/dfrn_confirm.php
mod/photo.php
mod/profile_photo.php
src/Core/NotificationsManager.php
src/Model/Contact.php
src/Model/GContact.php
src/Model/Photo.php
src/Model/User.php
src/Module/Proxy.php
src/Network/Probe.php
src/Protocol/DFRN.php
src/Protocol/OStatus.php
src/Util/Network.php

index 07813b6a7715c243f91f06cd4dc19e974e88552d..2715f44462ea2392e7cc20ddde78362df97ac74d 100644 (file)
@@ -1061,7 +1061,7 @@ possibile scale value are:
 * 1: image with or height at <= 640
 * 2: image with or height at <= 320
 * 3: thumbnail 160x160
-* 4: Profile image at 175x175
+* 4: Profile image at 300x300
 * 5: Profile image at 80x80
 * 6: Profile image at 48x48
 
diff --git a/images/person-300.jpg b/images/person-300.jpg
new file mode 100644 (file)
index 0000000..8173082
Binary files /dev/null and b/images/person-300.jpg differ
index 7e54fa382a643ea38c85fff7f7d3a5050a893eba..86f2e3b2a4f3d775a1ba0913668e126ad999fd1a 100644 (file)
@@ -4556,11 +4556,11 @@ function save_media_to_database($mediatype, $media, $type, $album, $allow_cid, $
                // upload profile image (scales 4, 5, 6)
                logger("photo upload: starting new profile image upload", LOGGER_DEBUG);
 
-               if ($width > 175 || $height > 175) {
-                       $Image->scaleDown(175);
+               if ($width > 300 || $height > 300) {
+                       $Image->scaleDown(300);
                        $r = Photo::store($Image, local_user(), $visitor, $hash, $filename, $album, 4, $profile, $allow_cid, $allow_gid, $deny_cid, $deny_gid, $desc);
                        if (!$r) {
-                               logger("photo upload: profile image upload with scale 4 (175x175) failed");
+                               logger("photo upload: profile image upload with scale 4 (300x300) failed");
                        }
                }
 
index f685d9e237774a05867a6196bbed8306591f75eb..c4110596648d15421514bd5be595eaa93a6ad067 100644 (file)
@@ -537,7 +537,7 @@ function dfrn_confirm_post(App $a, $handsfree = null)
                if (DBA::isResult($contact)) {
                        $photo = $contact['photo'];
                } else {
-                       $photo = System::baseUrl() . '/images/person-175.jpg';
+                       $photo = System::baseUrl() . '/images/person-300.jpg';
                }
 
                Contact::updateAvatar($photo, $local_uid, $dfrn_record);
index 083b7cfc99bdd2a4076fd8e9f9fbb8003930294e..54418f730d09e1789208dd78447bb9d0376359c6 100644 (file)
@@ -51,7 +51,7 @@ function photo_init(App $a)
                exit;
        }
 
-       $default = 'images/person-175.jpg';
+       $default = 'images/person-300.jpg';
        $public = true;
 
        if (isset($type)) {
@@ -137,7 +137,7 @@ function photo_init(App $a)
                if (isset($resolution)) {
                        switch ($resolution) {
                                case 4:
-                                       $data = file_get_contents('images/person-175.jpg');
+                                       $data = file_get_contents('images/person-300.jpg');
                                        $mimetype = 'image/jpeg';
                                        break;
                                case 5:
index 19188ba23e884886b5b10ff6a9e6665fc6732ac9..da45226fe02bbc20f983774eac313f21a5e5c946 100644 (file)
@@ -80,13 +80,13 @@ function profile_photo_post(App $a)
 
                        $Image = new Image($base_image['data'], $base_image['type']);
                        if ($Image->isValid()) {
-                               $Image->crop(175, $srcX, $srcY, $srcW, $srcH);
+                               $Image->crop(300, $srcX, $srcY, $srcW, $srcH);
 
                                $r = Photo::store($Image, local_user(), 0, $base_image['resource-id'], $base_image['filename'],
                                                L10n::t('Profile Photos'), 4, $is_default_profile);
 
                                if ($r === false) {
-                                       notice(L10n::t('Image size reduction [%s] failed.', "175") . EOL);
+                                       notice(L10n::t('Image size reduction [%s] failed.', "300") . EOL);
                                }
 
                                $Image->scaleDown(80);
@@ -288,7 +288,7 @@ function profile_photo_crop_ui_head(App $a, Image $image)
        $height = $image->getHeight();
 
        if ($width < 175 || $height < 175) {
-               $image->scaleUp(200);
+               $image->scaleUp(300);
                $width = $image->getWidth();
                $height = $image->getHeight();
        }
index fb77605730b1069501c751c382a4f2ee46448cfe..9250bc2e5b46dd7f266eff4a99e00f145550fb5a 100644 (file)
@@ -642,7 +642,7 @@ class NotificationsManager extends BaseObject
                                        'madeby_zrl' => Contact::magicLink($it['url']),
                                        'madeby_addr' => $it['addr'],
                                        'contact_id' => $it['contact-id'],
-                                       'photo' => ((x($it, 'fphoto')) ? ProxyUtils::proxifyUrl($it['fphoto'], false, ProxyUtils::SIZE_SMALL) : "images/person-175.jpg"),
+                                       'photo' => ((x($it, 'fphoto')) ? ProxyUtils::proxifyUrl($it['fphoto'], false, ProxyUtils::SIZE_SMALL) : "images/person-300.jpg"),
                                        'name' => $it['fname'],
                                        'url' => $it['furl'],
                                        'zrl' => Contact::magicLink($it['furl']),
@@ -674,7 +674,7 @@ class NotificationsManager extends BaseObject
                                        'uid' => $_SESSION['uid'],
                                        'intro_id' => $it['intro_id'],
                                        'contact_id' => $it['contact-id'],
-                                       'photo' => ((x($it, 'photo')) ? ProxyUtils::proxifyUrl($it['photo'], false, ProxyUtils::SIZE_SMALL) : "images/person-175.jpg"),
+                                       'photo' => ((x($it, 'photo')) ? ProxyUtils::proxifyUrl($it['photo'], false, ProxyUtils::SIZE_SMALL) : "images/person-300.jpg"),
                                        'name' => $it['name'],
                                        'location' => BBCode::convert($it['glocation'], false),
                                        'about' => BBCode::convert($it['gabout'], false),
index 3524cd4ce10eff1fb7ac30c04f38948d337256e7..fdb49ac1331379b3bfd2a9d8c6a84c35409ab79a 100644 (file)
@@ -465,7 +465,7 @@ class Contact extends BaseObject
                        $fields['micro'] = $prefix . '6' . $suffix;
                } else {
                        // We hadn't found a photo entry, so we use the default avatar
-                       $fields['photo'] = System::baseUrl() . '/images/person-175.jpg';
+                       $fields['photo'] = System::baseUrl() . '/images/person-300.jpg';
                        $fields['thumb'] = System::baseUrl() . '/images/person-80.jpg';
                        $fields['micro'] = System::baseUrl() . '/images/person-48.jpg';
                }
index 20e6f0751ed8867d7eacb76998107d42481ee248..cc7775377924fb1b69882c44e7c79a30d3928367 100644 (file)
@@ -995,7 +995,7 @@ class GContact
                                                "addr" => $user->nickname."@".$hostname,
                                                "nick" => $user->nickname,
                                                "network" => Protocol::OSTATUS,
-                                               "photo" => System::baseUrl()."/images/person-175.jpg"];
+                                               "photo" => System::baseUrl()."/images/person-300.jpg"];
 
                                if (isset($user->bio)) {
                                        $contact["about"] = $user->bio;
index 6b094ded6ca5aea0b0b09cb442bc19ca8252f068..a9b4c0fb736fd139957518921de46f03cac308d5 100644 (file)
@@ -115,7 +115,7 @@ class Photo
                $type = Image::guessType($image_url, true);
                $Image = new Image($img_str, $type);
                if ($Image->isValid()) {
-                       $Image->scaleToSquare(175);
+                       $Image->scaleToSquare(300);
 
                        $r = self::store($Image, $uid, $cid, $hash, $filename, 'Contact Photos', 4);
 
@@ -172,7 +172,7 @@ class Photo
                }
 
                if ($photo_failure) {
-                       $image_url = System::baseUrl() . '/images/person-175.jpg';
+                       $image_url = System::baseUrl() . '/images/person-300.jpg';
                        $thumb = System::baseUrl() . '/images/person-80.jpg';
                        $micro = System::baseUrl() . '/images/person-48.jpg';
                }
index 27ed28fd4feadda2e7b3e7f6315e1c306cb2c5a7..bdea5e28f0dfe1863e02041443dd259886fafc1f 100644 (file)
@@ -642,7 +642,7 @@ class User
 
                        $Image = new Image($img_str, $type);
                        if ($Image->isValid()) {
-                               $Image->scaleToSquare(175);
+                               $Image->scaleToSquare(300);
 
                                $hash = Photo::newResource();
 
index 8c3493b2adaa6033027b78cf160dacaae6ca31a2..29e0f4f52f4903c151419133d661a8a4335f9507 100644 (file)
@@ -103,7 +103,7 @@ class Proxy extends BaseModule
                                $sizetype = ':thumb';
                                $url = substr($url, 0, -6);
                        } elseif (substr($url, -6) == ':small') {
-                               $size = 175;
+                               $size = 300;
                                $url = substr($url, 0, -6);
                                $sizetype = ':small';
                        } elseif (substr($url, -7) == ':medium') {
index 08ec4ae1c8863cab38f03ec14a2eb84bf946fa5b..f892c3a5ccfc16cc69e027e5e57eb71923a2a60a 100644 (file)
@@ -348,7 +348,7 @@ class Probe
                if (x($data, "photo")) {
                        $data["baseurl"] = Network::getUrlMatch(normalise_link(defaults($data, "baseurl", "")), normalise_link($data["photo"]));
                } else {
-                       $data["photo"] = System::baseUrl().'/images/person-175.jpg';
+                       $data["photo"] = System::baseUrl().'/images/person-300.jpg';
                }
 
                if (empty($data["name"])) {
index e8cf4a631a5080cbe0b2d359a5ed737acd7c288a..1dcc1197a5d3ae70cc614700ac2fbb1fe89a0212 100644 (file)
@@ -646,7 +646,7 @@ class DFRN
                XML::addElement($doc, $author, "dfrn:handle", $owner["addr"], $attributes);
 
                $attributes = ["rel" => "photo", "type" => "image/jpeg",
-                                       "media:width" => 175, "media:height" => 175, "href" => $owner['photo']];
+                                       "media:width" => 300, "media:height" => 300, "href" => $owner['photo']];
 
                if (!$public || !$hidewall) {
                        $attributes["dfrn:updated"] = $picdate;
index 0e3d5e6c0f0412e326f26bc8465029595fa09179..fb78d2ebbe59633943b9142c1c243b2a1f38c42b 100644 (file)
@@ -1450,8 +1450,8 @@ class OStatus
                $attributes = [
                                "rel" => "avatar",
                                "type" => "image/jpeg", // To-Do?
-                               "media:width" => 175,
-                               "media:height" => 175,
+                               "media:width" => 300,
+                               "media:height" => 300,
                                "href" => $owner["photo"]];
                XML::addElement($doc, $author, "link", "", $attributes);
 
@@ -1769,8 +1769,8 @@ class OStatus
                $attributes = [
                                "rel" => "avatar",
                                "type" => "image/jpeg", // To-Do?
-                               "media:width" => 175,
-                               "media:height" => 175,
+                               "media:width" => 300,
+                               "media:height" => 300,
                                "href" => $contact["photo"]];
                XML::addElement($doc, $object, "link", "", $attributes);
 
index 1038fa3f0430fd9f89af68f0f827404fa809c0e5..3b27a0550a5615a1dadbdf137cffdd6e3c91f9f1 100644 (file)
@@ -516,7 +516,7 @@ class Network
 
        public static function lookupAvatarByEmail($email)
        {
-               $avatar['size'] = 175;
+               $avatar['size'] = 300;
                $avatar['email'] = $email;
                $avatar['url'] = '';
                $avatar['success'] = false;
@@ -524,7 +524,7 @@ class Network
                Addon::callHooks('avatar_lookup', $avatar);
 
                if (! $avatar['success']) {
-                       $avatar['url'] = System::baseUrl() . '/images/person-175.jpg';
+                       $avatar['url'] = System::baseUrl() . '/images/person-300.jpg';
                }
 
                logger('Avatar: ' . $avatar['email'] . ' ' . $avatar['url'], LOGGER_DEBUG);