summaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
Commit message (Collapse)AuthorAgeFilesLines
* Disable some server checks when running on HHVMLukas Reschke2015-02-281-25/+33
| | | | Ref https://github.com/owncloud/core/issues/10837#issuecomment-76516839
* Add notice about Travis ChecksLukas Reschke2015-02-271-0/+2
| | | Maybe it helps in the future so we won't forget it again :see_no_evil:
* Merge pull request #14530 from owncloud/revert-14403Thomas Müller2015-02-271-54/+2
|\ | | | | Revert "Updating license headers"
| * Revert "Updating license headers"Morris Jobke2015-02-261-54/+2
| | | | | | | | This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
* | Merge pull request #14474 from owncloud/move-utf-8-check-to-setupMorris Jobke2015-02-261-9/+6
|\ \ | |/ |/| Move UTF-8 check to setup
| * Move UTF-8 check to setupLukas Reschke2015-02-241-9/+6
| | | | | | | | | | | | | | | | Nobody reads the warnings anyways and so we should enforce it at installation time... Also allows us to get rid of some duplicated code. To test change the `default_charset` to something other than `utf-8` or `UTF-8`, both should work fine with that change here. An error should then get shown. We already set those default charsets in the shipped .user.ini and .htaccess
* | Remove unused and deprecated CodeLukas Reschke2015-02-251-10/+0
|/ | | | Function is not used anymore anywhere in the code base: https://github.com/search?q=user%3Aowncloud+secureRNGAvailable&type=Code&utf8=%E2%9C%93
* Fix namespace of OC_Setup -> \OC\SetupThomas Müller2015-02-231-1/+1
|
* Merge pull request #13829 from owncloud/appmanager-listVincent Petry2015-02-231-1/+5
|\ | | | | Better caching for enabled apps
| * allow overwriting the appmanager in oc_util by subclassingRobin Appelman2015-02-181-1/+5
| |
* | Merge pull request #14403 from owncloud/update-license-headersThomas Müller2015-02-231-2/+54
|\ \ | | | | | | Update license headers
| * | Updating license headersJenkins for ownCloud2015-02-231-2/+54
| | |
* | | Use "off" and "off" instead of true booleansLukas Reschke2015-02-231-1/+4
|/ / | | | | | | | | | | Apparently a boolean in php.ini is according to the documentation "on" or "off"… Fixes itself.
* | Add helper to check for `ini` values in `OC_Util::checkServer`Lukas Reschke2015-02-211-1/+27
| | | | | | | | | | | | | | | | | | This allows to check for specific values in the PHP.ini that ownCloud requires for full compatibility. `mbstring.func_overload`: https://github.com/owncloud/core/issues/14372 `output_buffering`: http://doc.owncloud.org/server/8.0/admin_manual/configuration/big_file_upload_configuration.html#configuring-php Fixes https://github.com/owncloud/core/issues/14372 and https://github.com/owncloud/core/issues/14412
* | Refactor OC_Request into TrustedDomainHelper and IRequestLukas Reschke2015-02-161-2/+5
|/ | | | | | | | | | This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed. This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions. Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though. Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
* catch any whitespaces which might get written to the output buffer while ↵Thomas Müller2015-02-121-5/+4
| | | | loading a theme
* in some case charset can be in lower case.Yann VERRY2015-02-111-1/+3
| | | | Add strtoupper() in UTF-8 check to avoid error message
* Merge pull request #11056 from AdamWill/9885-opcodeMorris Jobke2015-02-101-0/+26
|\ | | | | add function to invalidate one opcache file, use it if possible #9885
| * deleteFromOpcodeCache: make parameter mandatory, document parameterAdam Williamson2014-11-061-1/+2
| | | | | | | | Both pointed out in submission review by @bantu, thanks.
| * add function to invalidate one opcache file, use it if possible #9885Adam Williamson2014-11-061-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #9885 appears to be triggered by ownCloud invalidating the entire PHP opcache. Testing indicates it can be avoided by only invalidating the single file that was written from the opcache, instead of clearing the whole thing. In general it is more efficient to invalidate only the single file that was changed, rather than the whole cache. This adds a deleteFromOpcodeCache() function which invalidates a single file from the opcache if possible, returning true if the underlying function returns true (which may mean 'success', or 'file does not exist', or 'file exists but is not in opcache', all of which are OK to treat as good for our purposes). It also changes writeData() in config.php to try using deleteFromOpcodeCache() and only fall back on clearOpcodeCache() if that fails.
* | Don't encode url unecessary twiceLukas Reschke2015-02-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The URL was previously encoded twice which leads to getting redirected to a 404 page when the password has been entered incorrect at least once. Testplan: - [ ] Opening `http://localhost/core/index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fadmin` redirects to the admin page when providing the correct credentials - [ ] Opening `http://localhost/core/index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fadmin` redirects to the admin page when providing the invalid credentials and then providing valid ones. - [ ] Logging in as admin then going to the admin page and clearing the cookies and refreshing will show the login and when repeating the above test steps you're redirected correctly. Fixes https://github.com/owncloud/core/issues/9804
* | Don't check for `always_populate_raw_post_data` on HHVMLukas Reschke2015-01-231-0/+14
| | | | | | | | | | | | HHVM seems to have problems with this at the moment (even setting those values in the php.ini of HHVM doesn't have helped much) and thus the unit test execution failed. So it's better if we disable this check for now for HHVM.
* | Merge pull request #13593 from owncloud/add-check-for-raw-post-dataMorris Jobke2015-01-221-2/+17
|\ \ | | | | | | Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6
| * | translate error messagesMorris Jobke2015-01-221-4/+4
| | |
| * | Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6Lukas Reschke2015-01-221-0/+15
| | | | | | | | | | | | | | | | | | PHP 5.6 otherwise throws notices for perfectly valid code which results in broken endpoints. Fixes https://github.com/owncloud/core/issues/13592
* | | Merge pull request #13314 from owncloud/login-hook-logoutMorris Jobke2015-01-221-1/+3
|\ \ \ | |/ / |/| | Return false if the login is canceled in a hook
| * | Allow custom error messages for the login pageRobin Appelman2015-01-221-1/+3
| | |
* | | ignore coreBernhard Posselt2015-01-141-1/+4
| | |
* | | move check into addTranslation methodBernhard Posselt2015-01-141-11/+1
| | |
* | | dont load core scritpsBernhard Posselt2015-01-141-1/+3
| | |
* | | only load translsations for appsBernhard Posselt2015-01-141-1/+3
| | |
* | | make translation lookup faster (O(n) -> O(1))Bernhard Posselt2015-01-141-2/+2
| | |
* | | autoload app's js translationsBernhard Posselt2015-01-141-0/+7
| | |
* | | adapt decrypt all and restore/delete key backups to the new folder structure ↵Bjoern Schiessle2015-01-131-4/+4
|/ / | | | | | | for encryption key introduced with OC8
* | Verify whether value is already normalizedLukas Reschke2015-01-101-5/+8
| | | | | | | | | | | | | | | | Apparently `normalizer_normalize` is not verifying itself whether the string needs to be converted or not. Or does it at least not very performantly. This simple change leads to a 4% performance gain on the processing of normalizeUnicode. Since this method is called quite often (i.e. for every file path) this has actually a measurable impact. For examples searches are now 200ms faster on my machine. Still not perfect but way to go. Part of https://github.com/owncloud/core/issues/13221
* | check for working htaccess will result in a dead lock because the server is ↵Thomas Müller2015-01-081-0/+5
| | | | | | | | blocking the request to itself - fixes #13153
* | Merge pull request #13043 from owncloud/check-for-hashThomas Müller2014-12-281-1/+2
|\ \ | | | | | | Check for hash
| * | Check for hashLukas Reschke2014-12-281-1/+2
| | | | | | | | | | | | See https://github.com/owncloud/core/pull/13042
* | | remove EditionFrank Karlitschek2014-12-251-2/+0
| | |
* | | Automatically detect the edition based on the enterprise_key app.Frank Karlitschek2014-12-251-2/+6
|/ /
* | make sure styles and scripts are only loaded onceThomas Müller2014-12-161-9/+25
| |
* | Deprecate Util::formatDate()Joas Schilling2014-12-101-18/+11
| | | | | | | | Make DateTimeFormatter a service and adjust tests that have been inaccurate
* | Remove checks for safe mode and magic quotesLukas Reschke2014-12-051-20/+0
| | | | | | | | | | | | | | | | | | | | Both are removed from 5.4.0 Safe Mode: http://php.net/manual/en/features.safe-mode.php > This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0. Magic Quotes: http://php.net/manual/en/security.magicquotes.php > This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
* | PHP 5.4 is now required for masterLukas Reschke2014-12-041-11/+2
| | | | | | | | :beers:
* | Replace deprecated constant with new class constantJoas Schilling2014-11-251-1/+1
| |
* | Check for XMLWriter classLukas Reschke2014-11-201-0/+1
|/ | | | This is not installed by default in all cases and will break the DAV features of ownCloud. Lot's of reports such as https://github.com/owncloud/ios-issues/issues/167#issuecomment-63798507
* ability to add bower resourcesMorris Jobke2014-11-031-16/+42
| | | | | | * add addVendorScript & addVendorStyle * refactoring of addScript and addStyle * add shortcuts vendorScript and vendorStyle
* Merge pull request #11080 from owncloud/addheader-text-2Vincent Petry2014-10-301-3/+3
|\ | | | | Fix the addHeader tag attributes text methods to not ignore the text parameter
| * Fix the "addHeader($tag, $attributes, $text)" methods to not ignore the ↵Lukas Reschke2014-10-281-3/+3
| | | | | | | | | | | | | | | | | | $text parameter Also support closing tags with no text content given Conflicts: lib/private/template.php
* | in case a translation javascript is not found we no longer bail outThomas Müller2014-10-291-1/+1
| | | | | | | | remove translation.php