Skip to content
Snippets Groups Projects
Commit 0c0ae928 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

escape all identifiers with backticks

parent 63d6884e
Branches
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ class OC_FileCache{ ...@@ -59,7 +59,7 @@ class OC_FileCache{
$root=''; $root='';
} }
$path=$root.$path; $path=$root.$path;
$query=OC_DB::prepare('SELECT ctime,mtime,mimetype,size,encrypted,versioned,writable FROM *PREFIX*fscache WHERE path_hash=?'); $query=OC_DB::prepare('SELECT `ctime`,`mtime`,`mimetype`,`size`,`encrypted`,`versioned`,`writable` FROM `*PREFIX*fscache` WHERE `path_hash`=?');
$result=$query->execute(array(md5($path)))->fetchRow(); $result=$query->execute(array(md5($path)))->fetchRow();
if(is_array($result)){ if(is_array($result)){
return $result; return $result;
...@@ -206,12 +206,12 @@ class OC_FileCache{ ...@@ -206,12 +206,12 @@ class OC_FileCache{
$path=$root.$file; $path=$root.$file;
self::delete(self::getFileId($path)); self::delete(self::getFileId($path));
}elseif($file!=-1){ }elseif($file!=-1){
$query=OC_DB::prepare('SELECT id FROM *PREFIX*fscache WHERE parent=?'); $query=OC_DB::prepare('SELECT `id` FROM `*PREFIX*fscache` WHERE `parent`=?');
$result=$query->execute(array($file)); $result=$query->execute(array($file));
while($child=$result->fetchRow()){ while($child=$result->fetchRow()){
self::delete(intval($child['id'])); self::delete(intval($child['id']));
} }
$query=OC_DB::prepare('DELETE FROM *PREFIX*fscache WHERE id=?'); $query=OC_DB::prepare('DELETE FROM `*PREFIX*fscache` WHERE `id`=?');
$query->execute(array($file)); $query->execute(array($file));
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment