we don't need to check permissions twice

This commit is contained in:
Bjoern Schiessle 2016-07-01 18:48:48 +02:00
parent 5b4cea4b36
commit 4a4cac611f
1 changed files with 2 additions and 4 deletions

View File

@ -313,6 +313,7 @@ class Storage {
*
* @param string $file file name
* @param int $revision revision timestamp
* @return bool
*/
public static function rollback($file, $revision) {
@ -323,13 +324,10 @@ class Storage {
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);