if(!empty($q['search']['filename'])){
$this->whereAdd("
- $tn.name LIKE '%{$this->escape($q['search']['filename'])}%'
- OR
- $tn.subject LIKE '%{$this->escape($q['search']['filename'])}%'
+ $tn.filename LIKE '%{$this->escape($q['search']['filename'])}%' OR $tn.title LIKE '%{$this->escape($q['search']['filename'])}%'
");
}
-
+
}
$ext = $y->toExt(trim((string) $this->mimetype ));
- if(array_pop(explode('.', $this->filename)) != $ext){
+ $explode_filename = explode('.', $this->filename);
+ if(array_pop($explode_filename) != $ext){
$this->filename = $this->filename .'.'. $ext;
}