Ejemplo n.º 1
0
 /**
  * Check if the same virtual hash exists more than once
  * in the database. If so, this means the file
  * is already uploaded as unencrypted.
  *  
  * @return boolean
  */
 protected function linkedRecords()
 {
     $sql = sprintf("SELECT COUNT(1) AS count FROM  %sfaqattachment WHERE virtual_hash = '%s'", PMF_Db::getTablePrefix(), $this->virtualHash);
     $result = $this->db->query($sql);
     if ($result) {
         $assoc = $this->db->fetchArray($result);
     }
     return $assoc['count'] > 1;
 }