function _ed_classified_unpublish_ad in Classified Ads 5
Same name and namespace in other branches
- 5.2 ed_classified_delete.inc \_ed_classified_unpublish_ad()
 - 6.2 ed_classified_delete.inc \_ed_classified_unpublish_ad()
 - 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 20  - Node deletion facilities. Michael Curry, Exodus Development, Inc. exodusdev@gmail.com for more information, please visit http://exodusdev.com Copyright (c) 2006, 2007 Exodus Development, Inc. All Rights Reserved. Licensed under the terms of the GNU…
 
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}"));
  }
}