mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 21:43:18 +00:00
Fix update sphinx
This commit is contained in:
@@ -99,7 +99,6 @@ class sphinxrt
|
||||
$cl = new SphinxClient();
|
||||
|
||||
if ($cl->Status() === false)
|
||||
|
||||
return $this;
|
||||
|
||||
$cl->SetServer($registry->get('GV_sphinx_host'), (int) $registry->get('GV_sphinx_port'));
|
||||
@@ -122,7 +121,7 @@ class sphinxrt
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function replace_in_metas($rt_id, $meta_id, $tag_id, $record_id, $sbas_id, $coll_id, $grouping, $type, Array $content, DateTime $created)
|
||||
public function replace_in_metas($rt_id, $meta_id, $tag_id, $record_id, $sbas_id, $coll_id, $grouping, $type, $content, DateTime $created)
|
||||
{
|
||||
$crc_sbas_tag = crc32($sbas_id . '_' . $tag_id);
|
||||
$crc_sbas_coll = crc32($sbas_id . '_' . $coll_id);
|
||||
@@ -131,11 +130,9 @@ class sphinxrt
|
||||
|
||||
$this->connection->beginTransaction();
|
||||
|
||||
// foreach ($content as $value)
|
||||
// {
|
||||
$sql = "REPLACE INTO " . $rt_id . " VALUES (
|
||||
'" . (int) $meta_id . "'
|
||||
,'" . str_replace("'", "\'", implode(' ', $content)) . "'
|
||||
,'" . str_replace("'", "\'", $content) . "'
|
||||
,'" . (int) $tag_id . "'
|
||||
," . (int) $record_id . "
|
||||
," . (int) $sbas_id . "
|
||||
@@ -149,7 +146,6 @@ class sphinxrt
|
||||
," . (int) $created->format('U') . " )";
|
||||
$stmt = $this->connection->prepare($sql);
|
||||
$stmt->execute();
|
||||
// }
|
||||
|
||||
$stmt->closeCursor();
|
||||
|
||||
|
Reference in New Issue
Block a user