Fix update sphinx

This commit is contained in:
Romain Neutron
2012-03-07 11:46:01 +01:00
parent 76c0ece4ee
commit d02b04ece6

View File

@@ -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();