summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2015-03-23 01:05:33 +0100
committerGeorg Ehrke <developer@georgehrke.com>2015-09-20 11:22:40 +0200
commitb3ff773bbf363e4d7d44d7c6ce7ae2eec8250cfb (patch)
treeb9434a7bb309a6ddae54a32a5db580cc523117a6 /apps/files_versions/lib
parentbbd1e996050fee80795d0e656da98b6451232c6c (diff)
downloadnextcloud-server-b3ff773bbf363e4d7d44d7c6ce7ae2eec8250cfb.tar.gz
nextcloud-server-b3ff773bbf363e4d7d44d7c6ce7ae2eec8250cfb.zip
delete cached preview when rolling back file's version
add random number using OC.parseQueryString and _.extend() version rollback: add missing prefix to OC\Preview::post_delete add test to assure that the rollback hook is called
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/storage.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php
index 6aa58c55e9b..bdf1811c5f9 100644
--- a/apps/files_versions/lib/storage.php
+++ b/apps/files_versions/lib/storage.php
@@ -315,6 +315,9 @@ class Storage {
if (self::copyFileContents($users_view, 'files_versions' . $filename . '.v' . $revision, 'files' . $filename)) {
$files_view->touch($file, $revision);
Storage::scheduleExpire($uid, $file);
+ \OC_Hook::emit('\OCP\Versions', 'rollback', array(
+ 'path' => $filename,
+ ));
return true;
} else if ($versionCreated) {
self::deleteVersion($users_view, $version);