Merge pull request #2417 from owncloud/trash_more_error_logs
add some error logs to the trash bin app
This commit is contained in:
commit
a50d53c4dd
2 changed files with 3 additions and 0 deletions
|
@ -10,6 +10,7 @@ $list = json_decode($files);
|
||||||
$error = array();
|
$error = array();
|
||||||
$success = array();
|
$success = array();
|
||||||
|
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($list as $file) {
|
foreach ($list as $file) {
|
||||||
if ( $dirlisting=='0') {
|
if ( $dirlisting=='0') {
|
||||||
|
@ -28,6 +29,7 @@ foreach ($list as $file) {
|
||||||
$i++;
|
$i++;
|
||||||
} else {
|
} else {
|
||||||
$error[] = $filename;
|
$error[] = $filename;
|
||||||
|
OC_Log::write('trashbin','can\'t delete ' . $filename . ' permanently.', OC_Log::ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ foreach ($list as $file) {
|
||||||
|
|
||||||
if ( !OCA\Files_Trashbin\Trashbin::restore($file, $filename, $timestamp) ) {
|
if ( !OCA\Files_Trashbin\Trashbin::restore($file, $filename, $timestamp) ) {
|
||||||
$error[] = $filename;
|
$error[] = $filename;
|
||||||
|
OC_Log::write('trashbin','can\'t restore ' . $filename, OC_Log::ERROR);
|
||||||
} else {
|
} else {
|
||||||
$success[$i]['filename'] = $file;
|
$success[$i]['filename'] = $file;
|
||||||
$success[$i]['timestamp'] = $timestamp;
|
$success[$i]['timestamp'] = $timestamp;
|
||||||
|
|
Loading…
Reference in a new issue