diff options
author | Georg Ehrke <developer@georgehrke.com> | 2013-08-29 10:50:55 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2013-08-29 10:50:55 +0200 |
commit | b7758d0f8d52b2f9653cfee549558327c00c8e01 (patch) | |
tree | 309fb713ed25f35f746c59c668521bf9023bc331 /apps/files_trashbin | |
parent | 70b6e2161ec654f7049027bf6dc5072c1eda4d5e (diff) | |
parent | ea6e74ca9546ca95b3a6372c6106cd8ab2ea2ee9 (diff) | |
download | nextcloud-server-b7758d0f8d52b2f9653cfee549558327c00c8e01.tar.gz nextcloud-server-b7758d0f8d52b2f9653cfee549558327c00c8e01.zip |
Merge master into oc_preview
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/js/trash.js | 2 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/zh_CN.GB2312.php | 12 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/zh_TW.php | 11 | ||||
-rw-r--r-- | apps/files_trashbin/lib/trash.php | 14 |
4 files changed, 13 insertions, 26 deletions
diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index b14a7240cbe..40c0bdb3829 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -20,6 +20,7 @@ $(document).ready(function() { OC.dialogs.alert(result.data.message, t('core', 'Error')); } enableActions(); + FileList.updateFileSummary(); }); }); @@ -48,6 +49,7 @@ $(document).ready(function() { OC.dialogs.alert(result.data.message, t('core', 'Error')); } enableActions(); + FileList.updateFileSummary(); }); }); diff --git a/apps/files_trashbin/l10n/zh_CN.GB2312.php b/apps/files_trashbin/l10n/zh_CN.GB2312.php deleted file mode 100644 index eaa97bb1b6f..00000000000 --- a/apps/files_trashbin/l10n/zh_CN.GB2312.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php -$TRANSLATIONS = array( -"Error" => "出错", -"Delete permanently" => "永久删除", -"Name" => "名称", -"_%n folder_::_%n folders_" => array("%n 个文件夹"), -"_%n file_::_%n files_" => array("%n 个文件"), -"Restore" => "恢复", -"Delete" => "删除", -"Deleted Files" => "删除的文件" -); -$PLURAL_FORMS = "nplurals=1; plural=0;"; diff --git a/apps/files_trashbin/l10n/zh_TW.php b/apps/files_trashbin/l10n/zh_TW.php index ab6b75c5784..2dfc484fc7f 100644 --- a/apps/files_trashbin/l10n/zh_TW.php +++ b/apps/files_trashbin/l10n/zh_TW.php @@ -1,17 +1,18 @@ <?php $TRANSLATIONS = array( "Couldn't delete %s permanently" => "無法永久刪除 %s", -"Couldn't restore %s" => "無法復原 %s", -"perform restore operation" => "進行復原動作", +"Couldn't restore %s" => "無法還原 %s", +"perform restore operation" => "進行還原動作", "Error" => "錯誤", "delete file permanently" => "永久刪除檔案", "Delete permanently" => "永久刪除", "Name" => "名稱", "Deleted" => "已刪除", -"_%n folder_::_%n folders_" => array(""), -"_%n file_::_%n files_" => array(""), +"_%n folder_::_%n folders_" => array("%n 個資料夾"), +"_%n file_::_%n files_" => array("%n 個檔案"), +"restored" => "已還原", "Nothing in here. Your trash bin is empty!" => "您的垃圾桶是空的!", -"Restore" => "復原", +"Restore" => "還原", "Delete" => "刪除", "Deleted Files" => "已刪除的檔案" ); diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php index fe2b8e5cd79..c79afdc0c2e 100644 --- a/apps/files_trashbin/lib/trash.php +++ b/apps/files_trashbin/lib/trash.php @@ -72,11 +72,6 @@ class Trashbin { $mime = $view->getMimeType('files' . $file_path); if ($view->is_dir('files' . $file_path)) { - $dirContent = $view->getDirectoryContent('files' . $file_path); - // no need to move empty folders to the trash bin - if (empty($dirContent)) { - return true; - } $type = 'dir'; } else { $type = 'file'; @@ -689,7 +684,7 @@ class Trashbin { } } } - + /** * clean up the trash bin * @param current size of the trash bin @@ -892,16 +887,17 @@ class Trashbin { //Listen to post write hook \OCP\Util::connectHook('OC_Filesystem', 'post_write', "OCA\Files_Trashbin\Hooks", "post_write_hook"); } - + /** * @brief check if trash bin is empty for a given user * @param string $user */ public static function isEmpty($user) { - $trashSize = self::getTrashbinSize($user); + $view = new \OC\Files\View('/' . $user . '/files_trashbin'); + $content = $view->getDirectoryContent('/files'); - if ($trashSize !== false && $trashSize > 0) { + if ($content) { return false; } |