@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

T1354 : Resize profile pics (specifically to handle github v3 api)

Reviewed by: epriestley
GitHub Pull: https://github.com/facebook/phabricator/pull/140

authored by

Daniel Fullarton and committed by
epriestley
37df05c7 e6832367

+21 -2
+10 -1
src/applications/auth/controller/oauthregistration/PhabricatorOAuthDefaultRegistrationController.php
··· 107 107 'name' => $provider->getProviderKey().'-profile.jpg', 108 108 'authorPHID' => $user->getPHID(), 109 109 )); 110 - $user->setProfileImagePHID($file->getPHID()); 110 + $xformer = new PhabricatorImageTransformer(); 111 + 112 + // Resize OAuth image to a reasonable size 113 + $small_xformed = $xformer->executeProfileTransform( 114 + $file, 115 + $width = 50, 116 + $min_height = 50, 117 + $max_height = 50); 118 + 119 + $user->setProfileImagePHID($small_xformed->getPHID()); 111 120 } 112 121 113 122 try {
+11 -1
src/applications/people/controller/settings/panels/PhabricatorUserOAuthSettingsPanelController.php
··· 217 217 'name' => $provider->getProviderKey().'-profile.jpg', 218 218 'authorPHID' => $user->getPHID(), 219 219 )); 220 - $user->setProfileImagePHID($file->getPHID()); 220 + 221 + $xformer = new PhabricatorImageTransformer(); 222 + 223 + // Resize OAuth image to a reasonable size 224 + $small_xformed = $xformer->executeProfileTransform( 225 + $file, 226 + $width = 50, 227 + $min_height = 50, 228 + $max_height = 50); 229 + 230 + $user->setProfileImagePHID($small_xformed->getPHID()); 221 231 $user->save(); 222 232 } else { 223 233 $error = 'Unable to retrieve image.';