You are here

function messaging_update_6005 in Messaging 6.4

Same name and namespace in other branches
  1. 6 messaging.install \messaging_update_6005()
  2. 6.2 messaging.install \messaging_update_6005()
  3. 6.3 messaging.install \messaging_update_6005()

Clean up message logs that were not properly cleaned before

File

./messaging.install, line 322

Code

function messaging_update_6005() {
  $ret = array();
  $ret[] = update_sql('UPDATE {messaging_store} SET log = 1 WHERE log > 1');
  $ret[] = update_sql('DELETE FROM {messaging_store} WHERE log = 1 AND queue = 0 AND sent < %d', time() - variable_get('messaging_log', 0));
  return $ret;
}