Côme Chilliet
f68d4f7300
Remove deprecated methods Util::writeLog and DIContainer::log
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-09-25 10:37:12 +07:00
Julius Härtl
bd65f1ea28
feat: Add dedicated method to load init scripts
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Co-authored-by: John Molakvoæ <skjnldsv@protonmail.com>
Update lib/public/Util.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-09-07 21:42:06 +07:00
Robin Appelman
1df33256be
add core fileclient script before others
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-17 11:18:26 +07:00
Robin Appelman
37e3115cb4
don't always add core/common and core/main during "sorting"
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-08-17 10:57:56 +07:00
Christoph Wurst
14719110b9
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-06 15:21:22 +07:00
Faraz Samapoor
bf38c0a3d1
Refactors "strpos" calls in lib/public to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-06-05 11:14:52 +07:00
Daniel Kesselberg
3d3c49774f
chore: remove check for suhosin.executor.func.blacklist
...
Suhosin is/was a PHP extension.
The last release was 2015-05-21.
Suhosin does not support PHP 8.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-06-02 15:47:26 +07:00
Christoph Wurst
f04ff2c6d7
chore(ocp)!: Drop \OCP\Util::linkToPublic
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-06-01 20:32:59 +07:00
Simon L
d55a7c619d
Fix typos in lib/public subdirectory
...
Found via `codespell -q 3 -S l10n -L jus ./lib/public`
Signed-off-by: luz paz <luzpaz@github.com>
Update lib/public/Accounts/IAccount.php
Signed-off-by: luz paz <luzpaz@github.com>
Signed-off-by: Simon L <szaimen@e.mail.de>
Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2023-05-10 11:56:34 +07:00
Côme Chilliet
c4d90f3e81
Removed catch of ValueError as we cannot know if it’s >2038 or <1970
...
Also fixed numericToString to correctly convert float to int if it fits
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:35 +07:00
Côme Chilliet
7a628c0361
Fix 32bits bigint support in Util/OC_Helper
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:30 +07:00
Côme Chilliet
94ecae4ade
Add helper to cast to int|float, fix MemoryInfo on 32bits
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +07:00
J0WI
fc97f6847d
Replace getSystemValue with getSystemValueString
...
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2022-12-05 16:32:11 +07:00
Côme Chilliet
5347fb02dc
Remove some constants and functions which have been long deprecated
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-09-30 13:20:03 +07:00
Carl Schwan
9b8ca9ad1f
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
...
findBinaryFinder is now a service that is still private but with some
minor optimization (remove the hasKey check).
isFunctionEnabled is now in OCP\Util
Both function are still keep but all internal usage in nextcloud/server
were migrated to the new usage, so that we can remove it in 26
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-23 19:44:04 +07:00
Carl Schwan
53169890d6
Fix psalm errors fron the end of the baseline file
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-16 10:58:26 +07:00
Carl Schwan
a29251e02d
Allow to disable password policy enforcement for selected groups
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Co-authored-by: Vincent Petry <vincent@nextcloud.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2022-04-05 17:04:17 +07:00
John Molakvoæ
58d516b509
Make sure common and main core scripts are loaded first
...
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
2022-03-04 10:22:56 +07:00
Carl Schwan
e3a12b3482
Fix psalm issues in theming app
...
After this change, we are down to only one psalm warning for this app
and related to the Application.php. This also make composer
psam:update-baseline not silently ignore new errors.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-26 14:26:58 +07:00
Louis Chemineau
25ade6218a
Streamline reseting of private static properties
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-11 10:29:25 +07:00
Louis Chemineau
92e60caa86
Revert "Streamline reseting of private static properties"
...
This reverts commit e50121d4c0 .
2022-01-10 18:42:07 +07:00
Louis Chemineau
e50121d4c0
Streamline reseting of private static properties
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-10 17:34:48 +07:00
Louis Chemineau
447cd553b6
Reset $scriptDeps in tests
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-08 10:15:48 +07:00
Jonas Meurer
491bd6260c
Sort app scripts topologically by its dependencies
...
Implement a proper topological sorting algorithm. Based on the
implementation by https://github.com/marcj/topsort.php
Logs an error in case a circular dependency is detected.
Fixes : #30278
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-12-29 16:40:05 +07:00
Jonas Meurer
822daa3c64
Further improve addScript logic, migrate to uksort()
...
Instead of the logic with `first` and `last`, store dependencies in an
own array and sort the scripts topologically by its dependencies later.
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-12-20 11:45:05 +07:00
Jonas Meurer
7ec1317b1b
Sort app scripts by dependencies ( Fixes : #30278 )
...
Signed-off-by: Jonas Meurer <jonas@freesources.org>
2021-12-20 11:40:10 +07:00
John Molakvoæ (skjnldsv)
791d57051a
Adapt tests
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-12-02 21:13:07 +07:00
John Molakvoæ (skjnldsv)
71a3528510
Allow scripts prioritization based on other apps
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-12-02 20:00:46 +07:00
Arthur Schiwon
d384edc9c6
add method to shorten a string to given byte size to Utils
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-11-26 16:21:40 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst
7f3051e5bf
Drop \OCP\Util::isIe
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-03-09 20:29:42 +07:00
Christoph Wurst
9ce3ea3368
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +07:00
Roeland Jago Douma
adc4f1a811
Merge pull request #22916 from J0WI/unifiy-links-to-php.net
...
Unify links to php.net
2020-12-22 09:53:31 +07:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +07:00
Morris Jobke
8218ae4274
Deprecate OCP\Util::connectHook and emitHook
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-28 22:30:24 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
J0WI
68ce17e59b
Unify links to php.net
...
Update all links to https://www.php.net/
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-09-17 17:40:04 +07:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +07:00
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +07: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 +07: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 +07: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 +07: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 +07: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 +07:00
Christoph Wurst
23eb0462e5
Use lowercase true, false and null constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 21:53:04 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07: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 +07:00
Julius Härtl
df072471a7
Add extendedSupport to Subscription
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-06-17 16:36:23 +07:00
Roeland Jago Douma
14e8930a5f
Remove deprecated function callCheck
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-05-28 22:23:28 +07:00
Morris Jobke
8e1c26b509
Merge pull request #11686 from nextcloud/deprecation/noid/ocp_util_recursiveArraySearch
...
Deprecate unused OCP\Util::recursiveArraySearch
2018-10-09 09:43:11 +07:00