summaryrefslogtreecommitdiffstats
path: root/lib/public/Util.php
Commit message (Collapse)AuthorAgeFilesLines
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-041-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: php-csskjnldsv2024-03-151-2/+1
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* Merge branch 'master' into refactor/OC-Server-getShareManagerJohn Molakvoæ2024-03-151-33/+66
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * fix: Also expose forbidden filename character in the capabilitiesFerdinand Thiessen2024-02-281-2/+3
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * fix: Enforce forbidden filename characters on backendFerdinand Thiessen2024-02-281-1/+22
| | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * Use OCP\Util::getL10N instead of OC::$server->getL10NCôme Chilliet2024-02-051-5/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix(l10n): fix translations for init scriptsJohn Molakvoæ2023-12-081-2/+14
| | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
| * chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * Remove deprecated methods Util::writeLog and DIContainer::logCôme Chilliet2023-09-251-13/+0
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * feat: Add dedicated method to load init scriptsJulius Härtl2023-09-071-11/+26
| | | | | | | | | | | | | | | | | | | | 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>
* | Refactor `OC\Server::getShareManager`Andrew Summers2023-08-291-2/+3
|/ | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
* add core fileclient script before othersRobin Appelman2023-08-171-2/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* don't always add core/common and core/main during "sorting"Robin Appelman2023-08-171-1/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-2/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Refactors "strpos" calls in lib/public to improve code readability.Faraz Samapoor2023-06-051-1/+1
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* chore: remove check for suhosin.executor.func.blacklistDaniel Kesselberg2023-06-021-5/+0
| | | | | | | | 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>
* chore(ocp)!: Drop \OCP\Util::linkToPublicChristoph Wurst2023-06-011-15/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix typos in lib/public subdirectorySimon L2023-05-101-2/+2
| | | | | | | | | | | | | 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>
* Removed catch of ValueError as we cannot know if it’s >2038 or <1970Côme Chilliet2023-02-071-1/+1
| | | | | | Also fixed numericToString to correctly convert float to int if it fits Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix 32bits bigint support in Util/OC_HelperCôme Chilliet2023-02-071-13/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add helper to cast to int|float, fix MemoryInfo on 32bitsCôme Chilliet2023-02-071-0/+11
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Replace getSystemValue with getSystemValueStringJ0WI2022-12-051-3/+3
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Remove some constants and functions which have been long deprecatedCôme Chilliet2022-09-301-21/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Move findBinaryFinder and isFunctionEnabled away from OC_HelperCarl Schwan2022-08-231-0/+24
| | | | | | | | | | | | 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>
* Fix psalm errors fron the end of the baseline fileCarl Schwan2022-05-161-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Allow to disable password policy enforcement for selected groupsCarl Schwan2022-04-051-3/+5
| | | | | | 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>
* Make sure common and main core scripts are loaded firstJohn Molakvoæ2022-03-041-1/+6
| | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* Fix psalm issues in theming appCarl Schwan2022-01-261-2/+2
| | | | | | | | 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>
* Streamline reseting of private static propertiesLouis Chemineau2022-01-111-10/+0
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Revert "Streamline reseting of private static properties"Louis Chemineau2022-01-101-0/+10
| | | | This reverts commit e50121d4c05afb8eca22bc105b160283ff4181c0.
* Streamline reseting of private static propertiesLouis Chemineau2022-01-101-10/+0
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Reset $scriptDeps in testsLouis Chemineau2022-01-081-0/+10
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Sort app scripts topologically by its dependenciesJonas Meurer2021-12-291-29/+20
| | | | | | | | | | | 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>
* Further improve addScript logic, migrate to uksort()Jonas Meurer2021-12-201-56/+25
| | | | | | | 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>
* Sort app scripts by dependencies (Fixes: #30278)Jonas Meurer2021-12-201-4/+28
| | | | Signed-off-by: Jonas Meurer <jonas@freesources.org>
* Adapt testsJohn Molakvoæ (skjnldsv)2021-12-021-0/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Allow scripts prioritization based on other appsJohn Molakvoæ (skjnldsv)2021-12-021-4/+78
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* add method to shorten a string to given byte size to UtilsArthur Schiwon2021-11-261-0/+24
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-8/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Drop \OCP\Util::isIeChristoph Wurst2021-03-091-10/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22916 from J0WI/unifiy-links-to-php.netRoeland Jago Douma2020-12-221-1/+1
|\ | | | | Unify links to php.net
| * Unify links to php.netJ0WI2020-09-171-1/+1
| | | | | | | | | | | | Update all links to https://www.php.net/ Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* | Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Deprecate OCP\Util::connectHook and emitHookMorris Jobke2020-10-281-0/+3
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Format code to a single space around binary operatorsChristoph Wurst2020-10-051-7/+7
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-2/+3
| | | | | | | | | | | | | | | 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>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>