You are here

function _ed_classified_unpublish_ad in Classified Ads 6.2

Same name and namespace in other branches
  1. 5.2 ed_classified_delete.inc \_ed_classified_unpublish_ad()
  2. 5 ed_classified_delete.inc \_ed_classified_unpublish_ad()
  3. 7.2 ed_classified_delete.inc \_ed_classified_unpublish_ad()

Unpublish a node.

(Partially) lifted from spam module (jeremy [at] kerneltrap.org)

1 call to _ed_classified_unpublish_ad()
_ed_classified_expire_ads in ./ed_classified_utils.inc
expire old ads

File

./ed_classified_delete.inc, line 23
Node deletion facilities.

Code

function _ed_classified_unpublish_ad($nid) {
  $result = db_query('UPDATE {node} SET status = 0 WHERE nid = %d', $nid);
  if (_ed_classified_variable_get('log_unpublish', FALSE)) {
    _edi_wd(t('Unpublished ad nid=%nid', array(
      '%nid' => $nid,
    )), WATCHDOG_NOTICE, l(t('View ad'), "node/{$nid}"));
  }
}