diff options
-rw-r--r-- | apps/files_sharing/js/public.js | 4 | ||||
-rw-r--r-- | apps/files_trashbin/appinfo/database.xml | 26 | ||||
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 9 | ||||
-rw-r--r-- | lib/private/files/cache/scanner.php | 1 | ||||
-rw-r--r-- | lib/private/files/stream/quota.php | 2 | ||||
-rw-r--r-- | tests/lib/files/utils/scanner.php | 4 |
6 files changed, 9 insertions, 37 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 27e8d361ff9..a2248405d22 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -10,7 +10,9 @@ /* global FileActions, Files */ /* global dragOptions, folderDropOptions */ -OCA.Sharing = {}; +if (!OCA.Sharing) { + OCA.Sharing = {}; +} if (!OCA.Files) { OCA.Files = {}; } diff --git a/apps/files_trashbin/appinfo/database.xml b/apps/files_trashbin/appinfo/database.xml index db104ee9298..a6ba242c1cf 100644 --- a/apps/files_trashbin/appinfo/database.xml +++ b/apps/files_trashbin/appinfo/database.xml @@ -89,30 +89,4 @@ </table> - <table> - - <name>*dbprefix*files_trashsize</name> - - <declaration> - - <field> - <name>user</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>64</length> - </field> - - <field> - <name>size</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>50</length> - </field> - - </declaration> - - </table> - </database> diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index a8e66b06bbd..1838c48d95d 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -655,17 +655,12 @@ class Trashbin { /** * deletes used space for trash bin in db if user was deleted * - * @param type $uid id of deleted user + * @param string $uid id of deleted user * @return bool result of db delete operation */ public static function deleteUser($uid) { $query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trash` WHERE `user`=?'); - $result = $query->execute(array($uid)); - if ($result) { - $query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_trashsize` WHERE `user`=?'); - return $query->execute(array($uid)); - } - return false; + return $query->execute(array($uid)); } /** diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 0c59e57d839..965013c5c98 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -121,6 +121,7 @@ class Scanner extends BasicEmitter { } // only reuse data if the file hasn't explicitly changed if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) { + $data['mtime'] = $cacheData['mtime']; if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) { $data['size'] = $cacheData['size']; } diff --git a/lib/private/files/stream/quota.php b/lib/private/files/stream/quota.php index 60e60da8e67..bb4623b1a7b 100644 --- a/lib/private/files/stream/quota.php +++ b/lib/private/files/stream/quota.php @@ -123,7 +123,7 @@ class Quota { } public function stream_lock($mode) { - flock($this->source, $mode); + return flock($this->source, $mode); } public function stream_flush() { diff --git a/tests/lib/files/utils/scanner.php b/tests/lib/files/utils/scanner.php index 159a2a48677..5e5cc6ac128 100644 --- a/tests/lib/files/utils/scanner.php +++ b/tests/lib/files/utils/scanner.php @@ -112,7 +112,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { $this->assertEquals(array('/foo', '/foo/folder', '/foo/folder/bar.txt', '/foo/foo.txt'), $changes); $this->assertEquals(array('/', '/foo', '/foo/folder'), $parents); - $cache->put('foo.txt', array('mtime' => time() - 50)); + $cache->put('foo.txt', array('storage_mtime' => time() - 50)); $propagator = $this->getMock('\OC\Files\Cache\ChangePropagator', array('propagateChanges'), array(), '', false); $scanner->setPropagator($propagator); @@ -128,7 +128,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { $scanner->setPropagator($originalPropagator); $oldInfo = $cache->get(''); - $cache->put('foo.txt', array('mtime' => time() - 70)); + $cache->put('foo.txt', array('storage_mtime' => time() - 70)); $storage->file_put_contents('foo.txt', 'asdasd'); $scanner->scan(''); |