summaryrefslogtreecommitdiffstats
path: root/lib/public/Util.php
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use lowercase true, false and null constantsChristoph Wurst2020-03-251-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-4/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-0/+1
| | | | | | | | | | | * 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>
* Add extendedSupport to SubscriptionJulius Härtl2019-06-171-3/+15
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Remove deprecated function callCheckRoeland Jago Douma2019-05-281-16/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #11686 from ↵Morris Jobke2018-10-091-0/+1
|\ | | | | | | | | nextcloud/deprecation/noid/ocp_util_recursiveArraySearch Deprecate unused OCP\Util::recursiveArraySearch
| * Deprecate unused OCP\Util::recursiveArraySearchMorris Jobke2018-10-081-0/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Deprecate unused, private OC_Helper::linkToPublicMorris Jobke2018-10-081-1/+6
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove deprecated methods from OCP\UtilRoeland Jago Douma2018-09-041-44/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Comply @since requirementsJohn Molakvoæ (skjnldsv)2018-07-231-0/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Design structure fixesJohn Molakvoæ (skjnldsv)2018-07-211-0/+9
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix PHPDocMorris Jobke2018-05-221-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* move log constants to ILoggerArthur Schiwon2018-04-261-2/+16
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Remove deprecated URL functions for OCP\UtilRoeland Jago Douma2018-03-131-39/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>