From 336934a4b41eed8cc1736e2f6d988017e1fd07a2 Mon Sep 17 00:00:00 2001 From: Exile Date: Sat, 2 Aug 2014 00:58:01 +0400 Subject: [PATCH] r593 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Переименование файла с API Sphinx, удаление более неиспользуемой функции. Обновление версии API завершено. --- upload/includes/{sphinxapi.php => api.sphinx.php} | 0 upload/includes/functions.php | 9 +-------- 2 files changed, 1 insertion(+), 8 deletions(-) rename upload/includes/{sphinxapi.php => api.sphinx.php} (100%) diff --git a/upload/includes/sphinxapi.php b/upload/includes/api.sphinx.php similarity index 100% rename from upload/includes/sphinxapi.php rename to upload/includes/api.sphinx.php diff --git a/upload/includes/functions.php b/upload/includes/functions.php index df466b3ff..1faf95ed5 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2510,14 +2510,11 @@ function init_sphinx () if (!isset($sphinx)) { - require(INC_DIR .'sphinxapi.php'); + require(INC_DIR .'api.sphinx.php'); $sphinx = new SphinxClient(); $sphinx->SetConnectTimeout(5); -# $sphinx->SetMaxQueryTime(2); $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); } - 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 (!empty($result['matches']))