Code standards
This commit is contained in:
parent
5a33a494e8
commit
39e1f2c0fc
1 changed files with 10 additions and 5 deletions
|
@ -47,10 +47,10 @@ class SearchIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
$search = [
|
$search = [
|
||||||
'uri-id' => $uri_id,
|
'uri-id' => $uri_id,
|
||||||
'network' => $network,
|
'network' => $network,
|
||||||
'private' => $private,
|
'private' => $private,
|
||||||
'created' => $created,
|
'created' => $created,
|
||||||
'searchtext' => Post\Engagement::getSearchTextForUriId($uri_id, $refresh),
|
'searchtext' => Post\Engagement::getSearchTextForUriId($uri_id, $refresh),
|
||||||
];
|
];
|
||||||
return DBA::insert('post-searchindex', $search, Database::INSERT_UPDATE);
|
return DBA::insert('post-searchindex', $search, Database::INSERT_UPDATE);
|
||||||
|
@ -66,7 +66,12 @@ class SearchIndex
|
||||||
$searchtext = Post\Engagement::getSearchTextForUriId($uri_id, true);
|
$searchtext = Post\Engagement::getSearchTextForUriId($uri_id, true);
|
||||||
return DBA::update('post-searchindex', ['searchtext' => $searchtext], ['uri-id' => $uri_id]);
|
return DBA::update('post-searchindex', ['searchtext' => $searchtext], ['uri-id' => $uri_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Expire old searchindex entries
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public static function expire()
|
public static function expire()
|
||||||
{
|
{
|
||||||
$limit = self::searchAgeDateLimit();
|
$limit = self::searchAgeDateLimit();
|
||||||
|
|
Loading…
Reference in a new issue