/** * Update package size and hash. */ protected function update_package_stats() { $sql_ary = array('filesize' => $this->package->get_size(), 'hash' => $this->package->get_md5_hash()); // Update the attachment MD5 and filesize, it may have changed $sql = 'UPDATE ' . TITANIA_ATTACHMENTS_TABLE . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . ' WHERE attachment_id = ' . (int) $this->attachment->get_id(); $this->db->sql_query($sql); }