]> source.dussan.org Git - nextcloud-server.git/commitdiff
use public API
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 28 Jun 2012 12:18:57 +0000 (14:18 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Thu, 28 Jun 2012 12:18:57 +0000 (14:18 +0200)
apps/files_versions/versions.php

index b733c57923e2036f5b9d8d900b380089decf5434..7ed5f257505ea95ac300450cc112d5c9e11d7e78 100644 (file)
@@ -316,9 +316,9 @@ class Storage {
          * This function is connected to the delete signal of OC_Filesystem
          * cleanup the versions directory if the actual file gets deleted\r
          */
-        public static function removeVersions($params) {\r
-               $rel_path =  $params[\OC_Filesystem::signal_param_path];\r
-               $abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OC_User::getUser()."/versions".$rel_path.'.v';\r
+        public static function removeVersions($params) {
+               $rel_path =  $params['path'];\r
+               $abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_path.'.v';\r
                if(Storage::isversioned($rel_path)) {\r
                        $versions = Storage::getVersions($rel_path);\r
                        foreach ($versions as $v){\r
@@ -336,8 +336,8 @@ class Storage {
          */\r
         public static function renameVersions($params) {\r
                $rel_oldpath =  $params['oldpath'];
-               $abs_oldpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OC_User::getUser()."/versions".$rel_oldpath.'.v';
-               $abs_newpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OC_User::getUser()."/versions".$params['newpath'].'.v';\r
+               $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';\r
                if(Storage::isversioned($rel_oldpath)) {
                        $versions = Storage::getVersions($rel_oldpath);\r
                        foreach ($versions as $v){