You are here

class gallery_config in Node Gallery 6

Hierarchy

Expanded class hierarchy of gallery_config

File

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

View source
class gallery_config extends base {
  function save() {
    if (empty($this->data)) {
      $this->upload_settings['number_uploads'] = preg_replace("[^0-9]", "", $this->upload_settings['number_uploads']);
      foreach ((array) $this as $k => $v) {
        if ($k != 'name' || $k != 'gallery_type' || $k != 'image_type') {
          $this->data[$k] = $v;
        }
      }
    }
    $this->data = serialize($this->data);
    if (!empty($this->gallery_type) && gallery_config_gateway::get_types('gallery', $this->gallery_type)) {
      drupal_write_record('ng_gallery_config', $this, 'gallery_type');
    }
    else {
      drupal_write_record('ng_gallery_config', $this);
    }
  }
  function delete() {
    return db_query("DELETE FROM {ng_gallery_config} WHERE gallery_type = '%s'", $this->gallery_type);
  }

}

Members