Skip to content

Commit 1c9d444

Browse files
committed
Remove obsolete code
1 parent 04c3c31 commit 1c9d444

File tree

2 files changed

+9
-45
lines changed

2 files changed

+9
-45
lines changed

meta/Search.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ protected function run()
478478
);
479479

480480
$this->result = new SearchResult($res, $this->range_begin, $this->range_end, $this->columns, $pageidAndRevOnly);
481+
$res->closeCursor();
481482
}
482483

483484
/**

meta/SearchResult.php

Lines changed: 8 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ class SearchResult
2222
/**
2323
* Construct SearchResult
2424
*
25-
* @param \PDOStatemen $res
26-
* @param int $rangeBegin
27-
* @param int $rangeEnd
28-
* @param array $columns
25+
* @param \PDOStatement $res PDO statement containing the search result
26+
* @param int $rangeBegin Begin of requested result range
27+
* @param int $rangeEnd End of requested result range
28+
* @param Column[] $columns Search columns
2929
* @param bool $pageidAndRevOnly
3030
*/
3131
public function __construct($res, $rangeBegin, $rangeEnd, $columns, $pageidAndRevOnly)
@@ -55,13 +55,12 @@ public function __construct($res, $rangeBegin, $rangeEnd, $columns, $pageidAndRe
5555
continue;
5656
}
5757

58-
$this->addPid($row['PID']);
59-
$this->addRid($row['rid']);
60-
$this->addRev($row['rev']);
61-
$this->addRow($resrow);
58+
$this->pids[] = $row['PID'];
59+
$this->rids[] = $row['rid'];
60+
$this->revs[] = $row['rev'];
61+
$this->rows[] = $resrow;
6262
}
6363

64-
$res->closeCursor();
6564
$this->increaseCount();
6665
}
6766

@@ -105,42 +104,6 @@ public function getRevs(): array
105104
return $this->revs;
106105
}
107106

108-
/**
109-
* @param string $pid
110-
* @return void
111-
*/
112-
public function addPid($pid)
113-
{
114-
$this->pids[] = $pid;
115-
}
116-
117-
/**
118-
* @param int $rid
119-
* @return void
120-
*/
121-
public function addRid($rid)
122-
{
123-
$this->rids[] = $rid;
124-
}
125-
126-
/**
127-
* @param int $rev
128-
* @return void
129-
*/
130-
public function addRev($rev)
131-
{
132-
$this->revs[] = $rev;
133-
}
134-
135-
/**
136-
* @param array $result
137-
* @return void
138-
*/
139-
public function addRow($row)
140-
{
141-
$this->rows[] = $row;
142-
}
143-
144107
/**
145108
* @return void
146109
*/

0 commit comments

Comments
 (0)