add hostPage weight and rank info

This commit is contained in:
ghost 2023-04-25 16:53:13 +03:00
parent d20487acfd
commit 57f64f6b90

View File

@ -35,11 +35,13 @@ if (API_ENABLED) {
// Generate results // Generate results
$dbResults = []; $dbResults = [];
foreach ($sphinxResults as $sphinxResult) { foreach ($sphinxResults as $i => $sphinxResult) {
if ($hostPage = $db->getFoundHostPage($sphinxResult->id)) { if ($hostPage = $db->getFoundHostPage($sphinxResult->id)) {
$dbResults[] = $hostPage; $dbResults[$i] = $hostPage;
$dbResults[$i]->weight = $sphinxResult->weight;
} }
} }