Skip to content
Snippets Groups Projects
Commit 8e70763c authored by Björn Schießle's avatar Björn Schießle
Browse files

Merge pull request #1522 from schiesbn/trash_bin_fix

OCA_Versions is now known as OCA\Files_Versions
parents 35bd7a40 ce293b8e
Branches
No related tags found
No related merge requests found
......@@ -15,8 +15,7 @@ if ($path_parts['dirname'] == '.') {
$timestamp = null;
}
if (OCA_Trash\Trashbin::delete($filename, $timestamp)) {
error_log("feinifeini");
if (OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)) {
OCP\JSON::success(array("data" => array("filename" => $file)));
} else {
OCP\JSON::error(array("data" => array("message" => "Couldn't delete ".$file. " permanently")));
......
......@@ -22,7 +22,7 @@ foreach ($list as $file) {
$timestamp = null;
}
if ( !OCA_Trash\Trashbin::restore($file, $filename, $timestamp) ) {
if ( !OCA\Files_Trashbin\Trashbin::restore($file, $filename, $timestamp) ) {
$error[] = $filename;
} else {
$success[$i]['filename'] = $file;
......
<?php
OC::$CLASSPATH['OCA_Trash\Hooks'] = 'apps/files_trashbin/lib/hooks.php';
OC::$CLASSPATH['OCA_Trash\Trashbin'] = 'apps/files_trashbin/lib/trash.php';
OC::$CLASSPATH['OCA\Files_Trashbin\Hooks'] = 'apps/files_trashbin/lib/hooks.php';
OC::$CLASSPATH['OCA\Files_Trashbin\Trashbin'] = 'apps/files_trashbin/lib/trash.php';
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA_Trash\Hooks", "remove_hook");
OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Files_Trashbin\Hooks", "remove_hook");
......@@ -24,7 +24,7 @@
* This class contains all hooks.
*/
namespace OCA_Trash;
namespace OCA\Files_Trashbin;
class Hooks {
......
......@@ -20,7 +20,7 @@
*
*/
namespace OCA_Trash;
namespace OCA\Files_Trashbin;
class Trashbin {
......@@ -65,7 +65,7 @@ class Trashbin {
if ( \OCP\App::isEnabled('files_versions') ) {
if ( $view->is_dir('files_versions'.$file_path) ) {
$view->rename('files_versions'.$file_path, 'versions_trashbin/'. $deleted.'.d'.$timestamp);
} else if ( $versions = \OCA_Versions\Storage::getVersions($file_path) ) {
} else if ( $versions = \OCA\Files_Versions\Storage::getVersions($file_path) ) {
foreach ($versions as $v) {
$view->rename('files_versions'.$v['path'].'.v'.$v['version'], 'versions_trashbin/'. $deleted.'.v'.$v['version'].'.d'.$timestamp);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment