Commit Graph

2573 Commits

Author SHA1 Message Date
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
Morris Jobke 5d296aa6b1 Merge pull request #12969 from owncloud/clarify-docs
Clarify return values
2014-12-22 10:01:39 +01:00
Morris Jobke c17b9ec068 Merge pull request #12983 from owncloud/root-iface
Add an interface for the root folder so apps have an interface to deal with storage
2014-12-22 09:05:23 +01:00
Bernhard Posselt 8e37214346 add an interface for the root folder so apps have an interface to deal with storage
fix comments and newline

add newline
2014-12-21 20:52:34 +01:00
Thomas Müller dc12f5d9af Merge pull request #12978 from owncloud/fix-support-claim
Change support message to be more explicit about the enterprise edition
2014-12-21 20:30:43 +01:00
Thomas Müller c3544bd27e Merge pull request #12982 from owncloud/timefac-iface
Add an interface for the timefactory class
2014-12-21 20:27:53 +01:00
Bernhard Posselt ba03b0b843 add an interface for the timefactory class
fix indention
2014-12-20 15:53:31 +01:00
Morris Jobke 5383d83f9e Change support message to be more explicit about the enterprise edition 2014-12-20 11:57:15 +01:00
derkostka 1c22b1f626 Fix Undefined variable: result at tags.php#231
Fix app":"PHP","message":"Undefined variable: result at \/var\/www\/owncloud\/lib\/private\/tags.php#231" by moving the function call into the respective loop

Adjust indentation

Do it right - indentation

sorry, this is my first one
2014-12-19 19:44:43 +01:00
Björn Schießle 8164415b45 Merge pull request #12749 from owncloud/server2server-sharing-ng
server to server sharing next generation
2014-12-19 19:04:44 +01:00
blizzz ad6814f920 Merge pull request #12101 from owncloud/ldap_split_mapping
Ldap split mapping from Access superclass
2014-12-19 18:52:30 +01:00
Arthur Schiwon ec0f80fee9 Split mapping from Access and Helper classes into it's own. Fully test them, too.
remove unused methods

split mapping methods off from Access class

fix DB query handling

move 'clear mapping' methods from static helper to new mapping class

add tests

test directly with DB

finishing tests and fix return value from setDNbyUUID

add corresponding class for groups and make abstract test class neutral. helper tests is now obsolete as the tested functions were moved to the new mapper class.

add missing info to PHPDoc

add unmap method

fix namespaces

fix test inheritance

PHPDoc and a small code restructure for scrutinizer, no effective changes

PostgreSQL does not accept LIMIT in DELETE queries

phpdoc fixes, no code changes
2014-12-19 18:26:12 +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
Lukas Reschke f671b232cc Merge pull request #12923 from owncloud/ultra-slim-version-of-incognito-mode
Add ultra-slim hack for incognito mode
2014-12-19 14:54:11 +01:00
Lukas Reschke dbbf568192 Fix typo 2014-12-19 14:36:00 +01:00
Lukas Reschke a022e65285 Clarify return values
This function returns `null` when no user is logged-in.
2014-12-19 14:17:40 +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
Lukas Reschke 157ff1219a Merge pull request #12954 from owncloud/hhvm-apc-clear
HHVM: In APC cache clear, only request the cache key in APCIterator.
2014-12-19 10:46:20 +01:00
Morris Jobke 6b3600d2bf Merge pull request #12918 from owncloud/use-uid-instead-of-login-name
Return UID instead of login name
2014-12-19 10:24:52 +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 0ba5c182f0 HHVM: In APC cache clear, only request the cache key in APCIterator.
The default value of the $format parameter of the APCIterator constructur is
APC_ITER_ALL which instructs the iterator to provide all available information
on cache values being iterated over. Only the key value is necessary for
matching and deletion via apc_delete(), though.

This prevents a "Format values FILENAME, DEVICE, INODE, MD5, NUM_HITS, MTIME,
CTIME, DTIME, ATIME, REFCOUNT not supported yet." notice on HHVM.
2014-12-19 03:24:00 +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
Jörn Friedrich Dreyer 891474b0d6 Merge pull request #12759 from owncloud/core-reduce-js-and-css
make sure styles and scripts are only loaded once
2014-12-18 23:18:37 +01:00
Morris Jobke 609e10238f Merge pull request #12945 from owncloud/hhvm-image
HHVM: Do not call filesize(null), this function expects a string.
2014-12-18 22:20:56 +01:00
Andreas Fischer 3ebb69944b Do not call filesize(null), this function expects a string.
filesize(null) yields an int on HHVM and thus exif_imagetype(null) is called.
2014-12-18 20:57:19 +01:00
Morris Jobke 85301c8b85 Merge pull request #12940 from drarko/master
Fix extra quotes in custom tags in header
2014-12-18 18:44:44 +01:00
Vincent Petry 6224e29f25 Fix code style issues for tags plugin 2014-12-18 16:43:00 +01:00
drarko faaa1a89cb Fix extra quotes in custom tags in header
Fix #12939
2014-12-18 12:40:08 -03:00
Robin Appelman 1ef01de402 Merge pull request #12907 from owncloud/delete-invalid-external-share
Fix deleting invalid s2s shares
2014-12-18 16:38:13 +01:00
Vincent Petry 3c67900421 Remove obsolete method 2014-12-18 16:04:36 +01:00
Robin McCorkell 619dcae7af Merge pull request #12901 from owncloud/move-ldap-check-to-manager
Move the Null-Byte LDAP check to the user manager
2014-12-18 00:28:00 +00:00
Robin McCorkell d83fdd7f9d Merge pull request #12913 from owncloud/hhvm-memcached-clear
HHVM: Add workaround for missing Memcached::deleteMulti()
2014-12-18 00:27:07 +00:00
Morris Jobke 232d4385f4 Merge pull request #12917 from owncloud/fix-ocs-12915-api
Move basic auth login out of `isLoggedIn`
2014-12-18 00:57:22 +01:00
Lukas Reschke e3230b5bc2 Add ultra-slim hack for incognito mode
As discussed at https://github.com/owncloud/core/pull/12912#issuecomment-67391155
2014-12-17 21:53:43 +01:00
Morris Jobke 3d006207d1 Merge pull request #12892 from owncloud/is-addmin
Add isAdmin and isInGroup methods for the group manager
2014-12-17 21:40:26 +01:00
Lukas Reschke 9031d79597 Return UID instead of login name
Without this OCS on LDAP is broken for API requests coming via Basic Authentication...
2014-12-17 20:33:22 +01:00
Lukas Reschke a02b00445e Store result of authentication 2014-12-17 20:22:51 +01:00
Lukas Reschke b91a435ed4 Move basic auth login out of `isLoggedIn`
Potentially fixes https://github.com/owncloud/core/issues/12915 and opens the door for potential other bugs...

Please test very carefully, this includes:

- Testing from OCS via cURL (as in #12915)
- Testing from OCS via browser (Open the "Von Dir geteilt" shares overview)
- WebDAV
- CalDAV
- CardDAV
2014-12-17 20:12:14 +01:00
Andreas Fischer fcf3c5197f HHVM: Add workaround for missing Memcached::deleteMulti() 2014-12-17 18:10:11 +01:00
Bernhard Posselt 6779bf113d add isAdmin and isInGroup methods for the group manager 2014-12-17 17:41:57 +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
Andreas Fischer 8c509c3437 HHVM: Call libxml_use_internal_errors() instead of surpressing errors.
In contrast to the previous solution, this also works on HHVM.
2014-12-17 17:00:10 +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 9ddd5033d4 Movable mountpoints are always deletable 2014-12-17 16:09:28 +01:00
Robin Appelman 2eab0f2121 Allow disabling previews per mount 2014-12-17 14:03:50 +01:00
Robin Appelman fd85424742 Add getMountPoint to FileInfo 2014-12-17 14:03:50 +01:00
Robin Appelman 95a145f67f Load mount specific options from the mount config 2014-12-17 14:03:50 +01:00
Lukas Reschke f6820406b6 Move the Null-Byte LDAP check to the user manager
The existing method is deprecated and just a wrapper around the manager method. Since in the future other code paths might call this function instead we need to perform that check here.

Related to http://owncloud.org/security/advisory/?id=oc-sa-2014-020
2014-12-17 12:47:00 +01:00