Commit Graph

196 Commits

Author SHA1 Message Date
Thomas Müller 1fd1b355e4 Fix namespace of OC_Setup -> \OC\Setup 2015-02-23 16:44:40 +01:00
Vincent Petry 4290e1990e Merge pull request #13829 from owncloud/appmanager-list
Better caching for enabled apps
2015-02-23 16:03:32 +01:00
Thomas Müller df3c73de72 Merge pull request #14403 from owncloud/update-license-headers
Update license headers
2015-02-23 13:53:16 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Lukas Reschke 43641d917b Use "off" and "off" instead of true booleans
Apparently a boolean in php.ini is according to the documentation "on" or "off"…

Fixes itself.
2015-02-23 09:40:15 +01:00
Lukas Reschke 2f0f38761d Add helper to check for `ini` values in `OC_Util::checkServer`
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
2015-02-21 12:12:34 +01:00
Robin Appelman 5542fafd36 allow overwriting the appmanager in oc_util by subclassing 2015-02-18 14:24:50 +01:00
Lukas Reschke 886bda5f81 Refactor OC_Request into TrustedDomainHelper and IRequest
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
2015-02-16 22:13:00 +01:00
Thomas Müller fc7f279d90 catch any whitespaces which might get written to the output buffer while loading a theme 2015-02-12 16:42:17 +01:00
Yann VERRY 1fcea6f1bd in some case charset can be in lower case.
Add strtoupper() in UTF-8 check to avoid error message
2015-02-11 11:59:33 +01:00
Morris Jobke 11283c57d9 Merge pull request #11056 from AdamWill/9885-opcode
add function to invalidate one opcache file, use it if possible #9885
2015-02-10 17:21:15 +01:00
Lukas Reschke 2bd1c17345 Don't encode url unecessary twice
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
2015-02-02 15:09:59 +01:00
Lukas Reschke 30a5758a95 Don't check for `always_populate_raw_post_data` on HHVM
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.
2015-01-23 13:54:34 +01:00
Morris Jobke 7e4afa3f25 Merge pull request #13593 from owncloud/add-check-for-raw-post-data
Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6
2015-01-22 23:59:52 +01:00
Morris Jobke 254a1fa12a Merge pull request #13314 from owncloud/login-hook-logout
Return false if the login is canceled in a hook
2015-01-22 23:34:19 +01:00
Morris Jobke 55c28608c9 translate error messages 2015-01-22 14:52:47 +01:00
Robin Appelman 8a9acc5083 Allow custom error messages for the login page 2015-01-22 14:13:02 +01:00
Lukas Reschke bb80cf4eca Add check for `HTTP_RAW_POST_DATA` setting for >= 5.6
PHP 5.6 otherwise throws notices for perfectly valid code which results in broken endpoints.

Fixes https://github.com/owncloud/core/issues/13592
2015-01-22 13:50:38 +01:00
Bernhard Posselt 6737dd111d ignore core 2015-01-14 15:27:37 +01:00
Bernhard Posselt 4ec4914bb4 move check into addTranslation method 2015-01-14 14:57:56 +01:00
Bernhard Posselt 1cce1f0e6b dont load core scritps 2015-01-14 14:43:11 +01:00
Bernhard Posselt d6f1ff7993 only load translsations for apps 2015-01-14 13:48:21 +01:00
Bernhard Posselt 8cb60b2366 make translation lookup faster (O(n) -> O(1)) 2015-01-14 13:39:29 +01:00
Bernhard Posselt 717e3acd9b autoload app's js translations 2015-01-14 13:34:52 +01:00
Bjoern Schiessle 89f17ef6fe adapt decrypt all and restore/delete key backups to the new folder structure for encryption key introduced with OC8 2015-01-13 12:45:33 +01:00
Lukas Reschke e80ece9a2b Verify whether value is already normalized
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
2015-01-10 12:12:40 +01:00
Thomas Müller 296a852063 check for working htaccess will result in a dead lock because the server is blocking the request to itself - fixes #13153 2015-01-08 09:13:18 +01:00
Thomas Müller aec79b0c0e Merge pull request #13043 from owncloud/check-for-hash
Check for hash
2014-12-28 14:12:57 +01:00
Lukas Reschke 222e4a0762 Check for hash
See https://github.com/owncloud/core/pull/13042
2014-12-28 13:23:34 +01:00
Frank Karlitschek 4a40e5699c remove Edition 2014-12-25 11:36:41 +01:00
Frank Karlitschek 3dea2b95c6 Automatically detect the edition based on the enterprise_key app. 2014-12-25 09:48:15 +01:00
Thomas Müller 775f6a1354 make sure styles and scripts are only loaded once 2014-12-16 18:26:43 +01:00
Joas Schilling 4d232e536e Deprecate Util::formatDate()
Make DateTimeFormatter a service and adjust tests that have been inaccurate
2014-12-10 11:58:56 +01:00
Lukas Reschke ddcf2b84ec Remove checks for safe mode and magic quotes
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.
2014-12-05 19:14:47 +01:00
Lukas Reschke 1b0bc2e099 PHP 5.4 is now required for master
🍻
2014-12-04 10:46:38 +01:00
Joas Schilling 2c39aec8cb Replace deprecated constant with new class constant 2014-11-25 16:30:21 +01:00
Lukas Reschke 9a1673c79d Check for XMLWriter class
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
2014-11-20 13:13:14 +01:00
Adam Williamson 8b2b0aae31 deleteFromOpcodeCache: make parameter mandatory, document parameter
Both pointed out in submission review by @bantu, thanks.
2014-11-06 18:05:20 -08:00
Adam Williamson 3b4823d89c add function to invalidate one opcache file, use it if possible #9885
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.
2014-11-06 17:58:58 -08:00
Morris Jobke d763b32048 ability to add bower resources
* add addVendorScript & addVendorStyle
* refactoring of addScript and addStyle
* add shortcuts vendorScript and vendorStyle
2014-11-03 20:54:40 +01:00
Vincent Petry bed81ea854 Merge pull request #11080 from owncloud/addheader-text-2
Fix the addHeader tag attributes text methods to not ignore the text parameter
2014-10-30 18:13:46 +01:00
Thomas Müller a589d61b78 in case a translation javascript is not found we no longer bail out
remove translation.php
2014-10-29 10:09:12 +01:00
Vincent Petry ec1a73fab9 Added OC.L10N namespace with translation functions
Added addTranslations and fixed de.js file

Fixed de.js to use OC.L10N.register() and use to correct expected
format.

Added JS unit tests for OC.L10N class

Include translations JS script for all apps
2014-10-29 10:09:12 +01:00
Lukas Reschke 510d0b2cf3 Fix the "addHeader($tag, $attributes, $text)" methods to not ignore the $text parameter
Also support closing tags with no text content given

Conflicts:
	lib/private/template.php
2014-10-28 11:15:58 +01:00
Lukas Reschke d6380a5395 Merge pull request #11786 from owncloud/MakeSupportedDBsConfigurable
Make supported DBs configurable within config.php
2014-10-27 22:24:16 +01:00
Lukas Reschke 233c49f4b9 Make supported DBs configurable within config.php
This commit will make the supported DBs for installation configurable within config.php. By default the following databases are tested: "sqlite", "mysql", "pgsql". The reason behind this is that there might be instances where we want to prevent SQLite to be used by mistake.

To test this play around with the new configuration parameter "supportedDatabases".
2014-10-27 21:39:34 +01:00
Lukas Reschke b3a04840b5 Add type hinting to functions
It's only reasonable to have proper type hinting here which might even help us to catch bugs.
2014-10-24 14:13:40 +02:00
Lukas Reschke 2d2a4741ce Make files non executable
There is not much sense in having these files marked executable, we should avoid that.
2014-10-24 11:14:51 +02:00
Robin Appelman 1e69f5e7ac Log some basic events 2014-10-20 13:38:38 +02:00
Jörn Friedrich Dreyer 9b0f0df7f5 make skeleton compatible with objectstore
suspend encryption proxy when copying skeleton
2014-10-20 11:28:36 +02:00