summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-11-07 15:33:21 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-11-07 15:33:21 +0100
commit972ba89bc2abb8510810d814c08cc02c44ea533c (patch)
tree5b33afcdece7f2b165b4c597fe670b51a223c1ee /lib
parent73d59bd397ba8b54ee47e19132ec6970751ad070 (diff)
parentba62d8dea73b768afcf41b53d0dd6eb463907dee (diff)
downloadnextcloud-server-972ba89bc2abb8510810d814c08cc02c44ea533c.tar.gz
nextcloud-server-972ba89bc2abb8510810d814c08cc02c44ea533c.zip
Merge branch 'master' of github.com:owncloud/core into vcategories_db
Diffstat (limited to 'lib')
-rw-r--r--lib/filecache.php8
-rw-r--r--lib/files.php17
-rw-r--r--lib/filesystem.php4
3 files changed, 16 insertions, 13 deletions
diff --git a/lib/filecache.php b/lib/filecache.php
index 6263e03fc64..4a7dbd0250d 100644
--- a/lib/filecache.php
+++ b/lib/filecache.php
@@ -502,11 +502,11 @@ class OC_FileCache{
*/
public static function triggerUpdate($user='') {
if($user) {
- $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`="httpd/unix-directory"');
- $query->execute(array($user));
+ $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 WHERE `user`=? AND `mimetype`= ? ');
+ $query->execute(array($user,'httpd/unix-directory'));
}else{
- $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`="httpd/unix-directory"');
- $query->execute();
+ $query=OC_DB::prepare('UPDATE `*PREFIX*fscache` SET `mtime`=0 AND `mimetype`= ? ');
+ $query->execute(array('httpd/unix-directory'));
}
}
}
diff --git a/lib/files.php b/lib/files.php
index 5a14083c285..3e15c68d885 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -45,13 +45,16 @@ class OC_Files {
if (($path == '/Shared' || substr($path, 0, 8) == '/Shared/') && OC_App::isEnabled('files_sharing')) {
if ($path == '/Shared') {
list($info) = OCP\Share::getItemsSharedWith('file', OC_Share_Backend_File::FORMAT_FILE_APP_ROOT);
- }else{
- $info['size'] = OC_Filesystem::filesize($path);
- $info['mtime'] = OC_Filesystem::filemtime($path);
- $info['ctime'] = OC_Filesystem::filectime($path);
- $info['mimetype'] = OC_Filesystem::getMimeType($path);
- $info['encrypted'] = false;
- $info['versioned'] = false;
+ } else {
+ $info = array();
+ if (OC_Filesystem::file_exists($path)) {
+ $info['size'] = OC_Filesystem::filesize($path);
+ $info['mtime'] = OC_Filesystem::filemtime($path);
+ $info['ctime'] = OC_Filesystem::filectime($path);
+ $info['mimetype'] = OC_Filesystem::getMimeType($path);
+ $info['encrypted'] = false;
+ $info['versioned'] = false;
+ }
}
} else {
$info = OC_FileCache::get($path);
diff --git a/lib/filesystem.php b/lib/filesystem.php
index 4635f8b4f30..aa03593908d 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -232,8 +232,8 @@ class OC_Filesystem{
}
if(isset($mountConfig['user'])) {
- foreach($mountConfig['user'] as $user=>$mounts) {
- if($user==='all' or strtolower($user)===strtolower($user)) {
+ foreach($mountConfig['user'] as $mountUser=>$mounts) {
+ if($user==='all' or strtolower($mountUser)===strtolower($user)) {
foreach($mounts as $mountPoint=>$options) {
$mountPoint=self::setUserVars($mountPoint, $user);
foreach($options as &$option) {