function applyFilters($q, $au, $roo)
{
$tn = $this->tableName();
- echo "$tn.filename LIKE '%{$this->escape($q['search']['filename'])}%'"; die;
+
if(!empty($q['search']['filename'])){
$this->whereAdd("
- $tn.filename 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;
}