You are here

function ed_classified_submit in Classified Ads 7.2

Same name and namespace in other branches
  1. 5.2 ed_classified.module \ed_classified_submit()
  2. 6.2 ed_classified.module \ed_classified_submit()

Implementation of hook_submit() Crucial for 5.x, but removed in 6.x This hook will only trigger in Drupal 5.x

File

./ed_classified.module, line 856
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_submit(&$node) {
  $form = array();
  $form_state = array();
  $form['#node'] = $node;
  $form['#post']['taxonomy'] = $node->taxonomy[_ed_classified_get_vid()];
  $form_state['values']['reset_expiration'] = $node->reset_expiration;
  $form_state['values']['expires_on'] = $node->expires_on;
  $form_state['values']['status'] = $node->status;

  // Do the real work in a Drupal x.x way
  _ed_classified_form_submit($form, $form_state);
  $node->expires_on = $form_state['values']['expires_on'];
  $node->status = $form_state['values']['status'];
}