mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Guarantee that Maniphest paging clauses strictly progress
Ref T7548. Some of these clauses are not guaranteed to select only rows following the cursor.
This commit is contained in:
parent
4c46aedde9
commit
77e0a4abba
1 changed files with 7 additions and 15 deletions
|
@ -1054,11 +1054,6 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
|||
$app_columns = $this->buildApplicationSearchPagination($conn_r, $cursor);
|
||||
if ($app_columns) {
|
||||
$columns = array_merge($columns, $app_columns);
|
||||
$columns[] = array(
|
||||
'name' => 'task.id',
|
||||
'value' => (int)$cursor->getID(),
|
||||
'type' => 'int',
|
||||
);
|
||||
} else {
|
||||
switch ($this->orderBy) {
|
||||
case self::ORDER_PRIORITY:
|
||||
|
@ -1082,11 +1077,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
|||
);
|
||||
break;
|
||||
case self::ORDER_CREATED:
|
||||
$columns[] = array(
|
||||
'name' => 'task.id',
|
||||
'value' => (int)$cursor->getID(),
|
||||
'type' => 'int',
|
||||
);
|
||||
// This just uses the ID column, below.
|
||||
break;
|
||||
case self::ORDER_MODIFIED:
|
||||
$columns[] = array(
|
||||
|
@ -1101,17 +1092,18 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
|||
'value' => $cursor->getTitle(),
|
||||
'type' => 'string',
|
||||
);
|
||||
$columns[] = array(
|
||||
'name' => 'task.id',
|
||||
'value' => $cursor->getID(),
|
||||
'type' => 'int',
|
||||
);
|
||||
break;
|
||||
default:
|
||||
throw new Exception("Unknown order query '{$this->orderBy}'!");
|
||||
}
|
||||
}
|
||||
|
||||
$columns[] = array(
|
||||
'name' => 'task.id',
|
||||
'value' => $cursor->getID(),
|
||||
'type' => 'int',
|
||||
);
|
||||
|
||||
return $this->buildPagingClauseFromMultipleColumns(
|
||||
$conn_r,
|
||||
$columns,
|
||||
|
|
Loading…
Reference in a new issue