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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user