Commit Graph

258 Commits

Author SHA1 Message Date
Victor Dubiniuk aac6932e92 Skip users with no trashbin 2016-02-24 18:08:45 +03:00
Bjoern Schiessle ac1c3d27b7 get the actual user instead of a federated cloud id
$view->getUidAndFilename($filename); returns the federated cloud id in case of
a federated share. But in this case we need the local user who "owns" the file
which is the current logged in user in case of a federated share
2016-02-18 10:16:59 +01:00
Thomas Müller 9e415a956a Merge pull request #22451 from owncloud/use-proper-user-folder
Handles null as return code and uses proper UserFolder in trashbin
2016-02-17 10:58:31 +01:00
Morris Jobke de58364eb8 Handles null as return code and uses proper UserFolder in trashbin 2016-02-16 18:45:25 +01:00
Vincent Petry 7bed529951 Don't resize trash when no user
Happens when overwriting files on federated shares.
2016-02-16 16:29:07 +01:00
Arthur Schiwon 3a796d1e15 Consolidate getQuota and setQuota methods in User instance 2016-02-09 17:16:43 +01:00
Thomas Müller 6824704699 Merge pull request #21117 from owncloud/owner-file-exists
Only return an owner if the file exists + improved getUidAndFilename
2016-01-15 13:31:56 +01:00
Thomas Müller 13ce6d0f1c Merge pull request #21544 from owncloud/trashbin-permissions
set etag and permission fields for trashbin entries
2016-01-15 13:22:54 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Robin Appelman 8890c88c11 handle not found in trash hook 2016-01-11 11:40:58 +01:00
Robin Appelman 300eb54c87 de-deplicate getUidAndFilename 2016-01-11 11:40:58 +01:00
Robin Appelman cb3d3ebf50 set etag and permission fields for trashbin entries 2016-01-08 13:07:23 +01:00
Morris Jobke ecdf88e41b Use proper public API for OC_Helper::getFileNameMimeType 2015-12-17 17:07:48 +01:00
Robin Appelman 415cf92784 Fix thrashbin wrapper when no user is loggedin 2015-12-11 14:27:37 +01:00
Scrutinizer Auto-Fixer 0f1be1b601 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-07 20:08:20 +00:00
Morris Jobke 574d0d08bb Cleanup trashbin expire code
* requested by @schiesbn
2015-11-30 11:54:03 +01:00
Morris Jobke 7aa07bcf1c Deduplicate queued trashbin expire jobs
* fixes #20425
* this removes the argument trashbin size from the expire job - it is now
  calculated in the expire job
* the queue now detects properly that the job is already queue and doesn't
  add it again
2015-11-27 14:40:31 +01:00
Robin Appelman b025f07fb7 Make Cache\Updater per storage 2015-11-25 14:16:00 +01:00
Lukas Reschke 8f09d5b67c Update license headers 2015-10-26 14:04:01 +01:00
Lukas Reschke 13e817e901 Throw exception on `getPath` if file does not exist
Currently the `getPath` methods returned `NULL` in case when a file with the specified ID does not exist. This however mandates that developers are checking for the `NULL` case and if they do not the door for bugs with all kind of impact is widely opened.

This is especially harmful if used in context with Views where the final result is limited based on the result of `getPath`, if `getPath` returns `NULL` PHP type juggles this to an empty string resulting in all possible kind of bugs.

While one could argue that this is a misusage of the API the fact is that it is very often misused and an exception will trigger an immediate stop of execution as well as log this behaviour and show a pretty error page.

I also adjusted some usages where I believe that we need to catch these errors, in most cases this is though simply an error that should hard-fail.
2015-10-25 17:58:21 +01:00
Robin Appelman 2e8232e803 Fix trashbin handling of unknown/unlimited free space 2015-10-16 21:41:51 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Bjoern Schiessle b940287ffa first copy to owner and then move to current user because the encryption
wrapper always expect to work on the owner storage
2015-10-01 17:09:17 +02:00
Morris Jobke 1051a3c6f5 Change small thumbnails to 32 px
* fixes #16913
* fixes issues in IE8 where the thumbnail is too big
2015-09-30 10:49:48 +02:00
Martin 491250320a Replaces if ($file === '.' || $file === '..') by if(\OC\Files\Filesystem::isIgnoredDir($file)). Eases to find where this operation is used. 2015-09-22 17:53:15 +02:00
Bjoern Schiessle a174ba5a36 make sure to add the correct file size to the file info, otherwise we will not show the preview for every filetype 2015-09-21 12:41:19 +02:00
Victor Dubiniuk b75a1b40a2 Log deleted files 2015-09-16 22:29:54 +03:00
Lukas Reschke 47caac10f5 Add PHPDoc 2015-09-16 17:37:21 +03:00
Victor Dubiniuk 764726ce01 Updates according to review 2015-09-16 17:37:21 +03:00
Victor Dubiniuk 8ac3d5e36c Add expiration cronjob 2015-09-16 17:37:21 +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
Roeland Jago Douma e84cffc063 Moved core apps to the capabilities manager
* Files
* Files_Sharing
* Files_Trashbin
* Files_Versions
2015-08-10 10:45:16 +02:00
Roeland Jago Douma bc91c5c2de Set proper mimetype for directories 2015-08-05 13:54:09 +02:00
Bjoern Schiessle db65eeb580 only move real files to the trash bin 2015-07-08 11:32:06 +02:00
Thomas Müller d3ac73c0c9 Remove OC_Log 2015-07-03 18:00:16 +02:00
Morris Jobke 044d2ece07 Merge pull request #15506 from rullzer/core_apps_oc_log2ocp_util
Move core apps from OC_Log::write to OCP\Util
2015-07-01 08:53:16 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Robin Appelman f02e110aea explain pre-hook scan 2015-06-15 15:43:19 +02:00
Robin Appelman 5efbab4ab8 ensure we dont have to scan a file in the trash wrapper 2015-06-15 14:32:29 +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
Robin Appelman 733784ae41 cleanup move/copy logic in trash 2015-05-19 14:22:09 +02:00
Robin Appelman 89959a856c fix target path for move 2015-05-18 17:16:13 +02:00
Robin Appelman a0854b36f0 update cache after move to trash 2015-05-18 17:16:13 +02:00
Robin Appelman b70e1ffc6d dont go trough the view when moving to trash 2015-05-18 17:16:12 +02:00
Clark Tomlinson 7d2666699b removing encryption preview check 2015-05-18 09:47:46 -04:00
Clark Tomlinson d557519746 removing deletion of encryption keys
this will be handled in the wrapper now
2015-05-18 09:47:46 -04:00
Clark Tomlinson a0c6c01137 fix references to legacy encryption app name 2015-05-18 09:45:41 -04:00
Roeland Jago Douma 7a8072e958 Move core apps from OC_Log::write to OCP\Util 2015-05-18 10:57:52 +02:00