Skip to content

Commit

Permalink
Remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
annda committed Feb 13, 2024
1 parent 04c3c31 commit 1c9d444
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 45 deletions.
1 change: 1 addition & 0 deletions meta/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ protected function run()
);

$this->result = new SearchResult($res, $this->range_begin, $this->range_end, $this->columns, $pageidAndRevOnly);
$res->closeCursor();
}

/**
Expand Down
53 changes: 8 additions & 45 deletions meta/SearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class SearchResult
/**
* Construct SearchResult
*
* @param \PDOStatemen $res
* @param int $rangeBegin
* @param int $rangeEnd
* @param array $columns
* @param \PDOStatement $res PDO statement containing the search result
* @param int $rangeBegin Begin of requested result range
* @param int $rangeEnd End of requested result range
* @param Column[] $columns Search columns
* @param bool $pageidAndRevOnly
*/
public function __construct($res, $rangeBegin, $rangeEnd, $columns, $pageidAndRevOnly)
Expand Down Expand Up @@ -55,13 +55,12 @@ public function __construct($res, $rangeBegin, $rangeEnd, $columns, $pageidAndRe
continue;
}

$this->addPid($row['PID']);
$this->addRid($row['rid']);
$this->addRev($row['rev']);
$this->addRow($resrow);
$this->pids[] = $row['PID'];
$this->rids[] = $row['rid'];
$this->revs[] = $row['rev'];
$this->rows[] = $resrow;
}

$res->closeCursor();
$this->increaseCount();
}

Expand Down Expand Up @@ -105,42 +104,6 @@ public function getRevs(): array
return $this->revs;
}

/**
* @param string $pid
* @return void
*/
public function addPid($pid)
{
$this->pids[] = $pid;
}

/**
* @param int $rid
* @return void
*/
public function addRid($rid)
{
$this->rids[] = $rid;
}

/**
* @param int $rev
* @return void
*/
public function addRev($rev)
{
$this->revs[] = $rev;
}

/**
* @param array $result
* @return void
*/
public function addRow($row)
{
$this->rows[] = $row;
}

/**
* @return void
*/
Expand Down

0 comments on commit 1c9d444

Please sign in to comment.