diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-15 20:48:32 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-15 20:48:32 +0200 |
commit | fbd45a939fc52bf2e2865a35122b8abbb009b2b4 (patch) | |
tree | ca1da42f1e7eef36cc53706ab81b16a78c288d52 /apps | |
parent | aa7ce480f4c83f6430eb019cfa172553b5578769 (diff) | |
parent | f06c08a63742de9adea4a146a4480b71ad254f20 (diff) | |
download | nextcloud-server-fbd45a939fc52bf2e2865a35122b8abbb009b2b4.tar.gz nextcloud-server-fbd45a939fc52bf2e2865a35122b8abbb009b2b4.zip |
Merge branch 'master' into calendar_repeat
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/ajax/upload.php | 2 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 2 | ||||
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/sharedstorage.php | 9 |
4 files changed, 12 insertions, 3 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index d6c799af32c..b779924cfb4 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -48,7 +48,7 @@ if(strpos($dir,'..') === false){ for($i=0;$i<$fileCount;$i++){ $target = OCP\Files::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]); if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){ - $meta=OC_FileCache::getCached($target); + $meta=OC_FileCache_Cached::get($target); $result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>basename($target)); } } diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index deec640bc12..4dc05088eed 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -141,7 +141,7 @@ $(document).ready(function(){ var downloadScope = 'file'; } FileActions.register(downloadScope,'Download',function(){return OC.imagePath('core','actions/download')},function(filename){ - window.location=OC.filePath('files', 'ajax', 'download.php') + '?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()); + window.location=OC.filePath('files', 'ajax', 'download.php') + encodeURIComponent('?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val())); }); }); diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 9fd57c0f02b..ad9bcf55f2b 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -59,7 +59,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ * @return bool */ private static function isEncrypted($path){ - $metadata=OC_FileCache::getCached($path,''); + $metadata=OC_FileCache_Cached::get($path,''); return isset($metadata['encrypted']) and (bool)$metadata['encrypted']; } diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php index 3bb6e73035e..1a6942ad160 100644 --- a/apps/files_sharing/sharedstorage.php +++ b/apps/files_sharing/sharedstorage.php @@ -512,6 +512,15 @@ class OC_Filestorage_Shared extends OC_Filestorage { OC_Filesystem::mount('OC_Filestorage_Shared', array('datadir' => '/'.OCP\USER::getUser().'/files/Shared'), '/'.OCP\USER::getUser().'/files/Shared/'); } + /** + * check if a file or folder has been updated since $time + * @param int $time + * @return bool + */ + public function hasUpdated($path,$time){ + //TODO + return $this->filemtime($path)>$time; + } } if (OCP\USER::isLoggedIn()) { |