diff options
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/ajax/expireAll.php | 2 | ||||
-rw-r--r-- | apps/files_versions/ajax/rollbackVersion.php | 2 | ||||
-rw-r--r-- | apps/files_versions/lib/hooks.php | 4 | ||||
-rw-r--r-- | apps/files_versions/lib/versions.php | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_versions/ajax/expireAll.php b/apps/files_versions/ajax/expireAll.php index f76da3da986..5c95885ffbd 100644 --- a/apps/files_versions/ajax/expireAll.php +++ b/apps/files_versions/ajax/expireAll.php @@ -31,7 +31,7 @@ OCP\JSON::callCheck(); $versions = new OCA_Versions\Storage(); -if( $versions->expireAll() ){ +if( $versions->expireAll() ) { OCP\JSON::success(); die(); diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php index 24d71a914a4..f1b02eb4b92 100644 --- a/apps/files_versions/ajax/rollbackVersion.php +++ b/apps/files_versions/ajax/rollbackVersion.php @@ -9,7 +9,7 @@ $file = $_GET['file']; $revision=(int)$_GET['revision']; if( OCA_Versions\Storage::isversioned( $file ) ) { - if(OCA_Versions\Storage::rollback( $file, $revision )){ + if(OCA_Versions\Storage::rollback( $file, $revision )) { OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file ))); }else{ OCP\JSON::error(array("data" => array( "message" => "Could not revert:" . $file ))); diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index 330f10afb59..9ec0b01a7f9 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -44,7 +44,7 @@ class Hooks { $abs_path = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$rel_path.'.v'; if(Storage::isversioned($rel_path)) { $versions = Storage::getVersions($rel_path); - foreach ($versions as $v){ + foreach ($versions as $v) { unlink($abs_path . $v['version']); } } @@ -66,7 +66,7 @@ class Hooks { $info=pathinfo($abs_newpath); if(!file_exists($info['dirname'])) mkdir($info['dirname'],0700,true); $versions = Storage::getVersions($rel_oldpath); - foreach ($versions as $v){ + foreach ($versions as $v) { rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']); } } diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 4ea1a07b942..dedd83fc25a 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -82,7 +82,7 @@ class Storage { } // check if filename is a directory - if($files_view->is_dir($filename)){ + if($files_view->is_dir($filename)) { return false; } @@ -97,7 +97,7 @@ class Storage { } // check filesize - if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)){ + if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) { return false; } @@ -107,7 +107,7 @@ class Storage { $matches=glob($versionsFolderName.'/'.$filename.'.v*'); sort($matches); $parts=explode('.v',end($matches)); - if((end($parts)+Storage::DEFAULTMININTERVAL)>time()){ + if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) { return false; } } @@ -175,7 +175,7 @@ class Storage { // check for old versions $matches=glob($versionsFolderName.$filename.'.v*'); - if(count($matches)>0){ + if(count($matches)>0) { return true; }else{ return false; |