Skip to content
Snippets Groups Projects
Commit ca9b4e46 authored by Bartek Przybylski's avatar Bartek Przybylski
Browse files

filescan by mimetype scan

parent 84d6c539
No related branches found
No related tags found
No related merge requests found
......@@ -540,14 +540,15 @@ class OC_FileCache{
}elseif($root=='/'){
$root='';
}
$rootLen=strlen($root);
$rootLen=strlen($root);
$root .= '%';
$user=OC_User::getUser();
if(!$part2){
$query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimepart=? AND user=?');
$result=$query->execute(array($part1,$user));
$query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimepart=? AND user=? AND path LIKE ?');
$result=$query->execute(array($part1,$user, $root));
}else{
$query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimetype=? AND user=?');
$result=$query->execute(array($part1.'/'.$part2,$user));
$query=OC_DB::prepare('SELECT path FROM *PREFIX*fscache WHERE mimetype=? AND user=? AND path LIKE ? ');
$result=$query->execute(array($part1.'/'.$part2,$user, $root));
}
$names=array();
while($row=$result->fetchRow()){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment