Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15467780
D19910.id47530.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19910.id47530.diff
View Options
diff --git a/src/applications/pholio/query/PholioImageQuery.php b/src/applications/pholio/query/PholioImageQuery.php
--- a/src/applications/pholio/query/PholioImageQuery.php
+++ b/src/applications/pholio/query/PholioImageQuery.php
@@ -44,43 +44,32 @@
return $this->mockCache;
}
- protected function loadPage() {
- $table = new PholioImage();
- $conn_r = $table->establishConnection('r');
-
- $data = queryfx_all(
- $conn_r,
- 'SELECT * FROM %T %Q %Q %Q',
- $table->getTableName(),
- $this->buildWhereClause($conn_r),
- $this->buildOrderClause($conn_r),
- $this->buildLimitClause($conn_r));
-
- $images = $table->loadAllFromArray($data);
-
- return $images;
+ public function newResultObject() {
+ return new PholioImage();
}
- protected function buildWhereClause(AphrontDatabaseConnection $conn) {
- $where = array();
+ protected function loadPage() {
+ return $this->loadStandardPage($this->newResultObject());
+ }
- $where[] = $this->buildPagingClause($conn);
+ protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {
+ $where = parent::buildWhereClauseParts($conn);
- if ($this->ids) {
+ if ($this->ids !== null) {
$where[] = qsprintf(
$conn,
'id IN (%Ld)',
$this->ids);
}
- if ($this->phids) {
+ if ($this->phids !== null) {
$where[] = qsprintf(
$conn,
'phid IN (%Ls)',
$this->phids);
}
- if ($this->mockIDs) {
+ if ($this->mockIDs !== null) {
$where[] = qsprintf(
$conn,
'mockID IN (%Ld)',
@@ -94,7 +83,7 @@
$this->obsolete);
}
- return $this->formatWhereClause($conn, $where);
+ return $where;
}
protected function willFilterPage(array $images) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 4, 6:01 PM (3 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705244
Default Alt Text
D19910.id47530.diff (1 KB)
Attached To
Mode
D19910: Slightly modernize PholioImageQuery
Attached
Detach File
Event Timeline
Log In to Comment