mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
Remove all application callers to "putInSet()"
Summary: Ref T13218. This is the last public-facing API call for `loadRelatives/loadOneRelative`. This just "primed" objects to make the other calls work and had no direct effects. Test Plan: - Ran `bin/fact analyze`. - Used `bin/storage upgrade -f --apply` to apply `20181031.board.01.queryreset.php`, which uses `LiskMigrationIterator`. - Browsed user list. Reviewers: amckinley Reviewed By: amckinley Subscribers: yelirekim Maniphest Tasks: T13218 Differential Revision: https://secure.phabricator.com/D19878
This commit is contained in:
parent
793f185d29
commit
02933acbd5
3 changed files with 5 additions and 19 deletions
|
@ -12,11 +12,8 @@ final class PhabricatorFactUpdateIterator extends PhutilBufferedIterator {
|
||||||
private $position;
|
private $position;
|
||||||
private $ignoreUpdatesDuration = 15;
|
private $ignoreUpdatesDuration = 15;
|
||||||
|
|
||||||
private $set;
|
|
||||||
|
|
||||||
public function __construct(LiskDAO $object) {
|
public function __construct(LiskDAO $object) {
|
||||||
$this->set = new LiskDAOSet();
|
$this->object = $object;
|
||||||
$this->object = $object->putInSet($this->set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setPosition($position) {
|
public function setPosition($position) {
|
||||||
|
@ -41,8 +38,6 @@ final class PhabricatorFactUpdateIterator extends PhutilBufferedIterator {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function loadPage() {
|
protected function loadPage() {
|
||||||
$this->set->clearSet();
|
|
||||||
|
|
||||||
if ($this->object->hasProperty('dateModified')) {
|
if ($this->object->hasProperty('dateModified')) {
|
||||||
if ($this->cursor) {
|
if ($this->cursor) {
|
||||||
list($after_epoch, $after_id) = explode(':', $this->cursor);
|
list($after_epoch, $after_id) = explode(':', $this->cursor);
|
||||||
|
|
|
@ -163,14 +163,7 @@ final class PhabricatorPeopleQuery
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function loadPage() {
|
protected function loadPage() {
|
||||||
$table = new PhabricatorUser();
|
return $this->loadStandardPage($this->newResultObject());
|
||||||
$data = $this->loadStandardPageRows($table);
|
|
||||||
|
|
||||||
if ($this->needPrimaryEmail) {
|
|
||||||
$table->putInSet(new LiskDAOSet());
|
|
||||||
}
|
|
||||||
|
|
||||||
return $table->loadAllFromArray($data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function didFilterPage(array $users) {
|
protected function didFilterPage(array $users) {
|
||||||
|
|
|
@ -17,11 +17,9 @@ final class LiskMigrationIterator extends PhutilBufferedIterator {
|
||||||
|
|
||||||
private $object;
|
private $object;
|
||||||
private $cursor;
|
private $cursor;
|
||||||
private $set;
|
|
||||||
|
|
||||||
public function __construct(LiskDAO $object) {
|
public function __construct(LiskDAO $object) {
|
||||||
$this->set = new LiskDAOSet();
|
$this->object = $object;
|
||||||
$this->object = $object->putInSet($this->set);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function didRewind() {
|
protected function didRewind() {
|
||||||
|
@ -33,15 +31,15 @@ final class LiskMigrationIterator extends PhutilBufferedIterator {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function loadPage() {
|
protected function loadPage() {
|
||||||
$this->set->clearSet();
|
|
||||||
|
|
||||||
$results = $this->object->loadAllWhere(
|
$results = $this->object->loadAllWhere(
|
||||||
'id > %d ORDER BY id ASC LIMIT %d',
|
'id > %d ORDER BY id ASC LIMIT %d',
|
||||||
$this->cursor,
|
$this->cursor,
|
||||||
$this->getPageSize());
|
$this->getPageSize());
|
||||||
|
|
||||||
if ($results) {
|
if ($results) {
|
||||||
$this->cursor = last($results)->getID();
|
$this->cursor = last($results)->getID();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $results;
|
return $results;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue