diff options
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r-- | apps/files_trashbin/appinfo/app.php | 21 | ||||
-rw-r--r-- | apps/files_trashbin/css/trash.css | 7 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/bg.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/bg.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/cs.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/cs.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/fi.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/fi.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/hu.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/hu.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/nb.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/nb.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/sk.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/sk.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/th.js | 21 | ||||
-rw-r--r-- | apps/files_trashbin/l10n/th.json | 19 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Storage.php | 32 | ||||
-rw-r--r-- | apps/files_trashbin/tests/StorageTest.php | 5 |
18 files changed, 321 insertions, 24 deletions
diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php index ed53657d22a..d4e44b78850 100644 --- a/apps/files_trashbin/appinfo/app.php +++ b/apps/files_trashbin/appinfo/app.php @@ -25,17 +25,16 @@ * */ -$l = \OC::$server->getL10N('files_trashbin'); - // register hooks \OCA\Files_Trashbin\Trashbin::registerHooks(); -\OCA\Files\App::getNavigationManager()->add( -array( - "id" => 'trashbin', - "appname" => 'files_trashbin', - "script" => 'list.php', - "order" => 50, - "name" => $l->t('Deleted files') -) -); +\OCA\Files\App::getNavigationManager()->add(function () { + $l = \OC::$server->getL10N('files_trashbin'); + return [ + 'id' => 'trashbin', + 'appname' => 'files_trashbin', + 'script' => 'list.php', + 'order' => 50, + 'name' => $l->t('Deleted files'), + ]; +}); diff --git a/apps/files_trashbin/css/trash.css b/apps/files_trashbin/css/trash.css index 951497394c3..f150e557231 100644 --- a/apps/files_trashbin/css/trash.css +++ b/apps/files_trashbin/css/trash.css @@ -8,11 +8,8 @@ * */ #app-content-trashbin tbody tr[data-type="file"] td a.name, -#app-content-trashbin tbody tr[data-type="file"] td a.name { - cursor: default; -} - -span.nametext, span.innernametext, span.extension { +#app-content-trashbin tbody tr[data-type="file"] td a.name span.nametext, +#app-content-trashbin tbody tr[data-type="file"] td a.name span.nametext span { cursor: default; } diff --git a/apps/files_trashbin/l10n/bg.js b/apps/files_trashbin/l10n/bg.js new file mode 100644 index 00000000000..e21523b6627 --- /dev/null +++ b/apps/files_trashbin/l10n/bg.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "Неуспешно безвъзвратно изтриване на %s.", + "Couldn't restore %s" : "Неуспешно възтановяване на %s.", + "Deleted files" : "Изтрити файлове", + "Restore" : "Възстановяне", + "Delete" : "Изтрий", + "Delete permanently" : "Изтрий завинаги", + "Error" : "Грешка", + "This operation is forbidden" : "Операцията е забранена", + "This directory is unavailable, please check the logs or contact the administrator" : "Директорията не е налична. Моля проверете журнала или се свържете с администратор", + "restored" : "възстановено", + "No deleted files" : "Няма изтрити файлове", + "You will be able to recover deleted files from here" : "Имате възможност да възстановите изтрити файлове от тук", + "No entries found in this folder" : "Няма намерени записи в тази папка", + "Select all" : "Избери всички", + "Name" : "Име", + "Deleted" : "Изтрито" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_trashbin/l10n/bg.json b/apps/files_trashbin/l10n/bg.json new file mode 100644 index 00000000000..ee5a21463cb --- /dev/null +++ b/apps/files_trashbin/l10n/bg.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "Неуспешно безвъзвратно изтриване на %s.", + "Couldn't restore %s" : "Неуспешно възтановяване на %s.", + "Deleted files" : "Изтрити файлове", + "Restore" : "Възстановяне", + "Delete" : "Изтрий", + "Delete permanently" : "Изтрий завинаги", + "Error" : "Грешка", + "This operation is forbidden" : "Операцията е забранена", + "This directory is unavailable, please check the logs or contact the administrator" : "Директорията не е налична. Моля проверете журнала или се свържете с администратор", + "restored" : "възстановено", + "No deleted files" : "Няма изтрити файлове", + "You will be able to recover deleted files from here" : "Имате възможност да възстановите изтрити файлове от тук", + "No entries found in this folder" : "Няма намерени записи в тази папка", + "Select all" : "Избери всички", + "Name" : "Име", + "Deleted" : "Изтрито" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/cs.js b/apps/files_trashbin/l10n/cs.js new file mode 100644 index 00000000000..712076402f4 --- /dev/null +++ b/apps/files_trashbin/l10n/cs.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "Nelze trvale odstranit %s", + "Couldn't restore %s" : "Nelze obnovit %s", + "Deleted files" : "Odstraněné soubory", + "Restore" : "Obnovit", + "Delete" : "Smazat", + "Delete permanently" : "Trvale odstranit", + "Error" : "Chyba", + "This operation is forbidden" : "Tato operace je zakázána", + "This directory is unavailable, please check the logs or contact the administrator" : "Tento adresář není dostupný, zkontrolujte prosím logy nebo kontaktujte svého správce systému", + "restored" : "obnoveno", + "No deleted files" : "Žádné smazané soubory", + "You will be able to recover deleted files from here" : "Odtud budete moci obnovovat odstraněné soubory", + "No entries found in this folder" : "V tomto adresáři nebylo nic nalezeno", + "Select all" : "Vybrat vše", + "Name" : "Název", + "Deleted" : "Smazáno" +}, +"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"); diff --git a/apps/files_trashbin/l10n/cs.json b/apps/files_trashbin/l10n/cs.json new file mode 100644 index 00000000000..06c3b2ce096 --- /dev/null +++ b/apps/files_trashbin/l10n/cs.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "Nelze trvale odstranit %s", + "Couldn't restore %s" : "Nelze obnovit %s", + "Deleted files" : "Odstraněné soubory", + "Restore" : "Obnovit", + "Delete" : "Smazat", + "Delete permanently" : "Trvale odstranit", + "Error" : "Chyba", + "This operation is forbidden" : "Tato operace je zakázána", + "This directory is unavailable, please check the logs or contact the administrator" : "Tento adresář není dostupný, zkontrolujte prosím logy nebo kontaktujte svého správce systému", + "restored" : "obnoveno", + "No deleted files" : "Žádné smazané soubory", + "You will be able to recover deleted files from here" : "Odtud budete moci obnovovat odstraněné soubory", + "No entries found in this folder" : "V tomto adresáři nebylo nic nalezeno", + "Select all" : "Vybrat vše", + "Name" : "Název", + "Deleted" : "Smazáno" +},"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" +}
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/fi.js b/apps/files_trashbin/l10n/fi.js new file mode 100644 index 00000000000..a8758c77050 --- /dev/null +++ b/apps/files_trashbin/l10n/fi.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "Kohdetta %s ei voitu poistaa pysyvästi", + "Couldn't restore %s" : "Kohteen %s palautus epäonnistui", + "Deleted files" : "Poistetut tiedostot", + "Restore" : "Palauta", + "Delete" : "Poista", + "Delete permanently" : "Poista pysyvästi", + "Error" : "Virhe", + "This operation is forbidden" : "Tämä toiminto on kielletty", + "This directory is unavailable, please check the logs or contact the administrator" : "Hakemisto ei ole käytettävissä. Tarkista lokit tai ole yhteydessä ylläpitoon.", + "restored" : "palautettu", + "No deleted files" : "Ei poistettuja tiedostoja", + "You will be able to recover deleted files from here" : "Voit palauttaa poistettuja tiedostoja tätä kautta", + "No entries found in this folder" : "Ei kohteita tässä kansiossa", + "Select all" : "Valitse kaikki", + "Name" : "Nimi", + "Deleted" : "Poistettu" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_trashbin/l10n/fi.json b/apps/files_trashbin/l10n/fi.json new file mode 100644 index 00000000000..c4ead30d036 --- /dev/null +++ b/apps/files_trashbin/l10n/fi.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "Kohdetta %s ei voitu poistaa pysyvästi", + "Couldn't restore %s" : "Kohteen %s palautus epäonnistui", + "Deleted files" : "Poistetut tiedostot", + "Restore" : "Palauta", + "Delete" : "Poista", + "Delete permanently" : "Poista pysyvästi", + "Error" : "Virhe", + "This operation is forbidden" : "Tämä toiminto on kielletty", + "This directory is unavailable, please check the logs or contact the administrator" : "Hakemisto ei ole käytettävissä. Tarkista lokit tai ole yhteydessä ylläpitoon.", + "restored" : "palautettu", + "No deleted files" : "Ei poistettuja tiedostoja", + "You will be able to recover deleted files from here" : "Voit palauttaa poistettuja tiedostoja tätä kautta", + "No entries found in this folder" : "Ei kohteita tässä kansiossa", + "Select all" : "Valitse kaikki", + "Name" : "Nimi", + "Deleted" : "Poistettu" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/hu.js b/apps/files_trashbin/l10n/hu.js new file mode 100644 index 00000000000..ead62e57b7c --- /dev/null +++ b/apps/files_trashbin/l10n/hu.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "Nem sikerült %s végleges törlése", + "Couldn't restore %s" : "Nem sikerült %s visszaállítása", + "Deleted files" : "Törölt fájlok", + "Restore" : "Visszaállítás", + "Delete" : "Törlés", + "Delete permanently" : "Végleges törlés", + "Error" : "Hiba", + "This operation is forbidden" : "Tiltott művelet", + "This directory is unavailable, please check the logs or contact the administrator" : "Ez a könyvtár nem elérhető, kérem nézze meg a naplófájlokat vagy keresse az adminisztrátort", + "restored" : "visszaállítva", + "No deleted files" : "Nincs törölt fájl", + "You will be able to recover deleted files from here" : "Innen vissza tudja állítani a törölt fáljait.", + "No entries found in this folder" : "Nincsenek bejegyzések ebben a mappában", + "Select all" : "Összes kijelölése", + "Name" : "Név", + "Deleted" : "Törölve" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_trashbin/l10n/hu.json b/apps/files_trashbin/l10n/hu.json new file mode 100644 index 00000000000..d59f303a0e6 --- /dev/null +++ b/apps/files_trashbin/l10n/hu.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "Nem sikerült %s végleges törlése", + "Couldn't restore %s" : "Nem sikerült %s visszaállítása", + "Deleted files" : "Törölt fájlok", + "Restore" : "Visszaállítás", + "Delete" : "Törlés", + "Delete permanently" : "Végleges törlés", + "Error" : "Hiba", + "This operation is forbidden" : "Tiltott művelet", + "This directory is unavailable, please check the logs or contact the administrator" : "Ez a könyvtár nem elérhető, kérem nézze meg a naplófájlokat vagy keresse az adminisztrátort", + "restored" : "visszaállítva", + "No deleted files" : "Nincs törölt fájl", + "You will be able to recover deleted files from here" : "Innen vissza tudja állítani a törölt fáljait.", + "No entries found in this folder" : "Nincsenek bejegyzések ebben a mappában", + "Select all" : "Összes kijelölése", + "Name" : "Név", + "Deleted" : "Törölve" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/nb.js b/apps/files_trashbin/l10n/nb.js new file mode 100644 index 00000000000..644ad102ae4 --- /dev/null +++ b/apps/files_trashbin/l10n/nb.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "Kunne ikke slette %s fullstendig", + "Couldn't restore %s" : "Kunne ikke gjenopprette %s", + "Deleted files" : "Slettede filer", + "Restore" : "Gjenopprett", + "Delete" : "Slett", + "Delete permanently" : "Slett permanent", + "Error" : "Feil", + "This operation is forbidden" : "Operasjonen er forbudt", + "This directory is unavailable, please check the logs or contact the administrator" : "Denne mappen er utilgjengelig. Sjekk loggene eller kontakt administrator", + "restored" : "gjenopprettet", + "No deleted files" : "Ingen slettede filer", + "You will be able to recover deleted files from here" : "Du vil kunne gjenopprette slettede filer herfra", + "No entries found in this folder" : "Ingen oppføringer funnet i denne mappen", + "Select all" : "Velg alle", + "Name" : "Navn", + "Deleted" : "Slettet" +}, +"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_trashbin/l10n/nb.json b/apps/files_trashbin/l10n/nb.json new file mode 100644 index 00000000000..442221a2c8c --- /dev/null +++ b/apps/files_trashbin/l10n/nb.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "Kunne ikke slette %s fullstendig", + "Couldn't restore %s" : "Kunne ikke gjenopprette %s", + "Deleted files" : "Slettede filer", + "Restore" : "Gjenopprett", + "Delete" : "Slett", + "Delete permanently" : "Slett permanent", + "Error" : "Feil", + "This operation is forbidden" : "Operasjonen er forbudt", + "This directory is unavailable, please check the logs or contact the administrator" : "Denne mappen er utilgjengelig. Sjekk loggene eller kontakt administrator", + "restored" : "gjenopprettet", + "No deleted files" : "Ingen slettede filer", + "You will be able to recover deleted files from here" : "Du vil kunne gjenopprette slettede filer herfra", + "No entries found in this folder" : "Ingen oppføringer funnet i denne mappen", + "Select all" : "Velg alle", + "Name" : "Navn", + "Deleted" : "Slettet" +},"pluralForm" :"nplurals=2; plural=(n != 1);" +}
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/sk.js b/apps/files_trashbin/l10n/sk.js new file mode 100644 index 00000000000..b4168ec5440 --- /dev/null +++ b/apps/files_trashbin/l10n/sk.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "Nemožno zmazať %s navždy", + "Couldn't restore %s" : "Nemožno obnoviť %s", + "Deleted files" : "Zmazané súbory", + "Restore" : "Obnoviť", + "Delete" : "Zmazať", + "Delete permanently" : "Zmazať natrvalo", + "Error" : "Chyba", + "This operation is forbidden" : "Táto operácia je zakázaná", + "This directory is unavailable, please check the logs or contact the administrator" : "Priečinok je nedostupný, skontrolujte prosím logy, alebo kontaktujte správcu", + "restored" : "obnovené", + "No deleted files" : "Žiadne zmazané súbory", + "You will be able to recover deleted files from here" : "Tu budete mať možnosť obnoviť zmazané súbory", + "No entries found in this folder" : "V tomto priečinku nebolo nič nájdené", + "Select all" : "Vybrať všetko", + "Name" : "Názov", + "Deleted" : "Zmazané" +}, +"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;"); diff --git a/apps/files_trashbin/l10n/sk.json b/apps/files_trashbin/l10n/sk.json new file mode 100644 index 00000000000..b02227c7064 --- /dev/null +++ b/apps/files_trashbin/l10n/sk.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "Nemožno zmazať %s navždy", + "Couldn't restore %s" : "Nemožno obnoviť %s", + "Deleted files" : "Zmazané súbory", + "Restore" : "Obnoviť", + "Delete" : "Zmazať", + "Delete permanently" : "Zmazať natrvalo", + "Error" : "Chyba", + "This operation is forbidden" : "Táto operácia je zakázaná", + "This directory is unavailable, please check the logs or contact the administrator" : "Priečinok je nedostupný, skontrolujte prosím logy, alebo kontaktujte správcu", + "restored" : "obnovené", + "No deleted files" : "Žiadne zmazané súbory", + "You will be able to recover deleted files from here" : "Tu budete mať možnosť obnoviť zmazané súbory", + "No entries found in this folder" : "V tomto priečinku nebolo nič nájdené", + "Select all" : "Vybrať všetko", + "Name" : "Názov", + "Deleted" : "Zmazané" +},"pluralForm" :"nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" +}
\ No newline at end of file diff --git a/apps/files_trashbin/l10n/th.js b/apps/files_trashbin/l10n/th.js new file mode 100644 index 00000000000..bdd447ab894 --- /dev/null +++ b/apps/files_trashbin/l10n/th.js @@ -0,0 +1,21 @@ +OC.L10N.register( + "files_trashbin", + { + "Couldn't delete %s permanently" : "ไม่สามารถลบ %s แบบถาวร", + "Couldn't restore %s" : "ไม่สามารถกู้คืน %s", + "Deleted files" : "ไฟล์ที่ถูกลบ", + "Restore" : "คืนค่า", + "Delete" : "ลบ", + "Delete permanently" : "ลบแบบถาวร", + "Error" : "ข้อผิดพลาด", + "This operation is forbidden" : "การดำเนินการนี้ถูกห้าม", + "This directory is unavailable, please check the logs or contact the administrator" : "ไม่สามารถใช้งานไดเรกทอรีนี้โปรดตรวจสอบบันทึกหรือติดต่อผู้ดูแลระบบ", + "restored" : "การเรียกคืน", + "No deleted files" : "ไม่มีไฟล์ที่ถูกลบ", + "You will be able to recover deleted files from here" : "คุณจะสามารถกู้คืนไฟล์ที่ถูกได้ลบจากที่นี่", + "No entries found in this folder" : "ไม่พบรายการในโฟลเดอร์นี้", + "Select all" : "เลือกทั้งหมด", + "Name" : "ชื่อ", + "Deleted" : "ลบแล้ว" +}, +"nplurals=1; plural=0;"); diff --git a/apps/files_trashbin/l10n/th.json b/apps/files_trashbin/l10n/th.json new file mode 100644 index 00000000000..4caef58e47a --- /dev/null +++ b/apps/files_trashbin/l10n/th.json @@ -0,0 +1,19 @@ +{ "translations": { + "Couldn't delete %s permanently" : "ไม่สามารถลบ %s แบบถาวร", + "Couldn't restore %s" : "ไม่สามารถกู้คืน %s", + "Deleted files" : "ไฟล์ที่ถูกลบ", + "Restore" : "คืนค่า", + "Delete" : "ลบ", + "Delete permanently" : "ลบแบบถาวร", + "Error" : "ข้อผิดพลาด", + "This operation is forbidden" : "การดำเนินการนี้ถูกห้าม", + "This directory is unavailable, please check the logs or contact the administrator" : "ไม่สามารถใช้งานไดเรกทอรีนี้โปรดตรวจสอบบันทึกหรือติดต่อผู้ดูแลระบบ", + "restored" : "การเรียกคืน", + "No deleted files" : "ไม่มีไฟล์ที่ถูกลบ", + "You will be able to recover deleted files from here" : "คุณจะสามารถกู้คืนไฟล์ที่ถูกได้ลบจากที่นี่", + "No entries found in this folder" : "ไม่พบรายการในโฟลเดอร์นี้", + "Select all" : "เลือกทั้งหมด", + "Name" : "ชื่อ", + "Deleted" : "ลบแล้ว" +},"pluralForm" :"nplurals=1; plural=0;" +}
\ No newline at end of file diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php index b8f154ea051..e3fe648281c 100644 --- a/apps/files_trashbin/lib/Storage.php +++ b/apps/files_trashbin/lib/Storage.php @@ -28,6 +28,8 @@ namespace OCA\Files_Trashbin; use OC\Files\Filesystem; use OC\Files\Storage\Wrapper\Wrapper; use OC\Files\View; +use OCP\Encryption\Exceptions\GenericEncryptionException; +use OCP\ILogger; use OCP\IUserManager; class Storage extends Wrapper { @@ -55,15 +57,21 @@ class Storage extends Wrapper { /** @var IUserManager */ private $userManager; + /** @var ILogger */ + private $logger; + /** * Storage constructor. * * @param array $parameters * @param IUserManager|null $userManager */ - public function __construct($parameters, IUserManager $userManager = null) { + public function __construct($parameters, + IUserManager $userManager = null, + ILogger $logger = null) { $this->mountPoint = $parameters['mountPoint']; $this->userManager = $userManager; + $this->logger = $logger; parent::__construct($parameters); } @@ -147,11 +155,20 @@ class Storage extends Wrapper { * @return bool true if the operation succeeded, false otherwise */ public function unlink($path) { - if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) { - $result = $this->doDelete($path, 'unlink', true); - unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]); - } else { - $result = $this->doDelete($path, 'unlink'); + try { + if (isset(self::$moveOutOfSharedFolder[$this->mountPoint . $path])) { + $result = $this->doDelete($path, 'unlink', true); + unset(self::$moveOutOfSharedFolder[$this->mountPoint . $path]); + } else { + $result = $this->doDelete($path, 'unlink'); + } + } catch (GenericEncryptionException $e) { + // in case of a encryption exception we delete the file right away + $this->logger->info( + "Can't move file" . $path . + "to the trash bin, therefore it was deleted right away"); + + $result = $this->storage->unlink($path); } return $result; @@ -251,7 +268,8 @@ class Storage extends Wrapper { \OC\Files\Filesystem::addStorageWrapper('oc_trashbin', function ($mountPoint, $storage) { return new \OCA\Files_Trashbin\Storage( array('storage' => $storage, 'mountPoint' => $mountPoint), - \OC::$server->getUserManager() + \OC::$server->getUserManager(), + \OC::$server->getLogger() ); }, 1); } diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index 2aebe6414f7..52d5f056148 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -31,6 +31,7 @@ namespace OCA\Files_Trashbin\Tests; use OC\Files\Storage\Temporary; use OC\Files\Filesystem; +use OCP\ILogger; /** * Class Storage @@ -528,9 +529,11 @@ class StorageTest extends \Test\TestCase { ->disableOriginalConstructor()->getMock(); $userManager->expects($this->any()) ->method('userExists')->willReturn($userExists); + $logger = $this->getMockBuilder(ILogger::class)->getMock(); $storage = new \OCA\Files_Trashbin\Storage( ['mountPoint' => $mountPoint, 'storage' => $tmpStorage], - $userManager + $userManager, + $logger ); $this->assertSame($expected, |