You are here

function Image::save in Node Gallery 6

File

./node_gallery.model.inc, line 267
Node gallery module.

Class

Image

Code

function save($form) {
  module_load_include('inc', 'node', 'node.pages');
  $form_state['values'] = (array) $this;
  node_form_submit($form, $form_state);

  //insert node;
  if (empty($this->nid)) {
    $this->nid = $form_state['nid'];
  }
  file_set_status($this, FILE_STATUS_PERMANENT);
  if ($this->gid && $this->nid) {
    $this
      ->add_to_gallery();
  }
}