fix restore from files in sub-folders

This commit is contained in:
Bjoern Schiessle 2013-11-29 16:43:50 +01:00
parent 41a1a32e5a
commit 71589e65d2
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ $success = array();
$i = 0;
foreach ($list as $file) {
if ( $dirlisting === '0') {
$file = ltrim($file, '/');
$delimiter = strrpos($file, '.d');
$filename = substr($file, 0, $delimiter);
$timestamp = substr($file, $delimiter+2);

View File

@ -8,7 +8,7 @@ $(document).ready(function() {
deleteAction.removeClass('delete-icon').addClass('progress-icon');
disableActions();
$.post(OC.filePath('files_trashbin', 'ajax', 'undelete.php'),
{files: JSON.stringify([filename]), dirlisting: tr.attr('data-dirlisting')},
{files: JSON.stringify([$('#dir').val() + '/' + filename]), dirlisting: tr.attr('data-dirlisting')},
function(result) {
for (var i = 0; i < result.data.success.length; i++) {
var row = document.getElementById(result.data.success[i].filename);
@ -229,7 +229,7 @@ function getSelectedFiles(property){
elements.each(function(i,element){
var file={
name:$(element).attr('data-filename'),
file:$(element).attr('data-file'),
file:$('#dir').val() + "/" + $(element).attr('data-file'),
timestamp:$(element).attr('data-timestamp'),
type:$(element).attr('data-type'),
dirlisting:$(element).attr('data-dirlisting')