summaryrefslogtreecommitdiffstats
path: root/apps/files_versions
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-07-09 16:51:16 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-07-09 16:51:16 +0200
commite59a1806cf676dad9256ad3adb83a6e9530b7612 (patch)
treea702cd86c7b5708ace23ab87911691d33caa972d /apps/files_versions
parentb67199bb452483ec7d3c3d338b2f3a0c667e42e7 (diff)
downloadnextcloud-server-e59a1806cf676dad9256ad3adb83a6e9530b7612.tar.gz
nextcloud-server-e59a1806cf676dad9256ad3adb83a6e9530b7612.zip
remove superfluous ?> at the end of .php files (left out apps/*/templates)
Diffstat (limited to 'apps/files_versions')
-rw-r--r--apps/files_versions/ajax/togglesettings.php2
-rw-r--r--apps/files_versions/history.php2
-rw-r--r--apps/files_versions/lib/hooks.php72
-rw-r--r--apps/files_versions/settings.php1
4 files changed, 35 insertions, 42 deletions
diff --git a/apps/files_versions/ajax/togglesettings.php b/apps/files_versions/ajax/togglesettings.php
index d513d12dd6c..86f614c5c89 100644
--- a/apps/files_versions/ajax/togglesettings.php
+++ b/apps/files_versions/ajax/togglesettings.php
@@ -7,5 +7,3 @@ if (OCP\Config::getSystemValue('versions', 'true')=='true') {
} else {
OCP\Config::setSystemValue('versions', 'true');
}
-
-?>
diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php
index e3332d7cdb6..b2ae8d232e4 100644
--- a/apps/files_versions/history.php
+++ b/apps/files_versions/history.php
@@ -71,5 +71,3 @@ if ( isset( $_GET['path'] ) ) {
}
$tmpl->printPage( );
-
-?>
diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php
index b43fdb9fd33..f93d4dabe22 100644
--- a/apps/files_versions/lib/hooks.php
+++ b/apps/files_versions/lib/hooks.php
@@ -30,43 +30,41 @@ class Hooks {
}
}
- /**
- * @brief Erase versions of deleted file
- * @param array
- *
- * This function is connected to the delete signal of OC_Filesystem
- * cleanup the versions directory if the actual file gets deleted
- */
- public static function remove_hook($params) {
- $rel_path = $params['path'];
- $abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_path.'.v';
- if(Storage::isversioned($rel_path)) {
- $versions = Storage::getVersions($rel_path);
- foreach ($versions as $v){
- unlink($abs_path . $v['version']);
- }
- }
- }
-
- /**
- * @brief rename/move versions of renamed/moved files
- * @param array with oldpath and newpath
- *
- * This function is connected to the rename signal of OC_Filesystem and adjust the name and location
- * of the stored versions along the actual file
- */
- public static function rename_hook($params) {
- $rel_oldpath = $params['oldpath'];
- $abs_oldpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_oldpath.'.v';
- $abs_newpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$params['newpath'].'.v';
- if(Storage::isversioned($rel_oldpath)) {
- $versions = Storage::getVersions($rel_oldpath);
- foreach ($versions as $v){
- rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
- }
- }
+ /**
+ * @brief Erase versions of deleted file
+ * @param array
+ *
+ * This function is connected to the delete signal of OC_Filesystem
+ * cleanup the versions directory if the actual file gets deleted
+ */
+ public static function remove_hook($params) {
+ $rel_path = $params['path'];
+ $abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_path.'.v';
+ if(Storage::isversioned($rel_path)) {
+ $versions = Storage::getVersions($rel_path);
+ foreach ($versions as $v){
+ unlink($abs_path . $v['version']);
+ }
+ }
+ }
+
+ /**
+ * @brief rename/move versions of renamed/moved files
+ * @param array with oldpath and newpath
+ *
+ * This function is connected to the rename signal of OC_Filesystem and adjust the name and location
+ * of the stored versions along the actual file
+ */
+ public static function rename_hook($params) {
+ $rel_oldpath = $params['oldpath'];
+ $abs_oldpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_oldpath.'.v';
+ $abs_newpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$params['newpath'].'.v';
+ if(Storage::isversioned($rel_oldpath)) {
+ $versions = Storage::getVersions($rel_oldpath);
+ foreach ($versions as $v){
+ rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
+ }
+ }
}
}
-
-?>
diff --git a/apps/files_versions/settings.php b/apps/files_versions/settings.php
index 5f9e60fc589..f2873b8f7c2 100644
--- a/apps/files_versions/settings.php
+++ b/apps/files_versions/settings.php
@@ -7,4 +7,3 @@ OCP\Util::addscript( 'files_versions', 'versions' );
$tmpl = new OCP\Template( 'files_versions', 'settings');
return $tmpl->fetchPage();
-?>