1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 10:42:41 +01:00

Fix a content join condition in Phriction

After the cursor changes, we may fatal on pages with a large number of children
because "c.title" is not a selected column. We currently join the "content"
table if "updated" is part of the order vector, but not if "title" is part of
the order vector. This isn't right: "updated" is on the primary table, and only
"content" is on the joined table.
This commit is contained in:
epriestley 2019-03-23 07:15:40 -07:00
parent b90e02bec2
commit c16a8c7ab2

View file

@ -193,7 +193,11 @@ final class PhrictionDocumentQuery
} }
private function shouldJoinContentTable() { private function shouldJoinContentTable() {
return $this->getOrderVector()->containsKey('updated'); if ($this->getOrderVector()->containsKey('title')) {
return true;
}
return false;
} }
protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) {