mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 22:41:59 +01:00
Remove index from rt data when deleting an email from gui
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
41600bb8af
commit
8a75e5f62c
@ -48,6 +48,11 @@ class ControllerMessageBulkremove extends Controller {
|
||||
} else {
|
||||
AUDIT(ACTION_REMOVE_MESSAGE, '', '', $id, '');
|
||||
$db->query("UPDATE " . TABLE_META . " SET retained=? WHERE id=?", [NOW, $id]);
|
||||
if(RT) {
|
||||
$sphx = Registry::get('sphx');
|
||||
$sphx->query("DELETE FROM " . SPHINX_MAIN_INDEX . " WHERE id=" . (int)$this->data['id']);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, $this->data['username'] . " removed message: $id");
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,11 @@ class ControllerMessageRemove extends Controller {
|
||||
AUDIT(ACTION_REMOVE_MESSAGE, '', '', $id, '');
|
||||
$db->query("UPDATE " . TABLE_META . " SET retained=? WHERE id=?", [NOW, $id]);
|
||||
$db->query("UPDATE " . TABLE_DELETED . " SET deleted=1 WHERE id=?", [$id]);
|
||||
if(RT) {
|
||||
$sphx = Registry::get('sphx');
|
||||
$sphx->query("DELETE FROM " . SPHINX_MAIN_INDEX . " WHERE id=", (int)$this->data['id']);
|
||||
}
|
||||
|
||||
syslog(LOG_INFO, $this->data['username'] . " removed message: $id");
|
||||
|
||||
$this->data['x'] = $this->data['text_successfully_removed'];
|
||||
|
Loading…
Reference in New Issue
Block a user