Commit Graph

204 Commits

Author SHA1 Message Date
Robin Appelman 9bbfeada6b Only try to scan the children of directories 2015-02-11 13:11:31 +01:00
Robin Appelman dc6468c2aa Cast mtimes and size to int 2015-02-11 13:11:28 +01:00
Robin Appelman 4242dd0d9d Reuse cache data of existing files during scan 2015-02-11 13:08:28 +01:00
Morris Jobke 1bb6de7c1b Merge pull request #13425 from owncloud/phpdoc_cleanup
Cleanup of PHPDoc return types
2015-02-10 01:14:00 +01:00
Robin Appelman 6c00521e8b Use transactions when renaming directory contents 2015-02-06 15:20:53 +01:00
Robin Appelman adf9a4e4eb Dont bother updating the cache when working with part files 2015-02-05 13:59:50 +01:00
Joas Schilling a575dcf78f Use insertIfNotExists() and reload mimetypes after inserting one 2015-02-02 13:20:16 +01:00
Robin McCorkell 2b99fc76ec Cleanup of PHPDoc return types 2015-01-16 20:30:43 +00:00
Robin Appelman 2248e465af Remove children from the cache in one query 2015-01-15 17:26:12 +01:00
Morris Jobke 7746ac519f drop dead code - ref #13301 2015-01-13 13:52:25 +01:00
Morris Jobke 9b49b52fc6 drop useless "!!! No reuse of etag" - fixes #13187 2015-01-13 09:54:48 +01:00
Robin McCorkell 631d6571fd Merge pull request #13181 from owncloud/filecache-preventleadingslash
Trim leading or trailing slashes in file cache paths
2015-01-09 13:54:17 +00:00
Morris Jobke 800738f51a Merge pull request #12011 from owncloud/reuse-etag-default
Default to reusing etags in the scanner
2015-01-09 14:38:45 +01:00
Vincent Petry 888ce4d4f9 Fix cache jail to not duplicate slashes 2015-01-09 10:18:32 +01:00
Vincent Petry aa821ecc00 Trim leading or trailing slashes in file cache paths 2015-01-08 19:43:02 +01:00
Vincent Petry 4b57892c4e Merge pull request #12778 from owncloud/searchbytags2
Added searchByTags to view, storage and cache
2014-12-12 14:27:19 +01:00
Vincent Petry 3878c3782f Added searchByTag in cache jail wrapper 2014-12-12 11:48:42 +01:00
Vincent Petry 15ecb28d50 Make $userId mandatory for searchByTags
$userId is now a mandatory parameter for searchByTags.

Also fixed some places in the code where the argument was missing (Node
API and View)
2014-12-12 11:18:35 +01:00
Vincent Petry 25dde7e93b Added searchByTags to view, storage and cache 2014-12-11 17:38:50 +01:00
Thomas Müller 80ae311329 Merge pull request #11892 from owncloud/remove_triggerupdate
Remove triggerupdate.php & add quiet option for CLI scanner
2014-12-10 16:17:29 +01:00
Vincent Petry ebba54d490 Fix numeric storage id for cache wrapper 2014-12-10 13:05:31 +01:00
Jörn Friedrich Dreyer 0f17486c1d make path absolute 2014-12-10 11:04:17 +01:00
Vincent Petry 35ab770b11 Close cursor early in calculateFolderSize
This method triggers additional queries in $this->update() so to avoid
potential database locks or delays, we close the cursor as soon as it is not needed any more
2014-11-28 09:35:31 +01:00
Thomas Müller 65041440de check is mimetype is set - fixed #13452 2015-01-19 15:04:53 +01:00
Robin Appelman 33b64868d7 Add storage and cache wrappers to apply a permissions mask to a storage 2014-11-27 15:25:57 +01:00
Robin Appelman abb6e89c5d Add storage and cache wrappers to jail a storage to a subfolder 2014-11-27 15:25:53 +01:00
Bjoern Schiessle f27b6b0ab8 don't scan part files 2014-11-07 15:20:51 +01:00
Robin Appelman d26a427f92 Also propagate etag changes when the watcher finds a changed file 2014-11-07 12:56:09 +01:00
Robin Appelman 16b0d52031 Default to reusing etags in the scanner 2014-11-06 18:34:10 +01:00
Robin Appelman 0a3f57f832 Pass the cached data to the filesystem watcher 2014-10-24 12:32:55 +02:00
Vincent Petry d485c0098d Retrieve storage numeric id earlier when still available
The numeric id is only available before the storage entry is deleted, so
get it at that time.
2014-10-13 15:52:48 +02:00
Robin Appelman f88021dbbc Don't keep the full info of all children in memory 2014-09-24 15:44:56 +02:00
Robin Appelman 0c03b2bdd5 Use ILIKE in cache search 2014-09-17 16:12:54 +02:00
Lukas Reschke fa718d2e2c Fix typo 2014-09-08 16:34:03 +02:00
Robin Appelman 644755df66 Use bigger transactions when doing explicit file system scans 2014-09-08 14:15:41 +02:00
Robin Appelman e29b7e9335 Remove explicit propagate calls 2014-09-05 11:53:24 +02:00
Robin Appelman 1d8a88dd1b Fix warning in homecache 2014-09-05 11:53:23 +02:00
Robin Appelman 850542c5d6 Refactor Cache\Updater to work outside of the users home 2014-09-05 11:53:23 +02:00
Vincent Petry 068f9d10f1 Added repair step for legacy storages 2014-08-20 23:14:05 +02:00
Joas Schilling 4d32e3548b Ensure that filename is prefixed with a slash 2014-08-14 16:48:30 +02:00
Joas Schilling 564bf23c1b Do not filemtime() on "." directory. Use empty string instead
Fix #9928
2014-08-11 17:39:37 +02:00
Joas Schilling d7666d9d3d Remove doubled slash between folder and path 2014-08-11 16:50:52 +02:00
Martin d975012ae6 Improved scanner error message 2014-07-31 13:12:35 +02:00
Robin Appelman 3e3d460729 use case insensitive LIKE when searching for files in mysql 2014-07-08 15:49:27 +02:00
Jörn Friedrich Dreyer b5545b81c6 make search case insensitive on postgres and oracle 2014-07-03 19:01:00 +02:00
Robin Appelman 65f3b2fad2 Add server<->server sharing backend 2014-06-14 10:10:37 +02:00
Vincent Petry b595c982d0 Merge pull request #8968 from owncloud/scanner-parent-repair
Repair broken parent link in the scanner
2014-06-12 17:40:44 +02:00
Robin Appelman 6b1d8a56bb remove unused argument 2014-06-10 15:42:37 +02:00
Robin Appelman 054083b9cd add some comments 2014-06-10 15:37:43 +02:00
Robin Appelman 21cfd1014a Repair broken parent link in the scanner 2014-06-10 15:26:18 +02:00
Bjoern Schiessle 9dc0befcca call self::getNumericStorageId() to get the numeric ID 2014-06-10 14:48:19 +02:00
Thomas Müller c053f27381 Merge pull request #8921 from owncloud/fix-remove-storage-master
No need to create a storage within remove
2014-06-06 16:16:44 +02:00
Thomas Müller 26993f2167 No need to create a storage within remove 2014-06-06 11:39:35 +02:00
Robin Appelman 8abe1c3f1a Don't do rename hooks for cache when moving the mountpoint 2014-06-06 09:55:58 +02:00
Thomas Müller e1beb8c6c3 Merge pull request #8889 from owncloud/mtime-reuse
Don't update the mtime if the storage mtime hasn't changed
2014-06-05 13:18:18 +02:00
Robin Appelman 3e73251750 Don't update the mtime if the storage mtime hasn't changed 2014-06-05 10:08:25 +02:00
Thomas Müller ff3ded6cb2 Merge pull request #8852 from owncloud/kill-permissions-master
Kill permissions table
2014-06-05 10:05:05 +02:00
Thomas Müller da3974bcb2 - drop permissions table and related code
- the file/folder's permission is now stored in the file cache
- BackGroundWatcher has been removed - this has meanwhile be replaced by occ files:scan which can be executed in a cron jobs
- increase version to trigger database migration
2014-06-05 08:22:01 +02:00
Thomas Müller a2db53b928 Merge pull request #8471 from owncloud/versioning_no_longer_track_the_size
[versioning] let the file cache track the size of the versions
2014-06-04 18:19:48 +02:00
Vincent Petry b5f0a17918 Merge pull request #8822 from owncloud/cache-change-propagator
[WIP] Improved propagation of cache changes
2014-06-04 13:03:14 +02:00
Robin Appelman a6bb1e1bf8 Fix size calculation during recursive scan 2014-06-03 19:54:59 +02:00
Robin Appelman 6689d67a5b Fix recursive scanning 2014-06-02 21:04:36 +02:00
Bjoern Schiessle e0a5f3b570 get permissions directly from share storage to avoid additional db calls 2014-06-02 20:17:40 +02:00
Bjoern Schiessle 7ad0fee0b5 let file cache handle the versions size 2014-06-02 18:55:13 +02:00
Robin Appelman e002ff6065 propagate changes in the scanner 2014-06-02 15:24:08 +02:00
Robin Appelman 0158788a2a Split of cache writes in the scanner to their own methods 2014-06-02 14:52:21 +02:00
Robin Appelman a31f089266 Add a change propagator class to handle propagating etag and mtime changes 2014-06-02 14:39:12 +02:00
Owen Winkler da6aae28ad Merge pull request #8607 from owncloud/filescan_app_hook
Allow apps to control via a hook skipping add/remove a file during filescan
2014-05-30 12:38:37 -04:00
ringmaster 19f0c47842 Missed one. 2014-05-30 10:40:26 -04:00
ringmaster 16ae63bdfd Updates per comments on PR:
* Use "filesystem_cache_readonly" config setting, update comment in config.sample
* Use $this->cacheActive to cache config setting
* Add public Scanner::setCacheActive() to set $cacheActive programmatically
2014-05-30 09:42:41 -04:00
Andreas Fischer 0bae68017e Cast to number instead of integer in OC\Files\Cache\HomeCache 2014-05-29 16:26:02 +02:00
Andreas Fischer a34aa1959a Cast to number instead of integer in OC\Files\Cache\Cache 2014-05-29 16:26:01 +02:00
ringmaster f79948f519 Prevent apps from affecting the scanner via hook. 2014-05-28 13:20:20 -04:00
ringmaster 3d1ba574e4 Change visibility of scanner internals
so that descendant classes can access them.
2014-05-28 07:59:38 -04:00
ringmaster 26d169b27c Use 'filesystem_check_enable' as a config option. 2014-05-27 16:01:16 -04:00
ringmaster 3b287f8274 Allow the default behavior to come from the config. 2014-05-27 15:21:35 -04:00
ringmaster fdf26c5a3f Rename variable to something more appropriate. 2014-05-27 15:12:56 -04:00
ringmaster 645e7035a4 Allow apps to control via a hook to skip adding/removing a file during filescan 2014-05-27 15:12:54 -04:00
Frank Karlitschek 48d0cebc42 Merge pull request #8674 from owncloud/watch-policy
Add a config option for setting the filesystem watcher policy
2014-05-26 10:48:44 +02:00
Robin Appelman ff1f341d97 Fix phpdoc 2014-05-22 13:30:32 +02:00
Bjoern Schiessle 12338e0ef0 allow admin to disable sharing for specific groups of users 2014-05-22 10:43:44 +02:00
Morris Jobke dc36d30953 Remove all occurences of @brief and @returns from PHPDoc
* test case added to avoid adding them later
2014-05-19 17:50:53 +02:00
Robin McCorkell 87b548ed91 Fix all PHPDoc types and variable names, in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell a7ae2e874a Squash 'a | b' into 'a|b', in /lib 2014-05-13 19:08:14 +01:00
Robin McCorkell b5bc37d2e4 Fix @return array PHPDocs, in /lib 2014-05-13 19:08:14 +01:00
Vincent Petry 05dc694c5c Fix getPathById for Oracle
Added extra code to handle the case of Oracle which saves empty strings
as null values.
2014-05-08 13:33:55 +02:00
Robin Appelman b42ce6c30a Prevent error if previously cached data doesn't have an etag 2014-04-22 15:24:38 +02:00
Robin Appelman 0c2585f3ac Improve phpdoc 2014-03-31 14:29:55 +02:00
Robin Appelman f331d5f9d4 Give storages the option to implement the getById behaviour for View->getPath 2014-03-28 15:15:56 +01:00
Thomas Müller 1ae10b9da3 Merge pull request #7420 from owncloud/cachehooks-first
Manually triger the filecache update hooks before any other hook
2014-03-25 22:41:09 +01:00
Thomas Müller bbc2e37259 Merge pull request #7477 from owncloud/foldersize-reuse
Allow re-using already known fileinfo when calculating folder sizes
2014-03-25 22:33:24 +01:00
Thomas Müller 6b9ae27b90 drop file cache migration OC5 -> OC6 2014-03-18 17:14:38 +01:00
Robin Appelman eabeedb306 Merge branch 'master' into cachehooks-first 2014-03-13 15:22:00 +01:00
Robin Appelman d55c7223a9 Merge branch 'master' into foldersize-reuse
Conflicts:
lib/private/files/cache/homecache.php
2014-03-11 13:04:20 +01:00
Vincent Petry 4fdf7682c9 Merge pull request #7398 from owncloud/trash_dont_rely_on_db
[trash] fall back if file is not in db
2014-03-10 16:04:47 +01:00
Bjoern Schiessle 4562909a20 get trash size from file cache 2014-03-10 15:13:28 +01:00
Vincent Petry 7f24d42ca5 Propagate unencrypted_size up to the file cache root 2014-03-07 11:00:22 +01:00
Robin Appelman 06c6163265 Check if fields we need are actually set to prevent errors 2014-03-03 16:48:28 +01:00
Robin Appelman c87658feda Fix updater when getFileInfo fails 2014-03-03 12:56:08 +01:00
Robin Appelman da386aad59 Allow re-using already known fileinfo when calculating folder sizes 2014-02-28 14:23:07 +01:00