1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 09:12:41 +01:00

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:
epriestley 2013-02-09 13:28:51 -08:00
parent 4a3a4fdea3
commit 27a537c15f

View file

@ -227,6 +227,11 @@ final class ConpherenceThreadQuery
$conpherence_pic_phids[$conpherence->getPHID()] = $phid; $conpherence_pic_phids[$conpherence->getPHID()] = $phid;
} }
} }
if (!$conpherence_pic_phids) {
return $this;
}
$files = id(new PhabricatorFileQuery()) $files = id(new PhabricatorFileQuery())
->setViewer($this->getViewer()) ->setViewer($this->getViewer())
->withPHIDs($conpherence_pic_phids) ->withPHIDs($conpherence_pic_phids)