| | |
| | | $db = $RCMAIL->get_dbh(); |
| | | $db->db_connect('w'); |
| | | |
| | | if (!$db->is_connected() || $db->is_error()) |
| | | die("No DB connection\n"); |
| | | if (!$db->is_connected() || $db->is_error()) { |
| | | rcube::raise_error("No DB connection", false, true); |
| | | } |
| | | |
| | | if (!empty($_SERVER['argv'][1])) |
| | | $days = intval($_SERVER['argv'][1]); |
| | |
| | | |
| | | foreach (array('contacts','contactgroups','identities') as $table) { |
| | | |
| | | $sqltable = get_table_name($table); |
| | | $sqltable = $db->table_name($table); |
| | | |
| | | // also delete linked records |
| | | // could be skipped for databases which respect foreign key constraints |