improved sphinx update

This commit is contained in:
SJ 2015-09-18 15:22:42 +02:00
parent 27087ec3f6
commit 2008ba284b
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@
#define VERSION "1.2.0-master"
#define BUILD 921
#define BUILD 922
#define HOSTID "mailarchiver"

View File

@ -198,9 +198,9 @@ class ModelFolderFolder extends Model {
public function update_message_folder($id = 0, $folder_id = 0) {
$query = $this->db->query("UPDATE `" . TABLE_FOLDER_MESSAGE . "` SET folder_id=? WHERE id=?", array($folder_id, $id));
//$query = $this->sphx->query("UPDATE " . SPHINX_MAIN_INDEX . " SET folder=? WHERE id=?", array($folder_id, $id));
$query = $this->sphx->query("UPDATE " . SPHINX_MAIN_INDEX . " SET folder=$folder_id WHERE id=$id");
if($this->db->countAffected() == 0) {
$query = $this->sphx->query("UPDATE " . SPHINX_MAIN_INDEX . " SET folder=$folder_id WHERE id=$id");
}
}