| 1 |
<?php |
<?php |
| 2 |
// $Id: sale.module,v 1.1.2.5 2007/07/18 18:04:49 darrenoh Exp $ |
// $Id: sale.module,v 1.1.2.6 2007/07/30 17:13:36 darrenoh Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_help(). |
* Implementation of hook_help(). |
| 144 |
*/ |
*/ |
| 145 |
function sale_cron() { |
function sale_cron() { |
| 146 |
if (module_exists('cart')) { |
if (module_exists('cart')) { |
| 147 |
db_query("DELETE FROM {ec_cart} WHERE nid IN(SELECT nid FROM {sale_product} WHERE sale_closes = 1 AND sale_closing_date < %d)", time()); |
db_query("DELETE FROM {ec_cart} WHERE nid IN(SELECT nid FROM {sale_items} WHERE sale_closes = 1 AND sale_closing_date < %d)", time()); |
| 148 |
cache_clear_all(); |
cache_clear_all(); |
| 149 |
} |
} |
| 150 |
} |
} |