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

add proper logging to filecache

parent 87b7a236
No related branches found
No related tags found
No related merge requests found
......@@ -18,8 +18,19 @@ class OC_FileCache_Cached{
$root=OC_Filesystem::getRoot();
}
$path=$root.$path;
$query=OC_DB::prepare('SELECT `path`,`ctime`,`mtime`,`mimetype`,`size`,`encrypted`,`versioned`,`writable` FROM `*PREFIX*fscache` WHERE `path_hash`=?');
$result=$query->execute(array(md5($path)))->fetchRow();
$stmt=OC_DB::prepare('SELECT `path`,`ctime`,`mtime`,`mimetype`,`size`,`encrypted`,`versioned`,`writable` FROM `*PREFIX*fscache` WHERE `path_hash`=?');
if ( ! OC_DB::isError($stmt) ) {
$result=$stmt->execute(array(md5($path)));
if ( ! OC_DB::isError($result) ) {
$result = $result->fetchRow();
} else {
OC:Log::write('OC_FileCache_Cached', 'could not execute get: '. OC_DB::getErrorMessage($result), OC_Log::ERROR);
$result = false;
}
} else {
OC_Log::write('OC_FileCache_Cached', 'could not prepare get: '. OC_DB::getErrorMessage($stmt), OC_Log::ERROR);
$result = false;
}
if(is_array($result)) {
if(isset(self::$savedData[$path])) {
$result=array_merge($result, self::$savedData[$path]);
......
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