Commit Graph

1577 Commits

Author SHA1 Message Date
macjohnny 482eded8b3 Merge pull request #8998 from macjohnny/master
drastic speedup for nested ldap groups
2014-06-12 14:49:15 +02:00
Vincent Petry 3e1576011f Merge pull request #8980 from owncloud/better-accept-header
handle http accept headers more gracefully
2014-06-12 13:28:03 +02:00
macjohnny e8e2e47e68 Update manager.php 2014-06-12 11:29:20 +02:00
macjohnny b1094cfe82 Update group.php 2014-06-12 11:28:57 +02:00
macjohnny 0af8aa689f drastic speedup for nested ldap groups
Changes a function call in getUserGroups to only retrieve group ids instead of objects.
this change significantly improves performance when using owncloud with many groups, e.g. nested ldap hierarchy (1.2.840.113556.1.4.1941), since getUserGroups gets called in oc_share::getItems, which is needed for every page request.
in my particular case, it took more than 10s to load the calendar page and more than 6s to load the file page.
this was in an environment with 100 user groups (nested) per user. The performance was bad due to the following call stack:
self::getManager()->getUserGroups($user)
  - getGroupObject() (executed for every group!)
     - groupExists() (resulting in many ldap-requests)
since the groups are loaded from ldap, it is unnecessary to check whether the group exists or not.
2014-06-12 09:51:23 +02:00
macjohnny ede2aa236e Update manager.php
add a function getUserGroupIds for retrieving group ids instead of group objects. this significantly improves performance when using many (nested) groups.
2014-06-12 09:41:23 +02:00
Vincent Petry 5def2a72dd Merge pull request #8991 from owncloud/fix-php53-arraycombine
Fixed array_combine for PHP 5.3
2014-06-12 09:08:50 +02:00
josh4trunks 1b02991a1d Fixes based on suggestions
I use the term socket for any extension, either unix socket, or internet socket (port).

I check if the socket is all digits
* only integers 0 and larger would pass this test.
I then check if the string is less than or equal to the maximum port number.

By using "if($socket)" I make sure socket isn't false, empty, or the string '0'.

I don't believe I need to initialize $port because $port will always be set if $socket is true. Please show me if I am wrong here. Thanks
2014-06-11 21:47:45 -07:00
Vincent Petry 4e4c2b04c8 Fixed array_combine for PHP 5.3 2014-06-11 19:13:49 +02:00
Vincent Petry 75a53b3c49 Merge pull request #8901 from owncloud/permissions-update-cache
Save the permissions in the filecache if it's not saved yet
2014-06-11 18:28:55 +02:00
Vincent Petry 65b3d293ce Added ORDER BY to enforce share entry order
Sometimes MySQL decides to return the shares in the wrong order, but
some parts of the code seem to require the order to be known, at least
so that the parent shares come before the children shares.

This fix adds an ORDER BY clause to force the order by id.
2014-06-11 14:28:30 +02:00
Vincent Petry 491c96eaa9 Merge pull request #8966 from owncloud/fix_failing_tests_on_master
Fix failing tests on master
2014-06-11 10:05:38 +02:00
Bernhard Posselt 0252d39bb6 fix indention 2014-06-11 00:57:00 +02:00
Bernhard Posselt 1002281dae handle http accept headers more gracefully 2014-06-11 00:54:25 +02:00
Georg Ehrke 7396e5f455 movie previews: use file directly when it's stored locally and encryption is not enabled, fixes #7756 2014-06-10 22:08:27 +02:00
Georg Ehrke 5e9fa64819 don't show update button when appstore is disabled or no writable dir exists 2014-06-10 18:39:34 +02:00
Georg Ehrke e047e28ac5 make text preview backend use imagettftext, fixes #8087 2014-06-10 17:29:40 +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
Georg Ehrke 602404c631 fix php doc block 2014-06-10 13:58:41 +02:00
Georg Ehrke 6bf06890e7 always return a bool in OC_App::updateApp 2014-06-10 13:56:05 +02:00
Georg Ehrke 5d4f3baf56 fix php doc block 2014-06-10 13:51:20 +02:00
Georg Ehrke 1ab9bdcaa0 remove unnecessary @return 2014-06-10 13:01:10 +02:00
Robin Appelman 41d2354191 Save the permissions in the filecache if it's not saved yet 2014-06-09 12:34:35 +02:00
Morris Jobke e769ef9bbb Merge pull request #8916 from owncloud/rmdirr-test-cleanup-fix
Added hacky fix for long path cleanup routine
2014-06-08 20:46:00 +02:00
Björn Schießle 3da47db33c Merge pull request #8927 from owncloud/expire_only_link_shares
only expire link shares
2014-06-06 19:24:15 +02:00
Thomas Müller 647dcce514 Merge pull request #8253 from owncloud/pk-on-all-tables-master
Primary keys on all tables master
2014-06-06 16:40:11 +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
Bjoern Schiessle f15d7dfec0 only expire link shares 2014-06-06 15:47:37 +02:00
Thomas Müller fe8bae31dc adding PK to table encryption
adding auto increment/PK to table files_trash

adding PK to table ldap_user_mapping and ldap_group_members

adding PK to table ldap_group_mapping

truncate permissions table to allow smooth creation of primary key

adding unit test for creating an auto increment column on a table which already contains data

remove unneeded table files_trashsizes

fix unit test

no need to truncate *PREFIX*permissions

On Oracle adding auto increment columns is not working out of the box - Oracle migrations are to be done manually
2014-06-06 13:33:56 +02:00
Vincent Petry 5cebb6fb9b Merge pull request #4553 from owncloud/update_search_classes
Update search classes
2014-06-06 13:24:16 +02:00
Jörn Friedrich Dreyer a59b5249d3 add more and fix office mimetypes, migrate wrong mimetypes 2014-06-06 12:00:25 +02:00
icewind1991 c47d4ebbac Merge pull request #8666 from owncloud/mount-remove
Support for (re)moving mountpoints
2014-06-06 11:57:43 +02:00
Vincent Petry 0661d737e6 Merge pull request #8900 from guruz/webdav_permission_moveable_renameable
WebDAV Permissions: Distinguish between renameing and moving
2014-06-06 11:51:39 +02:00
Thomas Müller 26993f2167 No need to create a storage within remove 2014-06-06 11:39:35 +02:00
Jörn Friedrich Dreyer 56470fa9b3 fix namespace for legacy search classes 2014-06-06 11:01:35 +02:00
Vincent Petry 6e2358c3a6 Added hacky fix for long path cleanup routine 2014-06-06 10:41:49 +02:00
Vincent Petry 5e27ac3e0d Added CLI arguments for upgrade simulation steps
Added "dry run" argument to only run the update simulation.
Added argument to disable migration (useful for bigger setups where
table duplication would take too much space)
2014-06-06 10:11:14 +02:00
Thomas Müller ff651a3e0d Merge pull request #8909 from owncloud/fix-temporary-storage-rmdirr-master
use system function to recursive remove the directory used by temporary ...
2014-06-06 10:02:23 +02:00
Robin Appelman 46f70aabfd Dont connect hooks twice 2014-06-06 09:56:02 +02:00
Bjoern Schiessle 3459f99dd6 make sure that we only delete shares for the current user 2014-06-06 09:56:02 +02:00
Bjoern Schiessle eec1c4398a only unshare user share if it was shared with the current user 2014-06-06 09:56:02 +02:00
Bjoern Schiessle 5bbfdc35d7 make sure that we remove all shares refering to the same parent 2014-06-06 09:56:02 +02:00
Bjoern Schiessle 86d7371d0c fix unshareFromSelf() 2014-06-06 09:56:02 +02:00
Robin Appelman e362373a30 Movable storage root can always be moved and deleted 2014-06-06 09:56:01 +02:00
Robin Appelman a432459685 use triple equals 2014-06-06 09:56:01 +02:00
Robin Appelman 42a362f249 Fix phpdoc and comments 2014-06-06 09:56:01 +02:00
Bjoern Schiessle b0a74edbb2 allow moving files to the root 2014-06-06 09:56:00 +02:00
Bjoern Schiessle 329bfd81c3 remove encryption keys if user unshares a file 2014-06-06 09:55:59 +02:00
Robin Appelman dea5219244 Fix folder name for storage root 2014-06-06 09:55:59 +02:00
Bjoern Schiessle bf5e9357fc don't allow to share single files with delete permissions, user should only be possible to unshare a single file but never to delete it 2014-06-06 09:55:59 +02:00
Robin Appelman 4fbc991ea2 Add the removing logic for mounts 2014-06-06 09:55:59 +02:00
Robin Appelman 8abe1c3f1a Don't do rename hooks for cache when moving the mountpoint 2014-06-06 09:55:58 +02:00
Robin Appelman 60a659c87e Add a system for (re)movable mount points 2014-06-06 09:55:58 +02:00
Thomas Müller 79b65269c9 Merge pull request #8877 from owncloud/getpath-storage-check
Verify that we have a valid storage in View->getPath
2014-06-06 09:44:57 +02:00
Thomas Müller d359765bdc Update PHPDoc 2014-06-06 09:44:34 +02:00
Georg Ehrke a110973b3a some additional type checks 2014-06-06 09:41:53 +02:00
Thomas Müller ad4ec414c9 use system function to recursive remove the directory used by temporary storage 2014-06-06 09:29:31 +02:00
Jörn Friedrich Dreyer aaf0d13171 make search non-static, add ISearch to server container, make legacy a static wrapper for it, move provider and result to public api 2014-06-06 01:17:02 +02:00
Georg Ehrke 0fe8f77c17 Merge branch 'master' into update_shipped_apps_from_appstore
Conflicts:
	lib/private/app.php
	settings/templates/apps.php
2014-06-05 22:54:27 +02:00
Jörn Friedrich Dreyer 5034bd1b12 minor phpdoc cleanup and imports 2014-06-05 19:49:21 +02:00
Andrew Brown 7a224f5762 Move new search results to 'lib/private/search' 2014-06-05 19:23:44 +02:00
Andrew Brown 8a223eb62d Move legacy search to 'lib/private/legacy'
This fixes errors where apps would try to start providers using
OC_Search and would fail. Also, made OC_Search simply inherit from
\OC\Search.
2014-06-05 19:23:44 +02:00
Andrew Brown 70be98f6d0 Add audio and image result types 2014-06-05 19:22:22 +02:00
Andrew Brown c46d514733 Add audio and image result types 2014-06-05 19:22:22 +02:00
Jörn Friedrich Dreyer afd24385a8 fix formatting 2014-06-05 19:22:22 +02:00
Andrew Brown ac72828eae Move to new namespace convention and add new result sub-classing 2014-06-05 19:21:47 +02:00
Thomas Müller 70e0ae0637 Merge pull request #8483 from owncloud/encryption_use_oc_preferences
[encryption] use oc preferences
2014-06-05 18:54:25 +02:00
Vincent Petry 1c59808517 Merge pull request #8865 from owncloud/improve_share_settings
Improve share settings
2014-06-05 17:23:42 +02:00
Bjoern Schiessle 2d83424a29 allow to set pre-condition for setValue 2014-06-05 16:54:03 +02:00
Thomas Müller 4b650a20a4 Merge pull request #8893 from owncloud/feature/get-users-by-preference
Add method to get users by their preference
2014-06-05 16:52:00 +02:00
Thomas Müller fad3bd7fc0 reenable checkCode() 2014-06-05 16:32:46 +02:00
Robin Appelman 00539cf8f9 Verify that we have a valid storage in View->getPath 2014-06-05 15:50:19 +02:00
Bjoern Schiessle 6578f00b4b unify share settings 2014-06-05 15:49:34 +02:00
Thomas Müller 3dbfd1fe46 Merge pull request #8529 from owncloud/remove-legacy-routing
Remove legacy routing code
2014-06-05 15:22:46 +02:00
Markus Goetz e6665a0542 WebDAV Permissions: Distinguish between renameing and moving 2014-06-05 14:39:06 +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
Vincent Petry bbdcbb9911 Merge pull request #8866 from owncloud/flock-quotafix
Fixed quota wrapper to return the value from flock()
2014-06-05 13:11:45 +02:00
Joas Schilling 4b18967129 Hack around oracle for CLOB fields 2014-06-05 12:19:48 +02:00
Joas Schilling 879237f32a Add method to get users by their preference 2014-06-05 11:50:43 +02:00
Lukas Reschke ac7fb1b23e Remove legacy routing code
The getfile routing code was absolutely legacy and not needed anymore. Additionally \OC::$REQUESTEDAPP was never set to the actually accessed application.

This commit removes the legacy routing code and ensures that $REQUESTEDAPP is always set so that other applications (e.g. the firewall or a two-factor authentication) can intercept the currently accessed app.

Testplan:
[x] Installation works
[x] Login with DB works
[x] Logout works
[x] Login with alternate backend works (tested with user_webdavauth)
[x] Other apps are accessible
[x] Redirect on login works (e.g. index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fapps%3Finstalled)
[x] Personal settings are accessible
[x] Admin settings are accessible
[x] Sharing files works
[x] DAV works
[x] OC::$REQUESTEDAPP contains the requested application and can be intercepted by other applications
2014-06-05 11:45:45 +02:00
icewind1991 bd373d9621 Merge pull request #7878 from owncloud/quota-extstorageswitch
Added switch to count external storage data in quota
2014-06-05 11:23:32 +02:00
Jörn Friedrich Dreyer f1bf06f8cf Merge pull request #8884 from owncloud/move-flock-to-app
remove file locking - code will continue to live in it's own app
2014-06-05 10:54:24 +02:00
Vincent Petry 71b86136c2 Merge pull request #8878 from owncloud/update-checkmigrationforapps
Simulate apps database schema update on upgrade
2014-06-05 10:28:30 +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
josh4trunks ea162c8a39 Fix variable not always being defined. 2014-06-04 23:03:13 -07:00
josh4trunks e77c9bb97e Work with MySQL Sockets
This passes anything that is not a valid port (0<int<65535) as a unix socket.
I tested this with unix sockets; this needs to be tested with a non-standard mysql port as well but I don't foresee any issues.

To use a unix socket, even one different than PHP's mysql.default_socket..
* Database Host = localhost:/path/to/socket
2014-06-04 22:50:23 -07:00
Thomas Müller c044ff99ce Merge pull request #8724 from owncloud/update-sabre-2.0
Update SabreDAV to 1.8.10
2014-06-04 23:05:34 +02:00
Thomas Müller ec7225da66 remove file locking - code will continue to live in it's own app 2014-06-04 20:11:54 +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 d4ffafe467 Removed simulate db update flag and split into separate methods 2014-06-04 18:17:46 +02:00
Thomas Müller 48eee0b432 use the right interface \Sabre\DAVACL\PrincipalBackend\BackendInterface 2014-06-04 17:47:09 +02:00
Vincent Petry 5b97369b00 Simulate apps database schema update on upgrade
When upgrade, also simulate the database schema update for apps before
doing the actual upgrade.
2014-06-04 17:16:44 +02:00
Georg Ehrke 724d027f19 add unit test 2014-06-04 16:29:41 +02:00
Vincent Petry da889ff029 Added experimental switch to count external storage data in quota
This includes all mountpoints except the Shared one in
the used space calculation.

Added unit tests for ext storage inclusion in quota calculation
2014-06-04 16:08:59 +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
Vincent Petry 3507964820 Fixed quota wrapper to return the value from flock() 2014-06-04 12:36:53 +02:00
Thomas Müller 76e04027bc Upgrade SabreDAV to 1.8.10
Updating SabreDAV namespaces
2014-06-04 12:22:23 +02:00
ringmaster 0a417b1174 Use ->instanceOfStorage() not instanceof for Storage instances. 2014-06-04 07:55:46 +02:00
Bjoern Schiessle 48eb0515e9 only lock if unlink is called for a file 2014-06-04 07:55:46 +02:00
Bjoern Schiessle ab6680e9ab name the storage wrapper to make sure that we don't apply the wrapper multiple times 2014-06-04 07:55:46 +02:00
ringmaster cda87fd9c4 Normalize lock exception messages. 2014-06-04 07:55:45 +02:00
ringmaster ba887d2b17 Restore the reference to this used exception class. 2014-06-04 07:55:45 +02:00
ringmaster 54865815f5 Move Lock to private namespace, add interface. Update PHPDoc. 2014-06-04 07:55:45 +02:00
ringmaster c9c6a0ab1e Don't error out on console. 2014-06-04 07:55:45 +02:00
ringmaster 392a1b6662 Removed unused vars/declarations, update PHPDoc. 2014-06-04 07:55:45 +02:00
Lukas Reschke 826b14e36b Fix typo 2014-06-04 07:55:45 +02:00
Lukas Reschke 9bbc4b0034 Fix typo 2014-06-04 07:55:44 +02:00
ringmaster 896bc526e6 Remove unused methods. 2014-06-04 07:55:44 +02:00
ringmaster 6b94732bdf Respect locked files, surface correct exception. 2014-06-04 07:55:44 +02:00
ringmaster 428510a4f8 Simpler log unique id. 2014-06-04 07:55:44 +02:00
ringmaster f9dbdb7c5c Add actual locking and log changes necessary for debugging. 2014-06-04 07:55:44 +02:00
ringmaster dc1e3620d2 Continued flock work. 2014-06-04 07:55:44 +02:00
ringmaster 5365ae416e flock changes. Work in progress. 2014-06-04 07:55:44 +02:00
Robin Appelman a6bb1e1bf8 Fix size calculation during recursive scan 2014-06-03 19:54:59 +02:00
Thomas Müller 6764d5b122 Merge pull request #8698 from owncloud/sharing_improve_permissions
get permissions directly from share storage to avoid additional db calls
2014-06-03 19:13:51 +02:00
icewind1991 cdf8a123e7 Merge pull request #8264 from owncloud/app-enable-by-group
Add the option to enable apps only for specific groups
2014-06-03 19:01:12 +02:00
Thomas Müller e4c3ff03d6 Merge pull request #8809 from owncloud/appconfig-caching
Improve caching in AppConfig
2014-06-03 18:59:37 +02:00
icewind1991 68b15f3282 Merge pull request #7015 from owncloud/db-migration-check-copy
Check database migration on a copy of the table first
2014-06-03 16:27:06 +02:00
Georg Ehrke 19129b3db2 use isset() instead of array_key_exists() 2014-06-03 16:23:33 +02:00
Thomas Müller 587159c73e Merge pull request #8838 from owncloud/backgroundjob-legacy-gc
Support having legacy `OC_Cache_FileGlobalGC` background jobs
2014-06-03 15:06:35 +02:00
Thomas Müller 79b3558c6d Merge pull request #7151 from owncloud/user-jquery
Continuing the New User management
2014-06-03 15:04:30 +02:00
Thomas Müller 2b1a7a76c3 Merge pull request #8425 from owncloud/columns_should_be_nullable_by_default
columns should be nullable by default
2014-06-03 12:55:42 +02:00
Robin Appelman 3b1f291c60 Fix sorting of apps 2014-06-03 12:42:35 +02:00
Robin Appelman c09852e006 Fix phpdoc 2014-06-03 12:42:35 +02:00
Robin Appelman 53dc30af4f Add option to enable app for specific groups 2014-06-03 12:42:35 +02:00
Robin Appelman b4025b3174 Allow enabling apps by group by setting the config value to a json encoded array of groups 2014-06-03 12:42:35 +02:00
Robin Appelman 6ed3194863 Use a map to prevent having to use search 2014-06-03 12:40:23 +02:00
Robin Appelman bff9e11ff9 Remove duplicate cache cleanup 2014-06-03 12:38:15 +02:00
Robin Appelman 4429b54ce4 Fix typo 2014-06-03 12:00:39 +02:00
Robin Appelman 82b982a4eb Better unique names for temporary tables 2014-06-03 11:24:31 +02:00
Robin Appelman 3be2643168 Add `generateChangeScript()` back 2014-06-03 11:19:58 +02:00
Robin Appelman 397a763c49 add a getter for the table 2014-06-03 11:18:46 +02:00
Robin Appelman c6053b2830 Quote identifiers on mysql 2014-06-03 11:18:45 +02:00
Robin Appelman 6f71419f2b Skip migration checks for all sql backends besides mysql, postgres and sqlite 2014-06-03 11:18:45 +02:00
Robin Appelman a59f6818eb Only quote identifiers for oracle during migration 2014-06-03 11:18:45 +02:00
Robin Appelman 3b4555ca91 Try and check migration before applying it 2014-06-03 11:18:17 +02:00
Robin Appelman adeac7aa39 Check sqlite migration on a copy of the database file 2014-06-03 11:17:21 +02:00
Robin Appelman 35550e8d9a Fix migrator for postgres 2014-06-03 11:17:21 +02:00
Robin Appelman be80dce585 Fix temporary schema creation 2014-06-03 11:17:21 +02:00
Robin Appelman 58c61c8336 Fix generating migration test schemas 2014-06-03 11:17:21 +02:00
Robin Appelman 0035147be9 Create unique names for temporary indexes 2014-06-03 11:17:21 +02:00
Robin Appelman 9c6a93a87c Add a mechanism to try the database migration on a copy of the tables before running it on the "real" data 2014-06-03 11:17:21 +02:00
Robin Appelman ec9bf8a2d6 Support having legacy `OC_Cache_FileGlobalGC` background jobs 2014-06-03 11:01:01 +02:00
Georg Ehrke eea501b847 various fixes as requested by pr reviewers 2014-06-02 21:39:15 +02:00
Robin Appelman 6689d67a5b Fix recursive scanning 2014-06-02 21:04:36 +02:00