Exemplo n.º 1
0
Arquivo: file.php Projeto: Jintha/cama
 /**
  * Register a download against the file
  *
  * @return void
  **/
 function hit($version = '')
 {
     global $wpdb;
     if ($version == '') {
         $version = $this->version_id;
     }
     $wpdb->query("UPDATE {$wpdb->prefix}drainhole_files SET hits=hits+1 WHERE id='{$this->id}'");
     $wpdb->query("UPDATE {$wpdb->prefix}drainhole_version SET hits=hits+1 WHERE id='{$version}'");
     return DH_Access::create($this->id, $version);
 }