Merge pull request #1522 from schiesbn/trash_bin_fix
OCA_Versions is now known as OCA\Files_Versions
This commit is contained in:
commit
8e70763cec
5 changed files with 8 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue