diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-06-11 10:05:38 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-06-11 10:05:38 +0200 |
commit | 491c96eaa904e32677b0a446bfd9c662090b4382 (patch) | |
tree | 1032fa30a783ccf426d4db6bed6336ccc96201aa | |
parent | f769c52522e31869fb234461727a864546691e66 (diff) | |
parent | 9dc0befcca3e95095a217f3cecaf1d187f5d303b (diff) | |
download | nextcloud-server-491c96eaa904e32677b0a446bfd9c662090b4382.tar.gz nextcloud-server-491c96eaa904e32677b0a446bfd9c662090b4382.zip |
Merge pull request #8966 from owncloud/fix_failing_tests_on_master
Fix failing tests on master
-rw-r--r-- | apps/files_sharing/tests/api.php | 1 | ||||
-rw-r--r-- | apps/files_versions/appinfo/app.php | 2 | ||||
-rw-r--r-- | apps/files_versions/lib/hooks.php | 15 | ||||
-rw-r--r-- | apps/files_versions/lib/versions.php | 11 | ||||
-rw-r--r-- | lib/private/files/cache/storage.php | 2 |
5 files changed, 1 insertions, 30 deletions
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php index 3c683afacb4..72dd5816ea0 100644 --- a/apps/files_sharing/tests/api.php +++ b/apps/files_sharing/tests/api.php @@ -1166,7 +1166,6 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base { $query = \OCP\DB::prepare($statement); $result = $query->execute(array($shareCreated, \OCP\Share::SHARE_TYPE_LINK)); $this->assertSame(1, $result); - $statement = "UPDATE `*PREFIX*share` SET `stime` = ? WHERE `share_type` = ?"; $query = \OCP\DB::prepare($statement); $result = $query->execute(array($shareCreated, \OCP\Share::SHARE_TYPE_USER)); $this->assertSame(1, $result); diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index 8f2071dd7b6..371162cd16f 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -14,5 +14,3 @@ OCP\Util::connectHook('OC_Filesystem', 'write', "OCA\Files_Versions\Hooks", "wri OCP\Util::connectHook('OC_Filesystem', 'post_delete', "OCA\Files_Versions\Hooks", "remove_hook"); OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Files_Versions\Hooks", "pre_remove_hook"); OCP\Util::connectHook('OC_Filesystem', 'rename', "OCA\Files_Versions\Hooks", "rename_hook"); -//Listen to delete user signal -OCP\Util::connectHook('OC_User', 'pre_deleteUser', "OCA\Files_Versions\Hooks", "deleteUser_hook"); diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index 2de4001affd..990f1403e8d 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -74,19 +74,4 @@ class Hooks { } } - /** - * clean up user specific settings if user gets deleted - * @param array $params array with uid - * - * This function is connected to the pre_deleteUser signal of OC_Users - * to remove the used space for versions stored in the database - */ - public static function deleteUser_hook($params) { - - if (\OCP\App::isEnabled('files_versions')) { - $uid = $params['uid']; - Storage::deleteUser($uid); - } - } - } diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 15d0e032ea0..b912fc8ba76 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -302,17 +302,6 @@ class Storage { } /** - * deletes used space for files versions in db if user was deleted - * - * @param string $uid id of deleted user - * @return \OC_DB_StatementWrapper of db delete operation - */ - public static function deleteUser($uid) { - $query = \OC_DB::prepare('DELETE FROM `*PREFIX*files_versions` WHERE `user`=?'); - return $query->execute(array($uid)); - } - - /** * returns all stored file versions from a given user * @param string $uid id of the user * @return array with contains two arrays 'all' which contains all versions sorted by age and 'by_file' which contains all versions sorted by filename diff --git a/lib/private/files/cache/storage.php b/lib/private/files/cache/storage.php index 3a267874431..9ad31a272ea 100644 --- a/lib/private/files/cache/storage.php +++ b/lib/private/files/cache/storage.php @@ -101,7 +101,7 @@ class Storage { $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'; \OC_DB::executeAudited($sql, array($storageId)); - $numericId = self::exists($storageId); + $numericId = self::getNumericStorageId($storageId); if (!is_null($numericId)) { $sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?'; \OC_DB::executeAudited($sql, array($numericId)); |