mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Don't issue unnecssary query when loading user profile images
Summary: Fixes T2264. Test Plan: Loaded profile. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2264 Differential Revision: https://secure.phabricator.com/D4324
This commit is contained in:
parent
ea52c30bca
commit
a5c7286df7
1 changed files with 5 additions and 3 deletions
|
@ -630,9 +630,11 @@ EOBODY;
|
||||||
public function loadProfileImageURI() {
|
public function loadProfileImageURI() {
|
||||||
$src_phid = $this->getProfileImagePHID();
|
$src_phid = $this->getProfileImagePHID();
|
||||||
|
|
||||||
$file = id(new PhabricatorFile())->loadOneWhere('phid = %s', $src_phid);
|
if ($src_phid) {
|
||||||
if ($file) {
|
$file = id(new PhabricatorFile())->loadOneWhere('phid = %s', $src_phid);
|
||||||
return $file->getBestURI();
|
if ($file) {
|
||||||
|
return $file->getBestURI();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::getDefaultProfileImageURI();
|
return self::getDefaultProfileImageURI();
|
||||||
|
|
Loading…
Reference in a new issue