When viewing a thread with no picture, load no images instead of all images
Summary: Currently, we select every file when looking at a thread with no splash image. (Possibly the Query stuff should try to catch this.) Test Plan: No more `SELECT * FROM files` query. Reviewers: chad, btrahan, vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D4887
This commit is contained in:
@@ -227,6 +227,11 @@ final class ConpherenceThreadQuery
|
||||
$conpherence_pic_phids[$conpherence->getPHID()] = $phid;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$conpherence_pic_phids) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$files = id(new PhabricatorFileQuery())
|
||||
->setViewer($this->getViewer())
|
||||
->withPHIDs($conpherence_pic_phids)
|
||||
|
||||
Reference in New Issue
Block a user