mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
r593
Переименование файла с API Sphinx, удаление более неиспользуемой функции. Обновление версии API завершено.
This commit is contained in:
parent
a4c4d7fb48
commit
336934a4b4
2 changed files with 1 additions and 8 deletions
|
@ -2510,14 +2510,11 @@ function init_sphinx ()
|
||||||
|
|
||||||
if (!isset($sphinx))
|
if (!isset($sphinx))
|
||||||
{
|
{
|
||||||
require(INC_DIR .'sphinxapi.php');
|
require(INC_DIR .'api.sphinx.php');
|
||||||
$sphinx = new SphinxClient();
|
$sphinx = new SphinxClient();
|
||||||
|
|
||||||
$sphinx->SetConnectTimeout(5);
|
$sphinx->SetConnectTimeout(5);
|
||||||
# $sphinx->SetMaxQueryTime(2);
|
|
||||||
$sphinx->SetRankingMode(SPH_RANK_NONE);
|
$sphinx->SetRankingMode(SPH_RANK_NONE);
|
||||||
# $sphinx->SetMatchMode(SPH_MATCH_BOOLEAN);
|
|
||||||
# $sphinx->SetSortMode($mode, $sortby="");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2553,10 +2550,6 @@ function get_title_match_topics ($title_match_sql, $forum_ids = array())
|
||||||
{
|
{
|
||||||
$sphinx->SetFilter('forum_id', $forum_ids, false);
|
$sphinx->SetFilter('forum_id', $forum_ids, false);
|
||||||
}
|
}
|
||||||
if (preg_match('#^"[^"]+"$#u', $title_match_sql))
|
|
||||||
{
|
|
||||||
$sphinx->SetMatchMode(SPH_MATCH_PHRASE);
|
|
||||||
}
|
|
||||||
if ($result = $sphinx->Query($title_match_sql, $where, $userdata['username'] .' ('. CLIENT_IP .')'))
|
if ($result = $sphinx->Query($title_match_sql, $where, $userdata['username'] .' ('. CLIENT_IP .')'))
|
||||||
{
|
{
|
||||||
if (!empty($result['matches']))
|
if (!empty($result['matches']))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue