function _ed_classified_expire_ads in Classified Ads 5.2
Same name and namespace in other branches
- 5 ed_classified_utils.inc \_ed_classified_expire_ads()
- 6.2 ed_classified_utils.inc \_ed_classified_expire_ads()
- 7.2 ed_classified_utils.inc \_ed_classified_expire_ads()
expire old ads
1 call to _ed_classified_expire_ads()
- ed_classified_cron in ./
ed_classified.module - Implementation of hook_cron().
File
- ./
ed_classified_utils.inc, line 231 - Simple text-based classified ads module. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com/drupal/modules/classified.module Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights…
Code
function _ed_classified_expire_ads($time) {
// mark ads matching criteria. Set $node->status=>unpublished,
$query = _ed_classified_get_aged_ads(0, $time, 1);
// get published but old ads
while ($node = db_fetch_object($query)) {
_ed_classified_unpublish_ad($node->nid);
_ed_classified_notify_user_of_ad_expiration($node);
}
}