Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14122192
D18727.id44954.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
D18727.id44954.diff
View Options
diff --git a/src/applications/differential/query/DifferentialRevisionQuery.php b/src/applications/differential/query/DifferentialRevisionQuery.php
--- a/src/applications/differential/query/DifferentialRevisionQuery.php
+++ b/src/applications/differential/query/DifferentialRevisionQuery.php
@@ -38,8 +38,6 @@
private $needDrafts;
private $needFlags;
- private $buildingGlobalOrder;
-
/* -( Query Configuration )------------------------------------------------ */
@@ -484,12 +482,11 @@
}
if (count($selects) > 1) {
- $this->buildingGlobalOrder = true;
$query = qsprintf(
$conn_r,
'%Q %Q %Q',
implode(' UNION DISTINCT ', $selects),
- $this->buildOrderClause($conn_r),
+ $this->buildOrderClause($conn_r, true),
$this->buildLimitClause($conn_r));
} else {
$query = head($selects);
@@ -513,7 +510,6 @@
$group_by = $this->buildGroupClause($conn_r);
$having = $this->buildHavingClause($conn_r);
- $this->buildingGlobalOrder = false;
$order_by = $this->buildOrderClause($conn_r);
$limit = $this->buildLimitClause($conn_r);
@@ -758,17 +754,9 @@
}
public function getOrderableColumns() {
- $primary = ($this->buildingGlobalOrder ? null : 'r');
-
return array(
- 'id' => array(
- 'table' => $primary,
- 'column' => 'id',
- 'type' => 'int',
- 'unique' => true,
- ),
'updated' => array(
- 'table' => $primary,
+ 'table' => $this->getPrimaryTableAlias(),
'column' => 'dateModified',
'type' => 'int',
),
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 3:59 PM (4 h, 29 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6809746
Default Alt Text
D18727.id44954.diff (1 KB)
Attached To
Mode
D18727: Simplify UNION/ORDER query construction in DifferentialRevisionQuery
Attached
Detach File
Event Timeline
Log In to Comment