Commit Graph

50 Commits

Author SHA1 Message Date
Vincent Petry 5e6fa3c938 Fix trashbin sidebar
Do not display size as it is not available.
Use display name instead of name to remove the ".d123456" suffix.
2015-08-25 11:29:35 +02:00
Thomas Müller 326de6f9b4 Merge pull request #18065 from owncloud/new-trashbin-retention
New trashbin retention
2015-08-12 13:13:45 +02:00
Victor Dubiniuk b9f655d8ad Fix tests 2015-08-10 23:55:10 +03:00
Victor Dubiniuk 33c29d3da7 Migrate settings 2015-08-10 23:54:44 +03:00
Victor Dubiniuk 4ef2615788 Enhance trashbin expiration settings 2015-08-10 20:40:43 +02:00
Joas Schilling e6eb74958f Remove unnecessary DB prefixes from existing query builder usages 2015-08-10 16:21:41 +02:00
Joas Schilling f77e5f411d Fix existing usages by removing the quotes 2015-07-21 15:25:47 +02:00
Joas Schilling de348180ae Use the public interface and our method instead of the doctrine thing 2015-07-21 15:25:47 +02:00
Bjoern Schiessle db65eeb580 only move real files to the trash bin 2015-07-08 11:32:06 +02:00
Björn Schießle 525745caf5 Merge pull request #17140 from owncloud/trashbin_occ
add occ command to remove deleted files
2015-07-03 15:10:50 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Bjoern Schiessle 407db913de add occ command to trashbin to remove deleted files 2015-06-24 19:09:20 +02:00
Thomas Müller 9899e10a04 Merge pull request #16753 from owncloud/issue-16752-check-for-existing-user-in-expire-tasks
Check whether the user exists before trying to set up his file system
2015-06-05 16:22:03 +02:00
Joas Schilling bd0b9a0fe0 Add unit tests for non existing users 2015-06-05 13:23:50 +02:00
Vincent Petry 61356b5560 Keep versions when deleting as recipient
The original owner could not be resolved because the original file was
already deleted, so no versions were retained.

This fix passes the owner and path to retainVersions() since it was
already resolved before the file deletion. This reactivates the versions
logic and creates a copy of the versions in each trashbin.
2015-06-02 17:13:00 +02:00
Björn Schießle 9366dde875 Merge pull request #15985 from owncloud/hotfix/fix-encryption-references
[enc2] fix references to legacy encryption app name
2015-05-26 17:28:27 +02:00
Morris Jobke 39d1e99228 Merge pull request #16322 from owncloud/trash-view
dont go trough the view when moving to trash
2015-05-20 14:44:01 +02:00
Vincent Petry 7386257676 Merge pull request #16075 from owncloud/skeleton-copy-delay
wait with copying the skeleton untill login and setupfs are done
2015-05-20 13:52:08 +02:00
Scrutinizer Auto-Fixer fdbc21fc6c Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-05-19 11:23:06 +00:00
Robin Appelman 8f1a609512 adjust test 2015-05-18 17:16:13 +02:00
Clark Tomlinson a0c6c01137 fix references to legacy encryption app name 2015-05-18 09:45:41 -04:00
Robin Appelman 724f88d9ff fix tests 2015-05-18 12:11:32 +02:00
Vincent Petry f86699cd48 Fix restoring files from trash with unique name
When restoring a file, a unique name needs to be generated if a file
with the same name already exists.

Also fixed the restore() method to return false if the file to restore
does not exist.

Added unit tests to cover restore cases.
2015-05-15 12:42:27 +02:00
Vincent Petry beb6a38d85 Added rmdir to trashbin storage wrapper
This makes sure that folders are moved to trash when deleted with
rmdir() instead of unlink().

This happens for example when deleting a folder over WebDAV.
The web UI uses unlink() so it wasn't affected.
2015-05-12 11:09:02 +02:00
Robin Appelman be55a90323 dont use our now non existing hook 2015-04-27 14:07:15 +02:00
Robin Appelman d26c6cab90 properly return false if we cant delete the source file 2015-04-13 15:13:03 +02:00
Vincent Petry f8cfc03f36 Replace originalStorage in tests with a proper teardown
The purpose of $originalStorage in unit tests was to remount the old
root.
However that storage itself is already wrapped by storage wrapper, so
remounting it would rewrap the storage several times.

This fix makes use of "loginAsUser()" and "logout()" from the TestCase
class to properly initialize and cleanup the FS as expected.
2015-04-08 12:45:38 +02:00
Bjoern Schiessle d3e887a7cf reset init status before login 2015-04-07 13:30:30 +02:00
Thomas Müller 00338f9dca Removing files_encryption left overs 2015-04-07 13:30:28 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Thomas Müller bbaf97ca43 Merge pull request #14644 from owncloud/trash-expire-command
Expire files from the trash in the background
2015-03-16 10:04:05 +01:00
Vincent Petry 3f6e7d6a43 Add unit test for selection overlay actions in trashbin 2015-03-04 13:49:19 +01:00
Robin Appelman c80522ed63 Expire files from the trash in the background 2015-03-02 15:25:50 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Robin Appelman d4c4e2a322 Detect failed deletes in the trashbin 2015-01-29 15:39:58 +01:00
Vincent Petry 02b9bad81b Fix bogus deletion on copy + unlink through rename
Cross-storage rename would cause copy + unlink. That unlink operation
must not trigger the trashbin.
2015-01-26 12:22:22 +01:00
Vincent Petry a1cc9eea56 Add trashbin storage wrapper unit test for versions 2015-01-23 18:39:21 +01:00
Vincent Petry 1f39a7aabe Simplify trash storage unit tests
Needed to make it properly init the mount points
2015-01-23 18:08:59 +01:00
Vincent Petry 2e8c70327a Remove storage wrapper for oc_trashbin in unit test 2015-01-23 14:55:38 +01:00
Vincent Petry 67f1534e0f Call final unlink in trash wrapper's storage
In the case of cross-storage delete, the files are copied to the trash,
then deleted. The final delete on the source storage would still reach
the trash wrapper.

This fix makes forwards that second call to the wrapped storage to make
the final delete work.

It fixes the issue with remote shares, local shares and external
storage.

Also, it uses a new function "renameRecursive" that renames the files
and preserves the mtimes (like "copy_recursive" did in the past))
2015-01-23 12:20:54 +01:00
Joas Schilling 76ebd3a050 Make apps/ extend the \Test\TestCase and fix overwritten methods 2014-11-19 14:52:09 +01:00
Thomas Müller f776bcd4a0 remove unnecessary require calls - the ownCloud class loader is supposed to take care of this 2014-10-30 17:20:40 +01:00
Vincent Petry 586b3a9683 Sync file list with file actions
Whenever file actions are registered later, now the file lists are
automatically notified.

Added FileActions.addUpdateListener() to be able to receive such
notifications.

This removes the need for apps to manually call FileActions.display()
after registering new actions.

This fixes issues with race conditions when file actions are
registered after the file list was already rendered.
2014-06-27 13:41:01 +02:00
Bjoern Schiessle 05cd150fd2 add additional tests for the trash bin 2014-06-18 14:41:16 +02:00
Bjoern Schiessle e06fa200b3 make sure that we always use the right user 2014-06-18 14:41:16 +02:00
Bjoern Schiessle b486f48fbc fix trash bin expire operation and add unit tests 2014-06-17 22:36:30 +02:00
Vincent Petry ef59c69dc8 Distinguish legacy file actions from regular file actions
Legacy file actions are registered by legacy apps through
window.FileActions.register(). These actions can only be used by the
main file list ("all files") because legacy apps can only deal with a
single list / container.

New file actions of compatible apps must be registered through
OCA.Files.fileActions. These will be used for other lists like the
sharing overview.

Fixed versions and sharing actions to use OCA.Files.fileActions, which
makes them available in the sharing overview list.
2014-05-30 10:06:29 +02:00
Vincent Petry 6fd084243b Fixed many issues, clean up
- fixed upload and storage statistics
- fixed infinite scroll to use the correct contain for scroll detection
- fixed unit test that sometimes fail for rename case
- controls are now sticky again
- fixed selection overlay to be aligned with the table
- fixed "select all" checkbox that had id conflicts
- fixed public page
- fixed global actions permissions detection
- fix when URL contains an invalid view id
- viewer mode now hides the sidebar (ex: text editor)
- added unit tests for trashbin
- clean up storage info in template (most is retrieved via ajax call now)
2014-05-15 17:51:04 +02:00
Vincent Petry 9d38e3602b Namespacing for FileList, FileActions and trashbin app
- FileList is now an instantiable class
- FileActions is now in namespace
- added App class for trashbin app
- moved trashbin overrides into classes extending FileList
- replaced many static calls with "this." or "self." to make the classes
  reusable/extendable
- new URL parameter "view" to specify which view is shown, for example
  "files" or "trashbin"
- added OC.Util.History utility class in core for handling history
- moved URL handling/routing to OCA.Files.App
- popstate will correctly update the current view and notify the view of
  the URL change so it can update the current dir
- added JS unitt tests for the trashbin app
- fixed public app to work with the new namespaces
2014-05-15 17:51:04 +02:00