Commit Graph

1448 Commits

Author SHA1 Message Date
Bernhard Posselt 983563d7d9 add tests for closing the cursor 2015-01-29 19:23:57 +01:00
Bernhard Posselt 37e8969d34 ignore cursorclosing 2015-01-29 19:16:28 +01:00
Robin Appelman 05035ef4af Fix webdav put for single file webdav shares 2015-01-29 12:47:12 +01:00
Robin Appelman ddee63fa00 Fix resolving paths for views rooted in a file 2015-01-29 12:47:11 +01:00
Robin Appelman cec43df0f0 Add unit test 2015-01-28 13:44:39 +01:00
Robin Appelman 2124540d1d Dont remove a file from cache if the delete operation failed 2015-01-29 15:39:56 +01:00
Morris Jobke 752b94d363 Merge pull request #13717 from owncloud/storage-donotwrapnullstorage
Prevent wrapping null storage
2015-01-28 01:00:20 +01:00
Vincent Petry 6d8985b671 Prevent wrapping null storage
Can happen when trying to instantiate external storages that have
incomplete config, where the constructor throws an exception (the
exception is caught in createStorage())
2015-01-27 17:40:08 +01:00
Vincent Petry acec40fe5a Merge pull request #13561 from owncloud/trash-finaldeletewhencrossstoragefix
Call final unlink in trash wrapper's storage
2015-01-27 17:05:38 +01:00
Bjoern Schiessle 5ba19ba7fc certificate manager should always use a \OC\Files\View otherwise we will get problems for different primary storages 2015-01-26 16:58:52 +01:00
Bjoern Schiessle 67da1f7e5a certificate manager only needs the user-id, no need to pass on the complete user object 2015-01-26 16:58:52 +01:00
Thomas Müller 5da4071c45 Merge pull request #13621 from owncloud/system-config-multiset
Add a method to set/unset multiple config values with one write
2015-01-26 13:36:22 +01:00
Olivier Paroz 7fbf1a20d7 Updated the media type of some font types
TTF and TTF have now the same media type
Official since 2013 and supported by Firefox and Chrome
https://www.iana.org/assignments/media-types/application/font-sfnt

Introducing support for Type1 fonts
2015-01-24 01:49:13 +01:00
Robin Appelman 87a1b2bdc4 Preserve mtime when doing cross storage move 2015-01-23 15:11:27 +01:00
Vincent Petry 8fa3e7a6bf Do not retrieve shares through group if user has no group 2015-01-23 15:11:06 +01:00
Joas Schilling c61e9f3912 Add a method to set/unset multiple config values in one call
This reduces the number of file writes we do for config.php and therefor
hopefully helps lowering the chances for empty config.php files
2015-01-23 11:00:53 +01:00
Morris Jobke 3d42ecea37 Fix undefined offset 1 for wrong user mail address
* fixes Undefined offset: 1 at lib/private/mail.php#143
2015-01-22 16:23:50 +01:00
Morris Jobke b5b491d1bb Merge pull request #13509 from owncloud/share-deletechildrenwhenunsharefromgroup
Fix reshare permission change to not impair other deletion code
2015-01-22 10:40:29 +01:00
Vincent Petry 9f137ac259 Fix reshare permission change to not impair other deletion code
A recent change that prevents reshare permission changes to delete group
share children had the side-effect of also preventing group share
children deletion when it needed to be done.

This fix adds an extra flag to isolate the "reshare permission change"
deletion case and keep the other ones as they were before, not only to
fix the regression but also fix other potential regressions in code that
uses this method.

Also updated the comment because now Helper::delete() is no longer
limited to reshares but also applies to group share children.
2015-01-22 10:12:47 +01:00
Robin Appelman 0b9f7642a6 Add unit test 2015-01-21 17:18:47 +01:00
Joas Schilling 7eb8404040 Add a test case for memcaches to store an array 2015-01-20 10:51:04 +01:00
Vincent Petry ef8d38ca27 Fix chunked query for tags + unit test 2015-01-19 17:05:44 +01:00
Thomas Müller d2d6472e39 Merge pull request #13423 from owncloud/share-fixfindshareforuserwithmultiplegroups
Fix getItemSharedWithUser for groups
2015-01-19 12:34:28 +01:00
Lukas Reschke 744cf713f7 Merge pull request #13319 from owncloud/replace-line-breaks-in-app-description
replace line breaks in the app description by spaces - fixes #13315
2015-01-17 01:03:41 +01:00
Vincent Petry 40931a8b0d Fix getItemSharedWithUser for groups
Fixed SQL query for whenever a user has more than one group.
Added missing $owner where clause for group lookup.
Added unit tests for the group cases.
2015-01-16 18:11:13 +01:00
Thomas Müller 051f626617 Merge pull request #13389 from owncloud/issue/13372-failing-oracle-tests-jenkins
Mask table and column names with backticks and add lastInsertID() workar...
2015-01-15 22:41:57 +01:00
Robin Appelman 0a3e0a1665 Additional unit test for recursive remove 2015-01-15 18:47:05 +01:00
Bernhard Posselt bb0c88a577 always set url parameters when they are available in the app dispatch
prefer url parameters passed into the main method. If they are not present, use the containers urlParameters

add space
2015-01-15 15:22:52 +01:00
Joas Schilling 6769adcd0d Mask table and column names with backticks and add lastInsertID() workaround 2015-01-15 14:43:06 +01:00
Morris Jobke 925a680a24 Merge pull request #13354 from owncloud/hhvm-redis
HHVM: Prevent E_WARNING messages by Redis test in console output.
2015-01-15 00:23:12 +01:00
Thomas Müller 337c43ce92 Merge pull request #13317 from owncloud/partfile-fileinfo
Return valid fileinfo objects for part files
2015-01-14 22:39:19 +01:00
Morris Jobke 64d7463ca3 Merge pull request #13344 from owncloud/issue/13334-cleanup-tags-repairstep
Add a repair step to clean up orphan tags and tag entries
2015-01-14 20:43:23 +01:00
Joas Schilling a22068cce3 Add a repair step to clean up orphan tags and tag entries 2015-01-14 16:49:25 +01:00
Andreas Fischer 567c246094 HHVM: Prevent E_WARNING messages by Redis test in console output. 2015-01-14 14:46:22 +01:00
Morris Jobke 520d8ec53b OC_App::parseAppInfo
* replace line breaks (on non empty lines) in the app description by spaces
* fixes #13315
* includes unit tests
2015-01-14 13:58:31 +01:00
Joas Schilling 4b3a3dc0bb Check new and old ways of required oC version for app compatibility 2015-01-14 13:02:02 +01:00
Robin Appelman 96dff341e2 Return valid fileinfo objects for part files 2015-01-13 13:59:28 +01:00
Vincent Petry fcc3b3d5f7 Fix searchCommon to properly match path name
The internal path was matched without the last "/" which caused
"files_trashbin" to also match when the internal path was "files".

This adds the missing slash for the comparison.
2015-01-12 19:33:00 +01:00
Lukas Reschke 05615bfd47 Simplify isValidPath and add unit tests
The check for invalid paths is actually over-complicated and performed twice resulting in a performance penalty. Additionally, I decided to add unit-tests to that function.

Part of https://github.com/owncloud/core/issues/13221
2015-01-10 00:40:21 +01:00
Thomas Müller 9fb61b42f6 Merge pull request #13208 from owncloud/hhvm-streamwrapper-exception
HHVM Workaround: Do not use Exception from Stream.
2015-01-09 18:02:28 +01:00
Andreas Fischer df849bb69a HHVM Workaround: Do not use Exception from Stream.
Works around https://github.com/facebook/hhvm/issues/2436#issuecomment-69351373
2015-01-09 17:01:17 +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
Thomas Müller 1f1643b35f Merge pull request #12995 from owncloud/tbelau666-master
Use Doctrines filter by table name
2015-01-09 14:17:14 +01:00
Vincent Petry aa821ecc00 Trim leading or trailing slashes in file cache paths 2015-01-08 19:43:02 +01:00
Lukas Reschke 7fbb7f4dc4 Add version to .htaccess
Currently if a user does not replace the .htaccess file with the new update this can lead to serious problems in case Apache is used as webserver.

This commit adds the version to the .htaccess file and the update routine fails in case not the newest version is specified in there. This obviously means that every release has to update the version specified in .htaccess as well. But I see no better solution for it.

Conflicts:
	lib/private/updater.php
2015-01-08 12:49:02 +01:00
Lukas Reschke 3e324f87d0 Use proper test name 2015-01-05 09:54:14 +01:00
Lukas Reschke 7b3f736300 Use proper namespace 2015-01-05 09:54:14 +01:00
Lukas Reschke 0ed00bca43 Use namespace 2015-01-05 09:54:14 +01:00
Lukas Reschke 556c9b6f46 Write unit-tests and use DI 2015-01-05 09:54:12 +01:00
Thomas Müller 40330bf492 Merge pull request #12830 from owncloud/intelligent-container
Intelligent container
2014-12-23 15:36:55 +01:00
Morris Jobke 6fd1a9563e add proper prefix for migration tests 2014-12-23 11:05:53 +01:00
Bernhard Posselt f195123765 Intelligent container
* resolves dependencies by type hint or variable name
* simpler route.php
* implementation of https://github.com/owncloud/core/issues/12829

Generates and injects parameters automatically. You can now build full classes like

    $c->query('MyClassName')

without having to register it as a service. The resolved object's instance will be saved by using registerService. If a constructor parameter is not type hinted, the parameter name will be taken.

Therefore the following two implementations are identical:

    class Class1 { function __construct(MyClassName $class)
    class Class1 { function __construct($MyClassName)

This makes it possible to also inject primitive values such as strings, arrays etc.

In addition if the query could not be resolved, a `QueryException` is now thrown

Routes can now be returned as an array from `routes.php` and an `appinfo/application.php` is optional

Old commit messages:

make it possible to return the routes instead of having to intialize the application
try to get the controller by convention
add first implementation of automatic resolve
add another test just to be sure
store the resolved object
more tests
add phpdoc to public app.php method
use the same variable for the public app.php method
deprecate old methods and add services for public interfaces
deprecated getServer method
disallow private api injection for apps other than core or settings (settings should be an app goddamnit :D)
register userid because its such an often used variable
fix indention and leading slash
use test namespace
add deprecation reasons, remove private api usage checks and remove deprecation from getServer()
add additional public interfaces
add public interface for rootfolder
fix syntax error
remove deprecation from methods where no alternative is there yet
remove deprecated from method which has no alternative
add timezone public service for #12881
add another deprecation hint
move deprecation into separate branch
remove dead comment
first try to get the namespace from the info.xml, if it does not exist, just uppercase the first letter
also trim the namespace name
add an interface for timefactory
move timefactory to public and add icontrollermethodreflector
keep core interface
fix copyright date in headers
2014-12-23 09:50:42 +01:00
Andreas Fischer 4569953e5c Clean up test table in Connection Test to prevent unnecessary failures. 2014-12-23 01:01:58 +01:00
Thomas Müller fe6f4a1404 Merge pull request #11810 from owncloud/hhvm-autotest
Adding autotest-hhvm.sh [WIP]
2014-12-22 14:12:03 +01:00
Andreas Fischer 91e03f5845 Properly call parent::tearDown() in MDB2SchemaManager::tearDown().
The early return introduced by 04c982a96e
prevents parent::tearDown() being called on Oracle.
2014-12-20 15:30:35 +01:00
Bjoern Schiessle 24993280ed Next step in server-to-server sharing next generation, see #12285
Beside some small improvements and bug fixes this will probably the final state for OC8.

To test this you need to set up two ownCloud instances. Let's say:

URL: myPC/firstOwnCloud user: user1
URL: myPC/secondOwnCloud user: user2
Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud".

The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined.

If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.
2014-12-19 15:20:24 +01:00
Thomas Müller 2d64797320 Merge pull request #12956 from owncloud/jenkins-user-backend-names
[jenkins only] introduce names for user backends - IUserBackend
2014-12-19 13:15:50 +01:00
Morris Jobke 6da33e1ea7 introduce names for user backends - IUserBackend
* LDAP with multiple servers also proved backendName
2014-12-19 10:17:17 +01:00
Morris Jobke 39d6ddd38a Merge pull request #12865 from owncloud/files-tags-webdav
Returns tags through WebDAV
2014-12-19 09:33:28 +01:00
Andreas Fischer 48d6724a6f HHVM sets stream meta datum wrapper_type to 'File' instead of 'user-space'. 2014-12-19 00:58:37 +01:00
Morris Jobke 114a6464e8 Merge pull request #12748 from owncloud/redis_cache
Add Redis cache implementation, prefer over memcached, tests & config sample doc
2014-12-19 00:26:25 +01:00
Morris Jobke 75e8b39826 Merge pull request #12879 from owncloud/mountconfig
Add mount specific options
2014-12-18 23:38:14 +01:00
Bernhard Posselt 6779bf113d add isAdmin and isInGroup methods for the group manager 2014-12-17 17:41:57 +01:00
Bernhard Posselt 0f535e3866 fix tests 2014-12-17 17:40:52 +01:00
Bernhard Posselt 0939c3147e use two tests instead of one 2014-12-17 17:40:52 +01:00
Bernhard Posselt 236632702c add a isLoggedIn method to the usersession and deprecate the isLoggedIn method on the api 2014-12-17 17:40:52 +01:00
Vincent Petry 0b3f0716fc Returns and update tags through WebDAV PROPFIND and PROPPATCH
Added oc:tags and oc:favorites in PROPFIND response.
It is possible to update them with PROPPATCH.
These properties are optional which means they need to be requested
explicitly
2014-12-17 16:50:35 +01:00
Robin Appelman fd85424742 Add getMountPoint to FileInfo 2014-12-17 14:03:50 +01:00
Joas Schilling 26100a6dfb Move timezone logic out of server.php 2014-12-16 16:16:22 +01:00
Morris Jobke eb97bb5617 Merge pull request #12846 from owncloud/fix-searchbytags-test
Sort results to make sure assert work on consistent order
2014-12-15 13:23:59 +01:00
Bernhard Posselt be45366013 Merge pull request #12625 from owncloud/app-dependencies-libs-and-commands
adding dependencies for command line tools and php libraries
2014-12-15 12:34:46 +01:00
Vincent Petry 5007289422 Sort results to make sure assert work on consistent order 2014-12-15 11:32:32 +01:00
Morris Jobke efb495b09f Merge pull request #12726 from owncloud/add-filter-for-backend-to-rest-index
Add filter for backend to rest index
2014-12-13 08:50:15 +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
Thomas Müller 79dfff2b4a adding unit tests for PlatformRepository::normalizeVersion() 2014-12-12 13:33:22 +01:00
Joas Schilling 4f92e4a233 Merge pull request #12808 from owncloud/add-special-parameterlist-to-manager
Add special parameterlist to manager
2014-12-12 13:03:26 +01:00
Thomas Müller dcb88e395b rework api of DependencyAnalyzer 2014-12-12 12:34:53 +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 6566dc83e7 single dependencies will not be represented as an array + fix unit tests 2014-12-11 15:37:45 +01:00
Joas Schilling e3dfddb48a Add test for getSpecialParameterList() 2014-12-11 15:01:45 +01:00
Morris Jobke 8fd90e04b6 Merge pull request #12781 from owncloud/jenkins-curl-open-basedir
[Jenkins only] curl open basedir
2014-12-11 14:15:24 +01:00
Joas Schilling 17d68e0638 Merge pull request #12780 from owncloud/make-datetimeformattertest-reliable
Use a fixed timestamp so we dont switch days/years with the getTimestampAgo
2014-12-11 14:11:07 +01:00
Joas Schilling affeea8c72 Use a fixed timestamp so we dont switch days/years with the getTimestampAgo 2014-12-11 13:22:05 +01:00
Joas Schilling cbad5c998b Correctly fallback to english, if the plural case is not translated 2014-12-11 12:42:21 +01:00
Vincent Petry 745d8706b9 Add user parameter to tag manager 2014-12-11 12:22:28 +01:00
Thomas Müller 5a03e0a5cf adding dependency to owncloud version - with fallback to requiremin and requiremax 2014-12-11 12:02:12 +01:00
Thomas Müller ee46548f57 adding dependencies for supported platforms 2014-12-11 12:02:12 +01:00
Thomas Müller 770f987659 adding supported libraries - including min and max version 2014-12-11 12:02:11 +01:00
Thomas Müller 08f1db4451 adding dependencies for command line tools 2014-12-11 12:02:11 +01:00
Lukas Reschke 9ea205dc3d Check if open_basedir is set
The file:// protocol does not work with curl when an open_basedir is set.

This fixes https://github.com/owncloud/core/issues/12016
2014-12-11 00:09:55 +01:00
Thomas Müller 6143232da6 Merge pull request #12746 from owncloud/skip-longpath-test-again
skip testLongPath()
2014-12-10 17:22:04 +01:00
Vincent Petry 5101bc54fa Add login/logout to TestCase base class 2014-12-10 16:11:27 +01:00
Robin Appelman 3898fbc0d2 Merge pull request #12750 from owncloud/cache-numericstorageidfix
Fix numeric storage id for cache wrapper
2014-12-10 15:03:41 +01:00
Joas Schilling fd2599cfc2 Merge pull request #12485 from owncloud/jenkins-12383
New DateTimeFormatter class for dates in other timezones and languages
2014-12-10 14:48:59 +01:00
Vincent Petry ebba54d490 Fix numeric storage id for cache wrapper 2014-12-10 13:05:31 +01:00
Jörn Friedrich Dreyer 363e9667ec Add Redis cache implementation, prefer over memcached, tests & config sample 2014-12-10 12:24:20 +01:00
Thomas Müller d648b548eb skip testLongPath() 2014-12-10 12:20:30 +01:00
Lukas Reschke 5dc6406b70 Add filter for 'backend' to user REST route
This adds a "backend" type filter to the index REST route which is a pre-requisite for https://github.com/owncloud/core/issues/12620

For example when calling `index.php/settings/users/users?offset=0&limit=10&gid=&pattern=&backend=OC_User_Database` only users within the backend `OC_User_Database` would be shown. (requires sending a CSRF token as well)

Depends upon https://github.com/owncloud/core/pull/12711
2014-12-10 12:07:34 +01:00
Joas Schilling 4d232e536e Deprecate Util::formatDate()
Make DateTimeFormatter a service and adjust tests that have been inaccurate
2014-12-10 11:58:56 +01:00