Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions apps/files_versions/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ public static function renameOrCopy($sourcePath, $targetPath, $operation) {
*
* @param string $file file name
* @param int $revision revision timestamp
* @return bool
*/
public static function rollback($file, $revision) {

Expand All @@ -323,13 +324,10 @@ public static function rollback($file, $revision) {
if ($uid === null || trim($filename, '/') === '') {
return false;
}

$users_view = new View('/'.$uid);
$files_view = new View('/'. User::getUser().'/files');

if (!$files_view->isUpdatable($filename)) {
return false;
}

$versionCreated = false;

$fileInfo = $files_view->getFileInfo($file);
Expand Down