Commit Graph

2667 Commits

Author SHA1 Message Date
Roeland Jago Douma a54be132fc Removed deprecated unsused function OC_Helper::getStringMimeType 2015-12-18 13:43:44 +01:00
Roeland Jago Douma 4f20e3bac0 Removed deprecated OC_Helper::getSecureMimeType 2015-12-18 13:42:59 +01:00
Morris Jobke a18c0983d5 Use TempManager instead of tmpFile 2015-12-18 11:25:33 +01:00
Morris Jobke 90b0831cec Use TempManager instead of tmpFolder 2015-12-18 11:19:53 +01:00
Thomas Müller 9e97bef935 Merge pull request #21268 from owncloud/cleanup-OC_Helper-getFileNameMimeType
Use proper public API for OC_Helper::getFileNameMimeType
2015-12-18 10:15:33 +01:00
Thomas Müller 551e553bf4 Merge pull request #21264 from owncloud/deprecated_oc_user_methods
Cleanup OC_User deprecated methods
2015-12-18 10:15:18 +01:00
Thomas Müller 2709244acd Only perform tearDown operations on the database if we have a connection to it ..... 2015-12-17 17:29:50 +01:00
Thomas Müller 8f6a257f1b Use proper base class 2015-12-17 17:29:17 +01:00
Thomas Müller 26f416b9f5 Assert that there are no xml error left 2015-12-17 17:18:42 +01:00
Morris Jobke ecdf88e41b Use proper public API for OC_Helper::getFileNameMimeType 2015-12-17 17:07:48 +01:00
Roeland Jago Douma 1f715289bf Removed deprecated function OC_User::deleteUser
Replaced with proper OCP calls
2015-12-17 16:18:40 +01:00
Roeland Jago Douma 835911bce5 Removed deprecated private OC_User::createUser
All function calls are replaced with the recommended (which was already
the body of the function).
2015-12-17 16:18:40 +01:00
Roeland Jago Douma 7e44ea5da0 Remove deprecated function OC_User::getManager
Private deprecated function => removed
Replaced all instances with suggested replacement
2015-12-17 16:18:34 +01:00
Thomas Müller e3ed42135d Merge pull request #21240 from owncloud/avatar_speedup
Avatar speedup
2015-12-17 14:43:21 +01:00
Roeland Jago Douma 205c239eab Remove deprecated OC_Helper::linkTo function 2015-12-17 11:51:40 +01:00
Roeland Jago Douma 3e80f14269 [Avatar] Make the avatar controller use the avatar node 2015-12-16 21:41:58 +01:00
Roeland Jago Douma d796c43841 [Avatars] Add function to get the Node of the avatar
Since we usually just get the avatar and stream the content to the users
there is no need to first create an image in memory.
2015-12-16 20:29:02 +01:00
Björn Schießle efc030aa25 don't allow to create a federated share if source and target server are the same 2015-12-14 17:16:14 +01:00
Thomas Müller f831d93f3f Merge pull request #20878 from owncloud/proper-htaccess-support-in-code-signing-checker
Also run .htaccess routine when installing on another system than Apache
2015-12-11 11:46:37 +01:00
Thomas Müller 6317ba8cb4 Merge pull request #21135 from owncloud/add-polyfill
Add polyfills for PHP55, PHP56 and PHP70 functionalities
2015-12-11 11:40:51 +01:00
Lukas Reschke f3360d51c6 Use PHP polyfills 2015-12-11 08:47:36 +01:00
Scrutinizer Auto-Fixer ffc49a24f0 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-12-10 16:43:37 +01:00
Thomas Müller df15d54db6 Merge pull request #21072 from owncloud/db-lock-ttl
Remove all locks after ttl from the db
2015-12-10 13:51:18 +01:00
Thomas Müller 75c3d64635 Merge pull request #21105 from owncloud/fix-risky-test-comments
Add assertion to test
2015-12-10 11:02:27 +01:00
Lukas Reschke 29b6a03fc1 Add assertion to test
This seems to be missing on that test.
2015-12-10 09:29:24 +01:00
Lukas Reschke 715b0941ee Make compatible with PHPUnit 5.1
`addWarning` needs to be defined as well for it:

```
➜  master git:(master) ✗ bash autotest.sh sqlite
Using PHP executable /usr/local/opt/php56/bin/php
Parsing all files in lib/public for the presence of @since or @deprecated on each method...

Using database oc_autotest
Setup environment for sqlite testing on local storage ...
Installing ....
ownCloud is not installed - only a limited number of commands are available
Mac OS X is not supported and ownCloud will not work properly on this platform. Use it at your own risk!
 -> For the best results, please consider using a GNU/Linux server instead.
creating sqlite db
ownCloud was successfully installed
Testing with sqlite ...
No coverage
/usr/local/bin/phpunit --configuration phpunit-autotest.xml --log-junit autotest-results-sqlite.xml
PHP Notice:  Constant PHPUNIT_RUN already defined in /Users/lukasreschke/Documents/Programming/master/apps/firstrunwizard/tests/bootstrap.php on line 6
PHP Stack trace:
PHP   1. {main}() /usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar:514
PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/Command.php:106
PHP   4. PHPUnit_TextUI_Command->handleArguments() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/Command.php:117
PHP   5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/Command.php:663
PHP   6. PHPUnit_Util_Configuration->getTestSuite() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/Util/Configuration.php:796
PHP   7. PHPUnit_Framework_TestSuite->addTestFile() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/Util/Configuration.php:926
PHP   8. PHPUnit_Util_Fileloader::checkAndLoad() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/Framework/TestSuite.php:335
PHP   9. PHPUnit_Util_Fileloader::load() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/Util/Fileloader.php:38
PHP  10. include_once() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/Util/Fileloader.php:56
PHP  11. loadDirectory() /Users/lukasreschke/Documents/Programming/master/tests/apps.php:42
PHP  12. require_once() /Users/lukasreschke/Documents/Programming/master/tests/apps.php:20
PHP  13. define() /Users/lukasreschke/Documents/Programming/master/apps/firstrunwizard/tests/bootstrap.php:6
PHP Fatal error:  Class StartSessionListener contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PHPUnit_Framework_TestListener::addWarning) in /Users/lukasreschke/Documents/Programming/master/tests/startsessionlistener.php on line 47
PHP Stack trace:
PHP   1. {main}() /usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar:514
PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/Command.php:106
PHP   4. PHPUnit_TextUI_TestRunner->doRun() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/Command.php:155
PHP   5. PHPUnit_TextUI_TestRunner->handleConfiguration() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/TestRunner.php:153
PHP   6. require_once() phar:///usr/local/Cellar/phpunit/5.1.0/libexec/phpunit-5.1.0.phar/phpunit/TextUI/TestRunner.php:805
```
2015-12-10 09:22:41 +01:00
Arthur Schiwon 81d763be42 use expectedException annotation, not via method call, for consistency 2015-12-09 16:55:07 +01:00
Arthur Schiwon fdd06ba1f8 use getLastInsertId from query builder for convenience 2015-12-09 16:33:34 +01:00
Robin Appelman e191953942 Remove all locks after ttl from the db 2015-12-09 14:53:24 +01:00
Arthur Schiwon 8e298f51f8 adjust test's fakemanager to interface change 2015-12-09 14:38:01 +01:00
Arthur Schiwon 0c1c029571 hardening, add some checks for whitespace-only strings 2015-12-09 14:34:23 +01:00
Arthur Schiwon 8acbb7aef9 rework test about overwriting default comments manager 2015-12-09 14:34:23 +01:00
Arthur Schiwon d3692c3283 namespaces for tests 2015-12-09 14:34:23 +01:00
Arthur Schiwon 9a440c06b0 OC not oc 2015-12-09 14:34:23 +01:00
Arthur Schiwon e3dbc3d40c different strategy in cleaning up after user was deleted
we do not listen to deletion hooks anymore, because there is no guarantee that they
will be heard - requires that something fetches the CommentsManager first.

Instead, in the user deletion routine the clean up method will be called directly. Same way
as it happens for files, group memberships, config values.
2015-12-09 14:34:23 +01:00
Arthur Schiwon 2ce2de0ae5 add icommentsmanger and icomment implementation
register CommentsManager service, allow override, document in config.sample.php

don't insert autoincrement ids in tests, because of dislikes from oracle and pgsql

specify timezone in null date

only accepts strings for ID parameter that can be converted to int

replace forgotten hardcoded IDs in tests

react on deleted users

react on file deletion

Postgresql compatibility

lastInsertId needs *PREFIX* with the table name

do not listen for file deletion, because it is not reliable (trashbin, external storages)

add runtime cache for comments
2015-12-09 14:34:23 +01:00
Thomas Müller 7fb2f7f5fe Merge pull request #21068 from owncloud/fix-exit-code-autotest-external
Fix exit code autotest external
2015-12-09 13:02:25 +01:00
Thomas Müller bb02488cc2 remove deprecated strict setting 2015-12-09 12:10:12 +01:00
Thomas Müller 5c95939bf3 Merge pull request #21061 from owncloud/fix-oracle-last-insert-id-test
Fix the last insert id test by changing to an autoincremen…
2015-12-09 11:53:43 +01:00
Thomas Müller bc744ff6de Merge pull request #21038 from owncloud/share-computesharepermissions-notstore
Fix (re)share permission checks in a few code paths
2015-12-09 10:04:56 +01:00
Joas Schilling 5c0be3b565 Fix the last insert id test by changing to an autoincrement table 2015-12-09 09:51:33 +01:00
Vincent Petry 28e9bc1156 Fix more unit tests to pass a mock storage instead of null to FileInfo 2015-12-08 16:33:39 +01:00
Thomas Müller 45fe8271ab Merge pull request #21030 from owncloud/querybuilder-new-features
Querybuilder new features
2015-12-08 13:51:45 +01:00
Thomas Müller 85409b6701 Merge pull request #20786 from owncloud/systemtags-dav
DAV endpoint for system tags
2015-12-08 13:51:25 +01:00
Joas Schilling 9f98849306 Add a method to the get "to use" table and column name 2015-12-08 11:04:28 +01:00
Thomas Müller fe8dc0bd5e Merge pull request #21022 from owncloud/get-rid-of-by-reference
Get rid of by reference
2015-12-08 11:04:25 +01:00
Joas Schilling a3391248e4 Add select distinct to the query builder 2015-12-08 09:49:21 +01:00
Joas Schilling f2c7acb3c0 Allow getting the last insert id without much hassle 2015-12-08 09:40:20 +01:00
Lukas Reschke 6d3eb7673d Add unit test for nested arrays 2015-12-08 09:07:38 +01:00
Lukas Reschke 8289943a0f Do not trust casting 2015-12-08 08:50:00 +01:00