Commit Graph

346 Commits

Author SHA1 Message Date
Morris Jobke 617b3f79fa
Show lock messages only in verbose mode
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:30:11 +02:00
Morris Jobke faab3e733b
Allow to run occ preview:repair in parallel
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-17 16:03:34 +02:00
Morris Jobke 99c9423766
Remove @suppress SqlInjectionChecker
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-16 15:53:56 +02:00
Nils Wittenbrink 0aa550c0ab Fix tense of updater logs
Signed-off-by: Nils Wittenbrink <nilswittenbrink@web.de>
2020-09-10 15:17:59 +02:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Roeland Jago Douma 987f621173
Merge pull request #22331 from nextcloud/bugfix/noid/dont-use-deprecated-inigetwrapper
Don't use deprecated getIniWrapper() anymore
2020-08-20 19:45:47 +02:00
Joas Schilling b09620651c
Don't use deprecated getIniWrapper() anymore
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-20 16:35:38 +02:00
Roeland Jago Douma 5340ab3a75
New SSE key format
* Encrypt the keys with the instance secret
* Store them as json (so we can add other things if needed)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-08-20 15:42:43 +02:00
Morris Jobke fedf9c69d9
Use matching parameter names form interfaces and implementations
Found by Psalm 3.14.1

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 18:16:35 +02:00
Morris Jobke 7506cbb1c4
Show disabled user count in occ user:report
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-19 09:31:41 +02:00
Morris Jobke d7f66c36ac
Fix "misplaced variables" warning of Psalm in PHPDoc statements
Ref #21787

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-17 17:46:57 +02:00
John Molakvoæ (skjnldsv) 9e962fb69f
Allow to update to nightly
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2020-08-07 13:51:39 +02:00
Morris Jobke 545f806666
Use array_filter instead
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-07 10:42:09 +02:00
Morris Jobke d8734b3b93
Add occ preview:migrate to migrate previews from the old flat structure to a subfolder structure
* `php occ preview:repair` - a preview migration tool that moves existing previews into the new location introduced with #19214
* moves `appdata_INSTANCEID/previews/FILEID` to `appdata_INSTANCEID/previews/0/5/8/4/c/e/5/FILEID`
* migration tool can be stopped during migration via `CTRL+C` - it then finishes the current folder (with the previews of one file) and stops gracefully
* if a PHP memory limit is set in the `php.ini` then it will stop automatically once it has less than 25 MiB memory left (this is to avoid hard crashes in the middle of a migration)
* the tool can be used during operation - possible drawbacks:
    * there is the chance of a race condition that a new preview is generated in the moment the folder is already migrated away - so the old folder with the newly cached preview is deleted and one cached preview needs to be re-generated
    * there is the chance of a race condition during access of a preview while it is migrated to the other folder - then no preview can be shown and results in a 404 (as of now this is an accepted risk)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-06 22:05:46 +02:00
Roeland Jago Douma 0157e30ad4
Merge pull request #21599 from nextcloud/debt/noid/type-to-types
Replace TYPE with TYPES
2020-07-02 12:21:01 +02:00
Daniel Kesselberg 87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-06-30 23:46:22 +02:00
Joas Schilling ab21d69903
Add return value to all commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 14:54:51 +02:00
Joas Schilling 5f88380c44
Remove db prefix option from cli install command
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-05-26 14:10:39 +02:00
Morris Jobke e57bca31ad
Merge pull request #20005 from joeried/occ-remove-bruteforce-attempts-by-ip
Implement occ command to reset bruteforce attemps from a given IP address
2020-05-25 14:04:18 +02:00
Joas Schilling 9c025134b3
Fix syntax
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-05-06 10:54:36 +02:00
Mario Danic 6e28c2807b
Add index to properties table
Signed-off-by: Mario Danic <mario@lovelyhq.com>
2020-04-30 23:04:15 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Sander Ruitenbeek 6b62bef928
Display notice for already enabled apps
Signed-off-by: Sander Ruitenbeek <s.ruitenbeek@getgoing.nl>

Signed-off-by: Sander Ruitenbeek <s.ruitenbeek@getgoing.nl>
2020-04-24 16:30:45 +02:00
Christoph Wurst 734c62bee0
Format code according to PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:56:50 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +02:00
Christoph Wurst 42625a46be
Remove spaces after method or function call
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-08 22:24:54 +02:00
Joas Schilling bc6a5ef5c4
Merge pull request #19890 from nextcloud/enh/comments-reference-id
Add optional comments reference_id
2020-04-02 11:34:21 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Joas Schilling 720dc4e93d
Add optional column oc_comments.reference_id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-03-31 10:51:15 +02:00
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
2020-03-27 17:14:08 +01:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst 5a33cb0b78
Register an address book with recent contacts
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 16:16:45 +01:00
Johannes Riedel 0c38569c83 Implement occ command security:bruteforceattemps:reset-for-ip
Signed-off-by: Johannes Riedel <joeried@users.noreply.github.com>
2020-03-19 16:20:22 +01:00
Joas Schilling 0317c5b5c8
Correctly append the port to the host so it's written to the config correctly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-05 13:58:37 +01:00
Christoph Wurst 6127c288e8 Fix license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-13 14:23:49 +01:00
Christoph Wurst 4defd0419a
Merge pull request #18576 from BernieO/bernieo-convertInteractive
enable option '--no-interaction' for db:convert-type
2020-01-07 15:54:06 +01:00
Kim Brose 04aa4cf339
Fix typo in occ
Signed-off-by: Kim Brose <kim.brose@rwth-aachen.de>
2020-01-03 04:17:11 +01:00
Bernhard Ostertag 6a017eb205
Introduce new variable with the default answer to allow option --no-interaction for command occ db:convert-type
Variable is set to true for --no-interaction and false otherwise

Signed-off-by: Bernhard Ostertag <bernieo.code@gmx.de>
2019-12-29 11:03:51 +01:00
Bernhard Ostertag fe0e47bf5e
enable option '--no-interaction' for db:convert-type
Signed-off-by: Bernhard Ostertag <bernieo.code@gmx.de>
2019-12-27 07:50:30 +01:00
Christoph Wurst 1b46621cd3
Update license headers for 18
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Joas Schilling 3eee359d7f
Allow to force enable apps via CLI
Co-authored-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-13 13:06:12 +01:00
Georg Ehrke 699f3a6817
Convert various columns in oc_mounts to bigint
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-12-09 14:13:18 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
blizzz b1dffc5c2d
Merge pull request #17896 from nextcloud/fix/noid/consider-create-group-result
take group creation result into consideration
2019-11-25 17:16:40 +01:00
Roeland Jago Douma 279c0cb2ed
Merge pull request #18098 from nextcloud/fix/migration_import_order
Fix the import order of new migrations
2019-11-25 14:11:09 +01:00
Roeland Jago Douma c7d5b8fc49
Merge pull request #18079 from nextcloud/fixes/phpcs
Some php-cs fixes
2019-11-25 14:07:00 +01:00
Arthur Schiwon b4408e4245
fix and improve check of create group result
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-25 14:01:25 +01:00
Arthur Schiwon 7ff15c9756
fix documentation, get and createGroup may return null
* also have stricter checks in place

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2019-11-25 14:01:25 +01:00
Roeland Jago Douma 20ec763337
Merge pull request #18027 from str0g/fix/14920/convert_type_boolean
Incorrect integer value: '' for column 'password_invalid' while migra…
2019-11-25 11:37:45 +01:00
Roeland Jago Douma f79d98e089
Fix the import order of new migrations
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-25 09:46:39 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma decdb6b40f
Convert more columns to bigint
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-20 19:31:17 +01:00
Łukasz Buśko 23084558a6 Incorrect integer value: '' for column 'password_invalid' while migrating from pg to mysql #14920
Signed-off-by: Łukasz Buśko <busko.lukasz@pm.me>
2019-11-20 14:01:46 +01:00
Christoph Wurst d180a98714
Make it possible to broadcast events to (web) clients
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-10-28 13:58:13 +01:00
John Molakvoæ (skjnldsv) 5d01850dce
Add detailed users listing in occ user:info command
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2019-10-17 10:38:53 +02:00
Thomas Citharel 68cf47e947
Check and add index on principaluri for schedulingobjects table
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-10-08 10:25:56 +02:00
Thomas Citharel 90e5850cc4
Add index on calendarid for calendarobject_props table
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-10-07 22:03:15 +02:00
John Molakvoæ 62399c76e8
Allow group displaynames in the database backend (#17221)
Allow group displaynames in the database backend
2019-10-05 18:34:14 +02:00
Tim Terhorst 2ad33bc06e Add Fatal logging option
Signed-off-by: Tim Terhorst <mynamewastaken+gitlab@gmail.com>
2019-10-02 21:18:29 -05:00
Joas Schilling b9f963225f
Do not allow to have an empty display name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-27 14:29:57 +02:00
Joas Schilling 653628c8fb
Allow to set the group display name in the database backend
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-27 14:29:56 +02:00
John Molakvoæ 5a03189ce7
Mimetype list integrity check should not fail if it's changed (#15810)
Mimetype list integrity check should not fail if it's changed
2019-07-07 20:01:58 +02:00
Georg Ehrke d814089c6a
Fix appid argument for integrity:check-app
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-06-25 14:53:12 +02:00
Xheni Myrtaj d8707c6945
Add function parameter typehint
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
2019-05-29 23:16:06 +02:00
Xheni Myrtaj d227f4d34c
Do not fail integrity check if mimetype list is changed
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
2019-05-29 22:43:23 +02:00
Ruben Homs 98047e8c1c
Stop decryption when maintenance mode is enabled, fixes #8311
Signed-off-by: Ruben Homs <ruben@homs.codes>
2019-05-21 09:24:50 +02:00
Temtaime 887c208f23
Fix #15042 2019-04-18 15:28:00 +03:00
Joas Schilling 592093079f
Deduplicate index names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-27 13:32:59 +01:00
Joas Schilling 274658629d
Make sure all tables have named indexes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-27 13:32:59 +01:00
Joas Schilling 2cc4118629
Merge pull request #14066 from nextcloud/feature/noid/casted-system-values
Get typed system values
2019-02-22 11:54:20 +01:00
Joas Schilling 0c77cd21f9
Make sure maintenance mode is always casted to bool
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-22 08:25:41 +01:00
Daniel Kesselberg 1d1068753f
Fix access to groupManager
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-20 18:05:21 +01:00
Daniel Kesselberg 75b7d6ae4e
Add install logic for enable command
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-19 21:03:06 +01:00
Daniel Kesselberg 03d3192638
Disable multiple apps at once
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-19 21:03:05 +01:00
Daniel Kesselberg 08907ee3e9
Enable multiple apps at once
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-19 21:03:00 +01:00
Daniel Kesselberg 0b58b0faf3
Do not run getRepairSteps in register_commands
getRepairSteps is quite expensive (because every repair step is
initialized and their dependencies are injected). Should not
call it during register.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-02-13 23:06:46 +01:00
Maxence Lange 8002779200
add support for boolean default
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
code cleaning

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
code cleaning

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-01-09 11:21:14 +01:00
Roeland Jago Douma 16cc68a2fe
Add twofactor_providers_uid index
Fixes #12943

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-21 13:03:02 +01:00
Morris Jobke 17b2827bbf
Add setup check for pending bigint conversion
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-12-05 13:42:31 +01:00
Morris Jobke f57e334f83
Fix bigint conversion on SQLite
* on SQLite primary keys can't be bigint - see https://stackoverflow.com/a/18835967/520507

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-12-05 00:35:09 +01:00
Morris Jobke d3b4127164
Show columns to update in CLI interface
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-12-05 00:35:09 +01:00
Joas Schilling bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-08 15:44:45 +01:00
Morris Jobke 4d20c4272f
Fix index names
* see #11527
2018-11-06 15:21:16 +01:00
Morris Jobke 8bfbefa117
Merge pull request #11053 from nextcloud/occ-app-update-command
occ app update command
2018-11-02 00:41:59 +01:00
Morris Jobke 290ede1292
Log exception in case an app update fails
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-01 17:13:42 +01:00
Michael Gerber 020a9add07
Add occ app:update command
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-01 17:13:12 +01:00
Morris Jobke f5a1f4bc1b
Revert "Wait for cron to finish before running upgrade command"
This reverts commit 18e9631810.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-01 15:23:40 +01:00
Morris Jobke 13fe7b6fc1
Merge pull request #11627 from nextcloud/feature/noid/cli-remove-app
Add occ app:remove CLI command
2018-10-30 00:35:45 +01:00
Morris Jobke 8177fdb0f6
Merge pull request #11765 from nextcloud/feature/mandatory-2fa-for-groups
Mandatory 2FA for groups
2018-10-15 10:58:05 +02:00
Christoph Wurst 83e994c11f
Make it possible to enforce mandatory 2FA for groups
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-10-15 08:22:52 +02:00
Evgeny Golyshev ec2f02f4a0 Check if TTY is invalid in encryption:encrypt-all and encryption:decrypt-all
Signed-off-by: Evgeny Golyshev <eugulixes@gmail.com>
2018-10-14 15:06:14 +03:00
Patrik Kernstock 6a00521128 Use error styling for exception message
Signed-off-by: Patrik Kernstock <info@pkern.at>
2018-10-10 18:28:26 +02:00
Patrik Kernstock 4cd7cf86db Using Throwable instead of Exception
Signed-off-by: Patrik Kernstock <info@pkern.at>
2018-10-10 17:32:50 +02:00