Exemplo n.º 1
0
 function DBSave()
 {
     // validate some values before saving (fixes for mysql strict mode)
     if ($this->locked > 0) {
         return $this->TriggerLockedError();
     }
     $this->cat_exclude_browser = (int) (!empty($this->cat_exclude_browser));
     //$this->cat_required_level = intval($this->cat_required_level);
     $this->cat_parent = intval($this->cat_parent);
     $this->cat_num_files = intval($this->cat_num_files);
     $this->cat_num_files_total = intval($this->cat_num_files_total);
     return parent::DBSave();
 }
Exemplo n.º 2
0
 function DBSave()
 {
     // validate some values before saving (fixes for mysql strict mode)
     if ($this->locked > 0) {
         return $this->TriggerLockedError();
     }
     $ints = array('file_category', 'file_post_id', 'file_attach_order', 'file_wpattach_id', 'file_added_by', 'file_update_of', 'file_hits', 'file_ratings', 'file_rating_sum');
     foreach ($ints as $i) {
         $this->{$i} = (int) $this->{$i};
     }
     $this->file_offline = (int) (!empty($this->file_offline));
     $this->file_direct_linking = (int) $this->file_direct_linking;
     $this->file_force_download = (int) (!empty($this->file_force_download));
     if (empty($this->file_last_dl_time)) {
         $this->file_last_dl_time = '0000-00-00 00:00:00';
     }
     $this->file_size = 0 + $this->file_size;
     $r = parent::DBSave();
     return $r;
 }