summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php142
-rw-r--r--lib/l10n/af.php8
-rw-r--r--lib/l10n/af_ZA.js1
-rw-r--r--lib/l10n/af_ZA.json1
-rw-r--r--lib/l10n/ar.js1
-rw-r--r--lib/l10n/ar.json1
-rw-r--r--lib/l10n/ast.js4
-rw-r--r--lib/l10n/ast.json4
-rw-r--r--lib/l10n/az.js8
-rw-r--r--lib/l10n/az.json8
-rw-r--r--lib/l10n/be.js1
-rw-r--r--lib/l10n/be.json1
-rw-r--r--lib/l10n/bg_BG.js5
-rw-r--r--lib/l10n/bg_BG.json5
-rw-r--r--lib/l10n/bn_BD.js1
-rw-r--r--lib/l10n/bn_BD.json1
-rw-r--r--lib/l10n/bn_IN.js1
-rw-r--r--lib/l10n/bn_IN.json1
-rw-r--r--lib/l10n/bs.js1
-rw-r--r--lib/l10n/bs.json1
-rw-r--r--lib/l10n/ca.js4
-rw-r--r--lib/l10n/ca.json4
-rw-r--r--lib/l10n/cs_CZ.js9
-rw-r--r--lib/l10n/cs_CZ.json9
-rw-r--r--lib/l10n/cy_GB.js1
-rw-r--r--lib/l10n/cy_GB.json1
-rw-r--r--lib/l10n/da.js9
-rw-r--r--lib/l10n/da.json9
-rw-r--r--lib/l10n/de.js83
-rw-r--r--lib/l10n/de.json83
-rw-r--r--lib/l10n/de_AT.js1
-rw-r--r--lib/l10n/de_AT.json1
-rw-r--r--lib/l10n/de_DE.js63
-rw-r--r--lib/l10n/de_DE.json63
-rw-r--r--lib/l10n/el.js6
-rw-r--r--lib/l10n/el.json6
-rw-r--r--lib/l10n/en_GB.js9
-rw-r--r--lib/l10n/en_GB.json9
-rw-r--r--lib/l10n/eo.js2
-rw-r--r--lib/l10n/eo.json2
-rw-r--r--lib/l10n/es.js30
-rw-r--r--lib/l10n/es.json30
-rw-r--r--lib/l10n/es_AR.js1
-rw-r--r--lib/l10n/es_AR.json1
-rw-r--r--lib/l10n/es_CL.js2
-rw-r--r--lib/l10n/es_CL.json2
-rw-r--r--lib/l10n/es_MX.js1
-rw-r--r--lib/l10n/es_MX.json1
-rw-r--r--lib/l10n/et_EE.js4
-rw-r--r--lib/l10n/et_EE.json4
-rw-r--r--lib/l10n/eu.js22
-rw-r--r--lib/l10n/eu.json22
-rw-r--r--lib/l10n/fa.js1
-rw-r--r--lib/l10n/fa.json1
-rw-r--r--lib/l10n/fi_FI.js7
-rw-r--r--lib/l10n/fi_FI.json7
-rw-r--r--lib/l10n/fr.js11
-rw-r--r--lib/l10n/fr.json11
-rw-r--r--lib/l10n/gl.js19
-rw-r--r--lib/l10n/gl.json19
-rw-r--r--lib/l10n/he.js1
-rw-r--r--lib/l10n/he.json1
-rw-r--r--lib/l10n/hi.js1
-rw-r--r--lib/l10n/hi.json1
-rw-r--r--lib/l10n/hr.js4
-rw-r--r--lib/l10n/hr.json4
-rw-r--r--lib/l10n/hu_HU.js4
-rw-r--r--lib/l10n/hu_HU.json4
-rw-r--r--lib/l10n/ia.js1
-rw-r--r--lib/l10n/ia.json1
-rw-r--r--lib/l10n/id.js13
-rw-r--r--lib/l10n/id.json13
-rw-r--r--lib/l10n/is.js1
-rw-r--r--lib/l10n/is.json1
-rw-r--r--lib/l10n/it.js9
-rw-r--r--lib/l10n/it.json9
-rw-r--r--lib/l10n/ja.js9
-rw-r--r--lib/l10n/ja.json9
-rw-r--r--lib/l10n/ka_GE.js1
-rw-r--r--lib/l10n/ka_GE.json1
-rw-r--r--lib/l10n/km.js1
-rw-r--r--lib/l10n/km.json1
-rw-r--r--lib/l10n/kn.js1
-rw-r--r--lib/l10n/kn.json1
-rw-r--r--lib/l10n/ko.js5
-rw-r--r--lib/l10n/ko.json5
-rw-r--r--lib/l10n/ku_IQ.js1
-rw-r--r--lib/l10n/ku_IQ.json1
-rw-r--r--lib/l10n/lb.js1
-rw-r--r--lib/l10n/lb.json1
-rw-r--r--lib/l10n/lt_LT.js1
-rw-r--r--lib/l10n/lt_LT.json1
-rw-r--r--lib/l10n/lv.js1
-rw-r--r--lib/l10n/lv.json1
-rw-r--r--lib/l10n/mk.js1
-rw-r--r--lib/l10n/mk.json1
-rw-r--r--lib/l10n/mn.js1
-rw-r--r--lib/l10n/mn.json1
-rw-r--r--lib/l10n/mr.js10
-rw-r--r--lib/l10n/mr.json8
-rw-r--r--lib/l10n/ms_MY.js1
-rw-r--r--lib/l10n/ms_MY.json1
-rw-r--r--lib/l10n/nb_NO.js7
-rw-r--r--lib/l10n/nb_NO.json7
-rw-r--r--lib/l10n/nl.js9
-rw-r--r--lib/l10n/nl.json9
-rw-r--r--lib/l10n/nn_NO.js1
-rw-r--r--lib/l10n/nn_NO.json1
-rw-r--r--lib/l10n/oc.js1
-rw-r--r--lib/l10n/oc.json1
-rw-r--r--lib/l10n/pa.js1
-rw-r--r--lib/l10n/pa.json1
-rw-r--r--lib/l10n/pl.js4
-rw-r--r--lib/l10n/pl.json4
-rw-r--r--lib/l10n/pt_BR.js10
-rw-r--r--lib/l10n/pt_BR.json10
-rw-r--r--lib/l10n/pt_PT.js33
-rw-r--r--lib/l10n/pt_PT.json33
-rw-r--r--lib/l10n/ro.js1
-rw-r--r--lib/l10n/ro.json1
-rw-r--r--lib/l10n/ru.js9
-rw-r--r--lib/l10n/ru.json9
-rw-r--r--lib/l10n/si_LK.js1
-rw-r--r--lib/l10n/si_LK.json1
-rw-r--r--lib/l10n/sk_SK.js7
-rw-r--r--lib/l10n/sk_SK.json7
-rw-r--r--lib/l10n/sl.js6
-rw-r--r--lib/l10n/sl.json6
-rw-r--r--lib/l10n/sq.js1
-rw-r--r--lib/l10n/sq.json1
-rw-r--r--lib/l10n/sr.js8
-rw-r--r--lib/l10n/sr.json8
-rw-r--r--lib/l10n/sr@latin.js1
-rw-r--r--lib/l10n/sr@latin.json1
-rw-r--r--lib/l10n/sv.js5
-rw-r--r--lib/l10n/sv.json5
-rw-r--r--lib/l10n/ta_IN.js1
-rw-r--r--lib/l10n/ta_IN.json1
-rw-r--r--lib/l10n/ta_LK.js1
-rw-r--r--lib/l10n/ta_LK.json1
-rw-r--r--lib/l10n/te.js1
-rw-r--r--lib/l10n/te.json1
-rw-r--r--lib/l10n/th_TH.js1
-rw-r--r--lib/l10n/th_TH.json1
-rw-r--r--lib/l10n/tr.js11
-rw-r--r--lib/l10n/tr.json11
-rw-r--r--lib/l10n/ug.js1
-rw-r--r--lib/l10n/ug.json1
-rw-r--r--lib/l10n/uk.js3
-rw-r--r--lib/l10n/uk.json3
-rw-r--r--lib/l10n/ur_PK.js1
-rw-r--r--lib/l10n/ur_PK.json1
-rw-r--r--lib/l10n/vi.js1
-rw-r--r--lib/l10n/vi.json1
-rw-r--r--lib/l10n/zh_CN.js1
-rw-r--r--lib/l10n/zh_CN.json1
-rw-r--r--lib/l10n/zh_HK.js1
-rw-r--r--lib/l10n/zh_HK.json1
-rw-r--r--lib/l10n/zh_TW.js4
-rw-r--r--lib/l10n/zh_TW.json4
-rw-r--r--lib/private/activitymanager.php108
-rw-r--r--lib/private/api.php11
-rw-r--r--lib/private/app.php282
-rw-r--r--lib/private/app/appmanager.php71
-rw-r--r--lib/private/app/codechecker.php130
-rw-r--r--lib/private/app/codecheckvisitor.php111
-rw-r--r--lib/private/app/dependencyanalyzer.php72
-rw-r--r--lib/private/appconfig.php2
-rw-r--r--lib/private/appframework/app.php40
-rw-r--r--lib/private/appframework/core/api.php4
-rw-r--r--lib/private/appframework/db/db.php189
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php5
-rw-r--r--lib/private/appframework/http/dispatcher.php10
-rw-r--r--lib/private/appframework/http/output.php70
-rw-r--r--lib/private/appframework/http/request.php348
-rw-r--r--lib/private/appframework/utility/simplecontainer.php7
-rw-r--r--lib/private/avatar.php9
-rw-r--r--lib/private/backgroundjob/joblist.php3
-rw-r--r--lib/private/backgroundjob/queuedjob.php2
-rw-r--r--lib/private/cache/file.php2
-rw-r--r--lib/private/cache/fileglobal.php27
-rw-r--r--lib/private/cache/fileglobalgc.php50
-rw-r--r--lib/private/command/asyncbus.php127
-rw-r--r--lib/private/command/callablejob.php22
-rw-r--r--lib/private/command/closurejob.php24
-rw-r--r--lib/private/command/commandjob.php26
-rw-r--r--lib/private/command/fileaccess.php18
-rw-r--r--lib/private/config.php7
-rw-r--r--lib/private/connector/sabre/appenabledplugin.php2
-rw-r--r--lib/private/connector/sabre/auth.php31
-rw-r--r--lib/private/connector/sabre/custompropertiesbackend.php339
-rw-r--r--lib/private/connector/sabre/directory.php109
-rw-r--r--lib/private/connector/sabre/dummygetresponseplugin.php43
-rw-r--r--lib/private/connector/sabre/exception/entitytoolarge.php5
-rw-r--r--lib/private/connector/sabre/exception/filelocked.php6
-rw-r--r--lib/private/connector/sabre/exception/invalidpath.php63
-rw-r--r--lib/private/connector/sabre/exception/unsupportedmediatype.php5
-rw-r--r--lib/private/connector/sabre/exceptionloggerplugin.php44
-rw-r--r--lib/private/connector/sabre/file.php77
-rw-r--r--lib/private/connector/sabre/filesplugin.php163
-rw-r--r--lib/private/connector/sabre/locks.php189
-rw-r--r--lib/private/connector/sabre/maintenanceplugin.php11
-rw-r--r--lib/private/connector/sabre/node.php191
-rw-r--r--lib/private/connector/sabre/objecttree.php80
-rw-r--r--lib/private/connector/sabre/principal.php18
-rw-r--r--lib/private/connector/sabre/quotaplugin.php15
-rw-r--r--lib/private/connector/sabre/server.php285
-rw-r--r--lib/private/connector/sabre/taglist.php3
-rw-r--r--lib/private/connector/sabre/tagsplugin.php175
-rw-r--r--lib/private/datetimezone.php69
-rw-r--r--lib/private/db/adaptersqlite.php42
-rw-r--r--lib/private/db/connection.php28
-rw-r--r--lib/private/db/mdb2schemareader.php3
-rw-r--r--lib/private/db/migrator.php4
-rw-r--r--lib/private/db/sqlitemigrator.php1
-rw-r--r--lib/private/db/statementwrapper.php105
-rw-r--r--lib/private/defaults.php20
-rw-r--r--lib/private/files/cache/cache.php35
-rw-r--r--lib/private/files/cache/changepropagator.php4
-rw-r--r--lib/private/files/cache/scanner.php194
-rw-r--r--lib/private/files/cache/updater.php28
-rw-r--r--lib/private/files/cache/wrapper/cachejail.php2
-rw-r--r--lib/private/files/cache/wrapper/cachewrapper.php4
-rw-r--r--lib/private/files/fileinfo.php7
-rw-r--r--lib/private/files/filesystem.php19
-rw-r--r--lib/private/files/mapper.php18
-rw-r--r--lib/private/files/node/node.php41
-rw-r--r--lib/private/files/objectstore/noopscanner.php13
-rw-r--r--lib/private/files/storage/common.php81
-rw-r--r--lib/private/files/storage/dav.php121
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php12
-rw-r--r--lib/private/files/view.php240
-rw-r--r--lib/private/group.php3
-rw-r--r--lib/private/group/manager.php12
-rw-r--r--lib/private/helper.php26
-rw-r--r--lib/private/hook.php2
-rw-r--r--lib/private/httphelper.php3
-rw-r--r--lib/private/image.php2
-rw-r--r--lib/private/installer.php81
-rw-r--r--lib/private/json.php46
-rw-r--r--lib/private/l10n.php97
-rw-r--r--lib/private/legacy/preferences.php121
-rw-r--r--lib/private/log/owncloud.php5
-rw-r--r--lib/private/memcache/apcu.php2
-rw-r--r--lib/private/memcache/arraycache.php71
-rw-r--r--lib/private/memcache/cache.php2
-rw-r--r--lib/private/memcache/factory.php91
-rw-r--r--lib/private/mimetypes.list.php5
-rw-r--r--lib/private/naturalsort.php30
-rw-r--r--lib/private/naturalsort_defaultcollator.php10
-rw-r--r--lib/private/ocs.php3
-rw-r--r--lib/private/ocsclient.php177
-rw-r--r--lib/private/preferences.php181
-rw-r--r--lib/private/preview.php22
-rw-r--r--lib/private/preview/font.php19
-rw-r--r--lib/private/repair.php4
-rw-r--r--lib/private/repair/repairlegacystorages.php136
-rw-r--r--lib/private/request.php342
-rw-r--r--lib/private/response.php38
-rw-r--r--lib/private/route/router.php5
-rw-r--r--lib/private/security/securerandom.php3
-rw-r--r--lib/private/security/trusteddomainhelper.php75
-rw-r--r--lib/private/server.php113
-rw-r--r--lib/private/setup.php181
-rw-r--r--lib/private/share/helper.php30
-rw-r--r--lib/private/share/share.php23
-rw-r--r--lib/private/tagging/tagmapper.php6
-rw-r--r--lib/private/tagmanager.php5
-rw-r--r--lib/private/tags.php6
-rw-r--r--lib/private/template.php5
-rw-r--r--lib/private/template/cssresourcelocator.php16
-rw-r--r--lib/private/template/jsresourcelocator.php19
-rw-r--r--lib/private/template/resourcelocator.php82
-rw-r--r--lib/private/template/resourcenotfoundexception.php35
-rw-r--r--lib/private/templatelayout.php21
-rw-r--r--lib/private/tempmanager.php14
-rw-r--r--lib/private/updater.php173
-rw-r--r--lib/private/urlgenerator.php11
-rw-r--r--lib/private/user.php45
-rw-r--r--lib/private/user/manager.php5
-rw-r--r--lib/private/user/session.php23
-rw-r--r--lib/private/util.php147
-rw-r--r--lib/private/vobject/compoundproperty.php70
-rw-r--r--lib/private/vobject/stringproperty.php80
-rw-r--r--lib/public/activity/iextension.php40
-rw-r--r--lib/public/activity/imanager.php24
-rw-r--r--lib/public/app/iappmanager.php17
-rw-r--r--lib/public/appframework/apicontroller.php10
-rw-r--r--lib/public/appframework/db/mapper.php77
-rw-r--r--lib/public/appframework/http/contentsecuritypolicy.php258
-rw-r--r--lib/public/appframework/http/icallbackresponse.php28
-rw-r--r--lib/public/appframework/http/ioutput.php57
-rw-r--r--lib/public/appframework/http/ocsresponse.php99
-rw-r--r--lib/public/appframework/http/response.php30
-rw-r--r--lib/public/appframework/http/streamresponse.php48
-rw-r--r--lib/public/appframework/ocscontroller.php103
-rw-r--r--lib/public/command/ibus.php25
-rw-r--r--lib/public/command/icommand.php16
-rw-r--r--lib/public/files/invalidcharacterinpathexception.php (renamed from lib/private/connector/sabre/request.php)43
-rw-r--r--lib/public/files/node.php18
-rw-r--r--lib/public/files/reservedwordexception.php37
-rw-r--r--lib/public/files/storage.php39
-rw-r--r--lib/public/iappconfig.php2
-rw-r--r--lib/public/iavatar.php7
-rw-r--r--lib/public/idb.php2
-rw-r--r--lib/public/idbconnection.php2
-rw-r--r--lib/public/il10n.php12
-rw-r--r--lib/public/irequest.php72
-rw-r--r--lib/public/iservercontainer.php8
-rw-r--r--lib/public/itags.php6
-rw-r--r--lib/public/json.php215
-rw-r--r--lib/public/security/isecurerandom.php5
-rw-r--r--lib/public/share_backend.php2
-rw-r--r--lib/public/util.php13
-rw-r--r--lib/repair/dropoldtables.php83
-rw-r--r--lib/repair/enablefilesapp.php50
-rw-r--r--lib/repair/repairmimetypes.php189
317 files changed, 6285 insertions, 3962 deletions
diff --git a/lib/base.php b/lib/base.php
index 558be6b570f..107ae059bb1 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -100,7 +100,18 @@ class OC {
OC_Config::$object = new \OC\Config(self::$configDir);
OC::$SUBURI = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen(OC::$SERVERROOT)));
- $scriptName = OC_Request::scriptName();
+ /**
+ * FIXME: The following line is required because of a cyclic dependency
+ * on IRequest.
+ */
+ $params = [
+ 'server' => [
+ 'SCRIPT_NAME' => $_SERVER['SCRIPT_NAME'],
+ 'SCRIPT_FILENAME' => $_SERVER['SCRIPT_FILENAME'],
+ ],
+ ];
+ $fakeRequest = new \OC\AppFramework\Http\Request($params, null, new \OC\AllConfig(new \OC\SystemConfig()));
+ $scriptName = $fakeRequest->getScriptName();
if (substr($scriptName, -1) == '/') {
$scriptName .= 'index.php';
//make sure suburi follows the same rules as scriptName
@@ -112,18 +123,22 @@ class OC {
}
}
- if (substr($scriptName, 0 - strlen(OC::$SUBURI)) === OC::$SUBURI) {
- OC::$WEBROOT = substr($scriptName, 0, 0 - strlen(OC::$SUBURI));
+ if (OC::$CLI) {
+ OC::$WEBROOT = OC_Config::getValue('overwritewebroot', '');
+ } else {
+ if (substr($scriptName, 0 - strlen(OC::$SUBURI)) === OC::$SUBURI) {
+ OC::$WEBROOT = substr($scriptName, 0, 0 - strlen(OC::$SUBURI));
- if (OC::$WEBROOT != '' && OC::$WEBROOT[0] !== '/') {
- OC::$WEBROOT = '/' . OC::$WEBROOT;
+ if (OC::$WEBROOT != '' && OC::$WEBROOT[0] !== '/') {
+ OC::$WEBROOT = '/' . OC::$WEBROOT;
+ }
+ } else {
+ // The scriptName is not ending with OC::$SUBURI
+ // This most likely means that we are calling from CLI.
+ // However some cron jobs still need to generate
+ // a web URL, so we use overwritewebroot as a fallback.
+ OC::$WEBROOT = OC_Config::getValue('overwritewebroot', '');
}
- } else {
- // The scriptName is not ending with OC::$SUBURI
- // This most likely means that we are calling from CLI.
- // However some cron jobs still need to generate
- // a web URL, so we use overwritewebroot as a fallback.
- OC::$WEBROOT = OC_Config::getValue('overwritewebroot', '');
}
// search the 3rdparty folder
@@ -217,6 +232,9 @@ class OC {
}
public static function checkInstalled() {
+ if (defined('OC_CONSOLE')) {
+ return;
+ }
// Redirect to installer if not installed
if (!\OC::$server->getSystemConfig()->getValue('installed', false) && OC::$SUBURI != '/index.php') {
if (OC::$CLI) {
@@ -229,31 +247,6 @@ class OC {
}
}
- public static function checkSSL() {
- // redirect to https site if configured
- if (\OC::$server->getSystemConfig()->getValue('forcessl', false)) {
- // Default HSTS policy
- $header = 'Strict-Transport-Security: max-age=31536000';
-
- // If SSL for subdomains is enabled add "; includeSubDomains" to the header
- if(\OC::$server->getSystemConfig()->getValue('forceSSLforSubdomains', false)) {
- $header .= '; includeSubDomains';
- }
- header($header);
- ini_set('session.cookie_secure', 'on');
- if (OC_Request::serverProtocol() <> 'https' and !OC::$CLI) {
- $url = 'https://' . OC_Request::serverHost() . OC_Request::requestUri();
- header("Location: $url");
- exit();
- }
- } else {
- // Invalidate HSTS headers
- if (OC_Request::serverProtocol() === 'https') {
- header('Strict-Transport-Security: max-age=0');
- }
- }
- }
-
public static function checkMaintenanceMode() {
// Allow ajax update script to execute without being stopped
if (\OC::$server->getSystemConfig()->getValue('maintenance', false) && OC::$SUBURI != '/core/ajax/update.php') {
@@ -391,7 +384,7 @@ class OC {
public static function initSession() {
// prevents javascript from accessing php session cookies
- ini_set('session.cookie_httponly', '1;');
+ ini_set('session.cookie_httponly', true);
// set the cookie path to the ownCloud directory
$cookie_path = OC::$WEBROOT ? : '/';
@@ -470,6 +463,8 @@ class OC {
spl_autoload_register(array(self::$loader, 'load'));
$loaderEnd = microtime(true);
+ self::$CLI = (php_sapi_name() == 'cli');
+
self::initPaths();
// setup 3rdparty autoloader
@@ -478,7 +473,10 @@ class OC {
require_once $vendorAutoLoad;
} else {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
- OC_Template::printErrorPage('Composer autoloader not found, unable to continue.');
+ // we can't use the template error page here, because this needs the
+ // DI container which isn't available yet
+ print('Composer autoloader not found, unable to continue. Check the folder "3rdparty".');
+ exit();
}
// setup the basic server
@@ -492,7 +490,6 @@ class OC {
if (defined('DEBUG') && DEBUG) {
ini_set('display_errors', 1);
}
- self::$CLI = (php_sapi_name() == 'cli');
date_default_timezone_set('UTC');
ini_set('arg_separator.output', '&amp;');
@@ -544,21 +541,39 @@ class OC {
self::initTemplateEngine();
self::checkConfig();
self::checkInstalled();
- self::checkSSL();
+
OC_Response::addSecurityHeaders();
+ if(self::$server->getRequest()->getServerProtocol() === 'https') {
+ ini_set('session.cookie_secure', true);
+ }
$errors = OC_Util::checkServer(\OC::$server->getConfig());
if (count($errors) > 0) {
if (self::$CLI) {
+ // Convert l10n string into regular string for usage in database
+ $staticErrors = [];
foreach ($errors as $error) {
echo $error['error'] . "\n";
echo $error['hint'] . "\n\n";
+ $staticErrors[] = [
+ 'error' => (string) $error['error'],
+ 'hint' => (string) $error['hint'],
+ ];
}
+
+ try {
+ \OC::$server->getConfig()->setAppValue('core', 'cronErrors', json_encode($staticErrors));
+ } catch(\Exception $e) {
+ echo('Writing to database failed');
+ }
+ exit(1);
} else {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
OC_Template::printGuestPage('', 'error', array('errors' => $errors));
+ exit;
}
- exit;
+ } elseif(self::$CLI && \OC::$server->getConfig()->getSystemValue('installed', false)) {
+ \OC::$server->getConfig()->deleteAppValue('core', 'cronErrors');
}
//try to set the session lifetime
@@ -609,18 +624,24 @@ class OC {
return;
}
- $host = OC_Request::insecureServerHost();
- // if the host passed in headers isn't trusted
+ $request = \OC::$server->getRequest();
+ $host = $request->getInsecureServerHost();
+ /**
+ * if the host passed in headers isn't trusted
+ * FIXME: Should not be in here at all :see_no_evil:
+ */
if (!OC::$CLI
- // overwritehost is always trusted
- && OC_Request::getOverwriteHost() === null
- && !OC_Request::isTrustedDomain($host)
+ // overwritehost is always trusted, workaround to not have to make
+ // \OC\AppFramework\Http\Request::getOverwriteHost public
+ && self::$server->getConfig()->getSystemValue('overwritehost') === ''
+ && !\OC::$server->getTrustedDomainHelper()->isTrustedDomain($host)
+ && self::$server->getConfig()->getSystemValue('installed', false)
) {
header('HTTP/1.1 400 Bad Request');
header('Status: 400 Bad Request');
$tmpl = new OCP\Template('core', 'untrustedDomain', 'guest');
- $tmpl->assign('domain', $_SERVER['SERVER_NAME']);
+ $tmpl->assign('domain', $request->server['SERVER_NAME']);
$tmpl->printPage();
exit();
@@ -705,8 +726,8 @@ class OC {
$instanceId = \OC::$server->getSystemConfig()->getValue('instanceid', null);
if ($instanceId) {
try {
- $memcacheFactory = new \OC\Memcache\Factory($instanceId);
- self::$loader->setMemoryCache($memcacheFactory->createLowLatency('Autoloader'));
+ $memcacheFactory = \OC::$server->getMemCacheFactory();
+ self::$loader->setMemoryCache($memcacheFactory->createLocal('Autoloader'));
} catch (\Exception $ex) {
}
}
@@ -716,6 +737,7 @@ class OC {
* Handle the request
*/
public static function handleRequest() {
+
\OC::$server->getEventLogger()->start('handle_request', 'Handle request');
$systemConfig = \OC::$server->getSystemConfig();
// load all the classpaths from the enabled apps so they are available
@@ -725,17 +747,21 @@ class OC {
// Check if ownCloud is installed or in maintenance (update) mode
if (!$systemConfig->getValue('installed', false)) {
\OC::$server->getSession()->clear();
- $controller = new OC\Core\Setup\Controller(\OC::$server->getConfig(), \OC::$server->getIniWrapper(), \OC::$server->getL10N('core'), new \OC_Defaults());
+ $setupHelper = new OC\Setup(\OC::$server->getConfig(), \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'), new \OC_Defaults());
+ $controller = new OC\Core\Setup\Controller($setupHelper);
$controller->run($_POST);
exit();
}
- $request = OC_Request::getPathInfo();
+ $request = \OC::$server->getRequest()->getPathInfo();
if (substr($request, -3) !== '.js') { // we need these files during the upgrade
self::checkMaintenanceMode();
self::checkUpgrade();
}
+ // Always load authentication apps
+ OC_App::loadApps(['authentication']);
+
// Load minimum set of apps
if (!self::checkUpgrade(false)
&& !$systemConfig->getValue('maintenance', false)
@@ -744,8 +770,7 @@ class OC {
if(OC_User::isLoggedIn()) {
OC_App::loadApps();
} else {
- // For guests: Load only authentication, filesystem and logging
- OC_App::loadApps(array('authentication'));
+ // For guests: Load only filesystem and logging
OC_App::loadApps(array('filesystem', 'logging'));
\OC_User::tryBasicAuthLogin();
}
@@ -754,13 +779,12 @@ class OC {
if (!self::$CLI and (!isset($_GET["logout"]) or ($_GET["logout"] !== 'true'))) {
try {
if (!$systemConfig->getValue('maintenance', false) && !\OCP\Util::needUpgrade()) {
- OC_App::loadApps(array('authentication'));
OC_App::loadApps(array('filesystem', 'logging'));
OC_App::loadApps();
}
self::checkSingleUserMode();
OC_Util::setupFS();
- OC::$server->getRouter()->match(OC_Request::getRawPathInfo());
+ OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo());
return;
} catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) {
//header('HTTP/1.0 404 Not Found');
@@ -891,7 +915,7 @@ class OC {
// if return is true we are logged in -> redirect to the default page
if ($return === true) {
- $_REQUEST['redirect_url'] = \OC_Request::requestUri();
+ $_REQUEST['redirect_url'] = \OC::$server->getRequest()->getRequestUri();
OC_Util::redirectToDefaultPage();
exit;
}
@@ -956,13 +980,13 @@ class OC {
//setup extra user backends
OC_User::setupBackends();
- if (OC_User::login($_POST["user"], $_POST["password"])) {
+ if (OC_User::login((string)$_POST["user"], (string)$_POST["password"])) {
$userId = OC_User::getUser();
// setting up the time zone
if (isset($_POST['timezone-offset'])) {
- self::$server->getSession()->set('timezone', $_POST['timezone-offset']);
- self::$server->getConfig()->setUserValue($userId, 'core', 'timezone', $_POST['timezone']);
+ self::$server->getSession()->set('timezone', (string)$_POST['timezone-offset']);
+ self::$server->getConfig()->setUserValue($userId, 'core', 'timezone', (string)$_POST['timezone']);
}
self::cleanupLoginTokens($userId);
diff --git a/lib/l10n/af.php b/lib/l10n/af.php
deleted file mode 100644
index 15f78e0bce6..00000000000
--- a/lib/l10n/af.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$TRANSLATIONS = array(
-"_%n minute ago_::_%n minutes ago_" => array("",""),
-"_%n hour ago_::_%n hours ago_" => array("",""),
-"_%n day go_::_%n days ago_" => array("",""),
-"_%n month ago_::_%n months ago_" => array("","")
-);
-$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/lib/l10n/af_ZA.js b/lib/l10n/af_ZA.js
index 953186be7fe..74f22e6ac46 100644
--- a/lib/l10n/af_ZA.js
+++ b/lib/l10n/af_ZA.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Hulp",
"Personal" : "Persoonlik",
- "Settings" : "Instellings",
"Users" : "Gebruikers",
"Admin" : "Admin",
"Unknown filetype" : "Onbekende leertipe",
diff --git a/lib/l10n/af_ZA.json b/lib/l10n/af_ZA.json
index 7dd4d1ef718..91f70c2bef0 100644
--- a/lib/l10n/af_ZA.json
+++ b/lib/l10n/af_ZA.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Hulp",
"Personal" : "Persoonlik",
- "Settings" : "Instellings",
"Users" : "Gebruikers",
"Admin" : "Admin",
"Unknown filetype" : "Onbekende leertipe",
diff --git a/lib/l10n/ar.js b/lib/l10n/ar.js
index 246bffb979c..731b59cfef0 100644
--- a/lib/l10n/ar.js
+++ b/lib/l10n/ar.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "المساعدة",
"Personal" : "شخصي",
- "Settings" : "إعدادات",
"Users" : "المستخدمين",
"Admin" : "المدير",
"No app name specified" : "لا يوجد برنامج بهذا الاسم",
diff --git a/lib/l10n/ar.json b/lib/l10n/ar.json
index e2eb4272c3e..7055154384c 100644
--- a/lib/l10n/ar.json
+++ b/lib/l10n/ar.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "المساعدة",
"Personal" : "شخصي",
- "Settings" : "إعدادات",
"Users" : "المستخدمين",
"Admin" : "المدير",
"No app name specified" : "لا يوجد برنامج بهذا الاسم",
diff --git a/lib/l10n/ast.js b/lib/l10n/ast.js
index e7a11ccfe22..8e78192a293 100644
--- a/lib/l10n/ast.js
+++ b/lib/l10n/ast.js
@@ -10,11 +10,9 @@ OC.L10N.register(
"PHP %s or higher is required." : "Necesítase PHP %s o superior",
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Axustes",
"Users" : "Usuarios",
"Admin" : "Almin",
"Recommended" : "Recomendáu",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'aplicación \\\"%s\\\" nun pue instalase porque nun ye compatible con esta versión d'ownCloud",
"No app name specified" : "Nun s'especificó nome de l'aplicación",
"Unknown filetype" : "Triba de ficheru desconocida",
"Invalid image" : "Imaxe inválida",
@@ -94,12 +92,12 @@ OC.L10N.register(
"A valid password must be provided" : "Tien d'apurrise una contraseña válida",
"The username is already being used" : "El nome d'usuariu yá ta usándose",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nun hai controladores de bases de datos (sqlite, mysql, o postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Davezu los permisos puen iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu raigañu%s.",
"Cannot write into \"config\" directory" : "Nun pue escribise nel direutoriu \"config\"",
"Cannot write into \"apps\" directory" : "Nun pue escribise nel direutoriu \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Esto pue iguase %sdando permisos d'escritura al sirvidor Web nel direutoriu%s d'apps o deshabilitando la tienda d'apps nel ficheru de configuración.",
"Cannot create \"data\" directory (%s)" : "Nun pue crease'l direutoriu \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Esto pue iguase davezu <a href=\"%s\" target=\"_blank\">dándo-y accesu d'escritura al direutoriu raigañu</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Davezu los permisos puen iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu raigañu%s.",
"Setting locale to %s failed" : "Falló l'activación del idioma %s",
"Please install one of these locales on your system and restart your webserver." : "Instala ún d'estos locales nel to sistema y reanicia'l sirvidor web",
"Please ask your server administrator to install the module." : "Por favor, entrúga-y al to alministrador del sirvidor pa instalar el módulu.",
diff --git a/lib/l10n/ast.json b/lib/l10n/ast.json
index b8fce475855..b5bf2160dd1 100644
--- a/lib/l10n/ast.json
+++ b/lib/l10n/ast.json
@@ -8,11 +8,9 @@
"PHP %s or higher is required." : "Necesítase PHP %s o superior",
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Axustes",
"Users" : "Usuarios",
"Admin" : "Almin",
"Recommended" : "Recomendáu",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'aplicación \\\"%s\\\" nun pue instalase porque nun ye compatible con esta versión d'ownCloud",
"No app name specified" : "Nun s'especificó nome de l'aplicación",
"Unknown filetype" : "Triba de ficheru desconocida",
"Invalid image" : "Imaxe inválida",
@@ -92,12 +90,12 @@
"A valid password must be provided" : "Tien d'apurrise una contraseña válida",
"The username is already being used" : "El nome d'usuariu yá ta usándose",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nun hai controladores de bases de datos (sqlite, mysql, o postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Davezu los permisos puen iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu raigañu%s.",
"Cannot write into \"config\" directory" : "Nun pue escribise nel direutoriu \"config\"",
"Cannot write into \"apps\" directory" : "Nun pue escribise nel direutoriu \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Esto pue iguase %sdando permisos d'escritura al sirvidor Web nel direutoriu%s d'apps o deshabilitando la tienda d'apps nel ficheru de configuración.",
"Cannot create \"data\" directory (%s)" : "Nun pue crease'l direutoriu \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Esto pue iguase davezu <a href=\"%s\" target=\"_blank\">dándo-y accesu d'escritura al direutoriu raigañu</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Davezu los permisos puen iguase %sdándo-y al sirvidor web accesu d'escritura al direutoriu raigañu%s.",
"Setting locale to %s failed" : "Falló l'activación del idioma %s",
"Please install one of these locales on your system and restart your webserver." : "Instala ún d'estos locales nel to sistema y reanicia'l sirvidor web",
"Please ask your server administrator to install the module." : "Por favor, entrúga-y al to alministrador del sirvidor pa instalar el módulu.",
diff --git a/lib/l10n/az.js b/lib/l10n/az.js
index 3d5793ef799..f9017d6c2fa 100644
--- a/lib/l10n/az.js
+++ b/lib/l10n/az.js
@@ -8,17 +8,19 @@ OC.L10N.register(
"Sample configuration detected" : "Konfiqurasiya nüsxəsi təyin edildi",
"Help" : "Kömək",
"Personal" : "Şəxsi",
- "Settings" : "Quraşdırmalar",
"Users" : "İstifadəçilər",
"Admin" : "İnzibatçı",
+ "Recommended" : "Məsləhətlidir",
"No app name specified" : "Proqram adı təyin edilməyib",
"Unknown filetype" : "Fayl tipi bəlli deyil.",
"Invalid image" : "Yalnış şəkil",
+ "today" : "Bu gün",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
"_%n hour ago_::_%n hours ago_" : ["",""],
"_%n minute ago_::_%n minutes ago_" : ["",""],
+ "seconds ago" : "saniyələr öncə",
"App directory already exists" : "Proqram təminatı qovluğu artıq mövcuddur.",
"Can't create app folder. Please fix permissions. %s" : "Proqram təminatı qovluğunu yaratmaq mümkün olmadı. Xahiş edilir yetkiləri düzgün təyin edəsiniz. %s",
"Application is not enabled" : "Proqram təminatı aktiv edilməyib",
@@ -41,6 +43,8 @@ OC.L10N.register(
"You are not allowed to share %s" : "%s-in yayimlanmasına sizə izin verilmir",
"Share type %s is not valid for %s" : "Yayımlanma tipi %s etibarlı deyil %s üçün",
"A valid username must be provided" : "Düzgün istifadəçi adı daxil edilməlidir",
- "A valid password must be provided" : "Düzgün şifrə daxil edilməlidir"
+ "A valid password must be provided" : "Düzgün şifrə daxil edilməlidir",
+ "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP göründüyü kimi, daxili doc bloklarının ayrılması işini görəcək. Bu bəzi özək proqramlarını əlçatılmaz edə bilər.",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu ola bilər ki, cache/accelerator such tərəfindən cağırılıb hansi ki, Zend OPcache və eAccelerator-da olduğu kimidir."
},
"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/az.json b/lib/l10n/az.json
index 49d2df41c96..f668c129949 100644
--- a/lib/l10n/az.json
+++ b/lib/l10n/az.json
@@ -6,17 +6,19 @@
"Sample configuration detected" : "Konfiqurasiya nüsxəsi təyin edildi",
"Help" : "Kömək",
"Personal" : "Şəxsi",
- "Settings" : "Quraşdırmalar",
"Users" : "İstifadəçilər",
"Admin" : "İnzibatçı",
+ "Recommended" : "Məsləhətlidir",
"No app name specified" : "Proqram adı təyin edilməyib",
"Unknown filetype" : "Fayl tipi bəlli deyil.",
"Invalid image" : "Yalnış şəkil",
+ "today" : "Bu gün",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
"_%n hour ago_::_%n hours ago_" : ["",""],
"_%n minute ago_::_%n minutes ago_" : ["",""],
+ "seconds ago" : "saniyələr öncə",
"App directory already exists" : "Proqram təminatı qovluğu artıq mövcuddur.",
"Can't create app folder. Please fix permissions. %s" : "Proqram təminatı qovluğunu yaratmaq mümkün olmadı. Xahiş edilir yetkiləri düzgün təyin edəsiniz. %s",
"Application is not enabled" : "Proqram təminatı aktiv edilməyib",
@@ -39,6 +41,8 @@
"You are not allowed to share %s" : "%s-in yayimlanmasına sizə izin verilmir",
"Share type %s is not valid for %s" : "Yayımlanma tipi %s etibarlı deyil %s üçün",
"A valid username must be provided" : "Düzgün istifadəçi adı daxil edilməlidir",
- "A valid password must be provided" : "Düzgün şifrə daxil edilməlidir"
+ "A valid password must be provided" : "Düzgün şifrə daxil edilməlidir",
+ "PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP göründüyü kimi, daxili doc bloklarının ayrılması işini görəcək. Bu bəzi özək proqramlarını əlçatılmaz edə bilər.",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Bu ola bilər ki, cache/accelerator such tərəfindən cağırılıb hansi ki, Zend OPcache və eAccelerator-da olduğu kimidir."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/lib/l10n/be.js b/lib/l10n/be.js
index f34545ade21..9e8bfb415e4 100644
--- a/lib/l10n/be.js
+++ b/lib/l10n/be.js
@@ -1,7 +1,6 @@
OC.L10N.register(
"lib",
{
- "Settings" : "Налады",
"today" : "Сёння",
"yesterday" : "Ўчора",
"_%n day ago_::_%n days ago_" : ["","","",""],
diff --git a/lib/l10n/be.json b/lib/l10n/be.json
index 91f99445d7a..93db93a7e91 100644
--- a/lib/l10n/be.json
+++ b/lib/l10n/be.json
@@ -1,5 +1,4 @@
{ "translations": {
- "Settings" : "Налады",
"today" : "Сёння",
"yesterday" : "Ўчора",
"_%n day ago_::_%n days ago_" : ["","","",""],
diff --git a/lib/l10n/bg_BG.js b/lib/l10n/bg_BG.js
index 009d582cb94..105de8f2eef 100644
--- a/lib/l10n/bg_BG.js
+++ b/lib/l10n/bg_BG.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Необходим е ownCloud с по-ниска версия от %s.",
"Help" : "Помощ",
"Personal" : "Лични",
- "Settings" : "Настройки",
"Users" : "Потребители",
"Admin" : "Админ",
"Recommended" : "Препоръчано",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Приложението \\\"%s\\\" не може да бъде инсталирано, защото не е съвместимо с тази версия на ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Приложението \\\"%s\\\" не може да бъде инсталирано, защот следните зависимости не са удовлетворени: %s",
"No app name specified" : "Не е зададено име на преложението",
"Unknown filetype" : "Непознат тип файл.",
"Invalid image" : "Невалидно изображение.",
@@ -108,12 +105,12 @@ OC.L10N.register(
"A valid password must be provided" : "Валидна парола трябва да бъде зададена.",
"The username is already being used" : "Това потребителско име е вече заето.",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Липсват инсталирани драйвери за бази данни(sqlite, mysql или postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Правата за достъп обикновено могат да бъдат оправени като %s даде разрешение на уеб сървъра да пише в root папката %s.",
"Cannot write into \"config\" directory" : "Неуспешен опит за запис в \"config\" папката.",
"Cannot write into \"apps\" directory" : "Неуспешен опит за запис в \"apps\" папката.",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Това обикновено може да бъде оправено като %s даде разрешение на уеб сървъра да записва в app папката %s или като изключи магазина за приложения в config файла.",
"Cannot create \"data\" directory (%s)" : "Неуспешен опит за създаване на \"data\" папката (%s).",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Това обикновено може да бъде оправено като <a href=\"%s\" target=\"_blank\">дадеш разрешение на уеб сървъра да записва в root папката</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Правата за достъп обикновено могат да бъдат оправени като %s даде разрешение на уеб сървъра да пише в root папката %s.",
"Setting locale to %s failed" : "Неуспешно задаване на %s като настройка език-държава.",
"Please install one of these locales on your system and restart your webserver." : "Моля, инсталирай едно от следните език-държава на сървъра и рестартирай уеб сървъра.",
"Please ask your server administrator to install the module." : "Моля, поискай твоят администратор да инсталира модула.",
diff --git a/lib/l10n/bg_BG.json b/lib/l10n/bg_BG.json
index 2e9c228729d..0e9c1ef58e4 100644
--- a/lib/l10n/bg_BG.json
+++ b/lib/l10n/bg_BG.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "Необходим е ownCloud с по-ниска версия от %s.",
"Help" : "Помощ",
"Personal" : "Лични",
- "Settings" : "Настройки",
"Users" : "Потребители",
"Admin" : "Админ",
"Recommended" : "Препоръчано",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Приложението \\\"%s\\\" не може да бъде инсталирано, защото не е съвместимо с тази версия на ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Приложението \\\"%s\\\" не може да бъде инсталирано, защот следните зависимости не са удовлетворени: %s",
"No app name specified" : "Не е зададено име на преложението",
"Unknown filetype" : "Непознат тип файл.",
"Invalid image" : "Невалидно изображение.",
@@ -106,12 +103,12 @@
"A valid password must be provided" : "Валидна парола трябва да бъде зададена.",
"The username is already being used" : "Това потребителско име е вече заето.",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Липсват инсталирани драйвери за бази данни(sqlite, mysql или postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Правата за достъп обикновено могат да бъдат оправени като %s даде разрешение на уеб сървъра да пише в root папката %s.",
"Cannot write into \"config\" directory" : "Неуспешен опит за запис в \"config\" папката.",
"Cannot write into \"apps\" directory" : "Неуспешен опит за запис в \"apps\" папката.",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Това обикновено може да бъде оправено като %s даде разрешение на уеб сървъра да записва в app папката %s или като изключи магазина за приложения в config файла.",
"Cannot create \"data\" directory (%s)" : "Неуспешен опит за създаване на \"data\" папката (%s).",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Това обикновено може да бъде оправено като <a href=\"%s\" target=\"_blank\">дадеш разрешение на уеб сървъра да записва в root папката</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Правата за достъп обикновено могат да бъдат оправени като %s даде разрешение на уеб сървъра да пише в root папката %s.",
"Setting locale to %s failed" : "Неуспешно задаване на %s като настройка език-държава.",
"Please install one of these locales on your system and restart your webserver." : "Моля, инсталирай едно от следните език-държава на сървъра и рестартирай уеб сървъра.",
"Please ask your server administrator to install the module." : "Моля, поискай твоят администратор да инсталира модула.",
diff --git a/lib/l10n/bn_BD.js b/lib/l10n/bn_BD.js
index 432d033352f..3f26d26410e 100644
--- a/lib/l10n/bn_BD.js
+++ b/lib/l10n/bn_BD.js
@@ -8,7 +8,6 @@ OC.L10N.register(
"Sample configuration detected" : "নমুনা কনফিগারেশন পাওয়া গেছে",
"Help" : "সহায়িকা",
"Personal" : "ব্যক্তিগত",
- "Settings" : "নিয়ামকসমূহ",
"Users" : "ব্যবহারকারী",
"Admin" : "প্রশাসন",
"No app name specified" : "কোন অ্যাপ নাম সুনির্দিষ্ট নয়",
diff --git a/lib/l10n/bn_BD.json b/lib/l10n/bn_BD.json
index 08e5edc50d2..224d042a001 100644
--- a/lib/l10n/bn_BD.json
+++ b/lib/l10n/bn_BD.json
@@ -6,7 +6,6 @@
"Sample configuration detected" : "নমুনা কনফিগারেশন পাওয়া গেছে",
"Help" : "সহায়িকা",
"Personal" : "ব্যক্তিগত",
- "Settings" : "নিয়ামকসমূহ",
"Users" : "ব্যবহারকারী",
"Admin" : "প্রশাসন",
"No app name specified" : "কোন অ্যাপ নাম সুনির্দিষ্ট নয়",
diff --git a/lib/l10n/bn_IN.js b/lib/l10n/bn_IN.js
index 9933281c8d8..a12702211c2 100644
--- a/lib/l10n/bn_IN.js
+++ b/lib/l10n/bn_IN.js
@@ -1,7 +1,6 @@
OC.L10N.register(
"lib",
{
- "Settings" : "সেটিংস",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/bn_IN.json b/lib/l10n/bn_IN.json
index 239478adca6..b994fa289eb 100644
--- a/lib/l10n/bn_IN.json
+++ b/lib/l10n/bn_IN.json
@@ -1,5 +1,4 @@
{ "translations": {
- "Settings" : "সেটিংস",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/bs.js b/lib/l10n/bs.js
index cad023a3701..2685f38ea40 100644
--- a/lib/l10n/bs.js
+++ b/lib/l10n/bs.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Pomoć",
"Personal" : "Osobno",
- "Settings" : "Postavke",
"Users" : "Korisnici",
"Admin" : "Admin",
"Recommended" : "Preporučljivo",
diff --git a/lib/l10n/bs.json b/lib/l10n/bs.json
index df1b3fbd25e..2ae3317736e 100644
--- a/lib/l10n/bs.json
+++ b/lib/l10n/bs.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Pomoć",
"Personal" : "Osobno",
- "Settings" : "Postavke",
"Users" : "Korisnici",
"Admin" : "Admin",
"Recommended" : "Preporučljivo",
diff --git a/lib/l10n/ca.js b/lib/l10n/ca.js
index d086be8adac..31fbb0dcd39 100644
--- a/lib/l10n/ca.js
+++ b/lib/l10n/ca.js
@@ -10,11 +10,9 @@ OC.L10N.register(
"PHP %s or higher is required." : "Es requereix PHP %s o superior.",
"Help" : "Ajuda",
"Personal" : "Personal",
- "Settings" : "Configuració",
"Users" : "Usuaris",
"Admin" : "Administració",
"Recommended" : "Recomanat",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'aplicació \\\"%s\\\" no es pot instal·lar perquè no es compatible amb aquesta versió de ownCloud.",
"No app name specified" : "No heu especificat cap nom d'aplicació",
"Unknown filetype" : "Tipus de fitxer desconegut",
"Invalid image" : "Imatge no vàlida",
@@ -93,12 +91,12 @@ OC.L10N.register(
"A valid password must be provided" : "Heu de facilitar una contrasenya vàlida",
"The username is already being used" : "El nom d'usuari ja està en ús",
"No database drivers (sqlite, mysql, or postgresql) installed." : "No hi ha instal·lats controladors de bases de dades (sqlite, mysql o postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta de configuració %s",
"Cannot write into \"config\" directory" : "No es pot escriure a la carpeta \"config\"",
"Cannot write into \"apps\" directory" : "No es pot escriure a la carpeta \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta d'aplicacions %s o inhabilitant la botiga d'aplicacions en el fitxer de configuració.",
"Cannot create \"data\" directory (%s)" : "No es pot crear la carpeta \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Aixó normalment es por solucionar <a href=\"%s\" target=\"_blank\">donant al servidor web permís d'accés a la carpeta arrel</a>",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta de configuració %s",
"Setting locale to %s failed" : "Ha fallat en establir la llengua a %s",
"Please install one of these locales on your system and restart your webserver." : "Siusplau, instal·li un d'aquests arxius de localització en el seu sistema, i reinicii el seu servidor web.",
"Please ask your server administrator to install the module." : "Demaneu a l'administrador del sistema que instal·li el mòdul.",
diff --git a/lib/l10n/ca.json b/lib/l10n/ca.json
index e0928e6d606..f55eb0f3be0 100644
--- a/lib/l10n/ca.json
+++ b/lib/l10n/ca.json
@@ -8,11 +8,9 @@
"PHP %s or higher is required." : "Es requereix PHP %s o superior.",
"Help" : "Ajuda",
"Personal" : "Personal",
- "Settings" : "Configuració",
"Users" : "Usuaris",
"Admin" : "Administració",
"Recommended" : "Recomanat",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'aplicació \\\"%s\\\" no es pot instal·lar perquè no es compatible amb aquesta versió de ownCloud.",
"No app name specified" : "No heu especificat cap nom d'aplicació",
"Unknown filetype" : "Tipus de fitxer desconegut",
"Invalid image" : "Imatge no vàlida",
@@ -91,12 +89,12 @@
"A valid password must be provided" : "Heu de facilitar una contrasenya vàlida",
"The username is already being used" : "El nom d'usuari ja està en ús",
"No database drivers (sqlite, mysql, or postgresql) installed." : "No hi ha instal·lats controladors de bases de dades (sqlite, mysql o postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta de configuració %s",
"Cannot write into \"config\" directory" : "No es pot escriure a la carpeta \"config\"",
"Cannot write into \"apps\" directory" : "No es pot escriure a la carpeta \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta d'aplicacions %s o inhabilitant la botiga d'aplicacions en el fitxer de configuració.",
"Cannot create \"data\" directory (%s)" : "No es pot crear la carpeta \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Aixó normalment es por solucionar <a href=\"%s\" target=\"_blank\">donant al servidor web permís d'accés a la carpeta arrel</a>",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Això normalment es pot solucionar donant a %s permís d'escriptura a la carpeta de configuració %s",
"Setting locale to %s failed" : "Ha fallat en establir la llengua a %s",
"Please install one of these locales on your system and restart your webserver." : "Siusplau, instal·li un d'aquests arxius de localització en el seu sistema, i reinicii el seu servidor web.",
"Please ask your server administrator to install the module." : "Demaneu a l'administrador del sistema que instal·li el mòdul.",
diff --git a/lib/l10n/cs_CZ.js b/lib/l10n/cs_CZ.js
index 3eba7347b72..e23ac25dee2 100644
--- a/lib/l10n/cs_CZ.js
+++ b/lib/l10n/cs_CZ.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Je vyžadován ownCloud ve verzi nižší než %s.",
"Help" : "Nápověda",
"Personal" : "Osobní",
- "Settings" : "Nastavení",
"Users" : "Uživatelé",
"Admin" : "Administrace",
"Recommended" : "Doporučené",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikace \\\"%s\\\" nemůže být nainstalována, protože není kompatibilní s touto verzí ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikaci \\\"%s\\\" nelze nainstalovat, protože nejsou splněny následující závislosti: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Aplikace \"%s\" nemůže být nainstalována, protože není kompatibilní s touto verzí ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikaci \"%s\" nelze nainstalovat, protože nejsou splněny následující závislosti: %s",
"No app name specified" : "Nebyl zadan název aplikace",
"Unknown filetype" : "Neznámý typ souboru",
"Invalid image" : "Chybný obrázek",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "Musíte zadat platné heslo",
"The username is already being used" : "Uživatelské jméno je již využíváno",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nejsou instalovány ovladače databází (sqlite, mysql nebo postresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnění lze obvykle napravit %spovolením zápisu webovému serveru do kořenového adresáře%s.",
"Cannot write into \"config\" directory" : "Nelze zapisovat do adresáře \"config\"",
"Cannot write into \"apps\" directory" : "Nelze zapisovat do adresáře \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "To lze obvykle vyřešit %spovolením zápisu webovému serveru do adresáře apps%s nebo zakázáním appstore v konfiguračním souboru.",
"Cannot create \"data\" directory (%s)" : "Nelze vytvořit adresář \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "To lze obvykle vyřešit <a href=\"%s\" target=\"_blank\">povolením zápisu webovému serveru do kořenového adresáře</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnění lze obvykle napravit %spovolením zápisu webovému serveru do kořenového adresáře%s.",
"Setting locale to %s failed" : "Nastavení jazyka na %s selhalo",
"Please install one of these locales on your system and restart your webserver." : "Prosím nainstalujte alespoň jeden z těchto jazyků do svého systému a restartujte webový server.",
"Please ask your server administrator to install the module." : "Požádejte svého správce systému o instalaci tohoto modulu.",
"PHP module %s not installed." : "PHP modul %s není nainstalován.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP hodnota \"%s\" není nastavena na \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Úprava tohoto nastavení v php.ini opět rozběhne ownCloud",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Požádejte svého správce systému o aktualizaci PHP na nejnovější verzi. Vaše verze PHP již není podporována komunitami ownCloud a PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP je nakonfigurováno vytvářet raw post data. Od verze 5.6 bude toto nastavení vést PHP k vypisování hlášení i pro perfektně správný kód.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Pro nápravu tohoto chování nastavte <code>always_populate_raw_post_data</code> na <code>-1</code> ve svém php.ini",
diff --git a/lib/l10n/cs_CZ.json b/lib/l10n/cs_CZ.json
index dbbdccf9261..9e1cac97496 100644
--- a/lib/l10n/cs_CZ.json
+++ b/lib/l10n/cs_CZ.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Je vyžadován ownCloud ve verzi nižší než %s.",
"Help" : "Nápověda",
"Personal" : "Osobní",
- "Settings" : "Nastavení",
"Users" : "Uživatelé",
"Admin" : "Administrace",
"Recommended" : "Doporučené",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikace \\\"%s\\\" nemůže být nainstalována, protože není kompatibilní s touto verzí ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikaci \\\"%s\\\" nelze nainstalovat, protože nejsou splněny následující závislosti: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Aplikace \"%s\" nemůže být nainstalována, protože není kompatibilní s touto verzí ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikaci \"%s\" nelze nainstalovat, protože nejsou splněny následující závislosti: %s",
"No app name specified" : "Nebyl zadan název aplikace",
"Unknown filetype" : "Neznámý typ souboru",
"Invalid image" : "Chybný obrázek",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "Musíte zadat platné heslo",
"The username is already being used" : "Uživatelské jméno je již využíváno",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nejsou instalovány ovladače databází (sqlite, mysql nebo postresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnění lze obvykle napravit %spovolením zápisu webovému serveru do kořenového adresáře%s.",
"Cannot write into \"config\" directory" : "Nelze zapisovat do adresáře \"config\"",
"Cannot write into \"apps\" directory" : "Nelze zapisovat do adresáře \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "To lze obvykle vyřešit %spovolením zápisu webovému serveru do adresáře apps%s nebo zakázáním appstore v konfiguračním souboru.",
"Cannot create \"data\" directory (%s)" : "Nelze vytvořit adresář \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "To lze obvykle vyřešit <a href=\"%s\" target=\"_blank\">povolením zápisu webovému serveru do kořenového adresáře</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnění lze obvykle napravit %spovolením zápisu webovému serveru do kořenového adresáře%s.",
"Setting locale to %s failed" : "Nastavení jazyka na %s selhalo",
"Please install one of these locales on your system and restart your webserver." : "Prosím nainstalujte alespoň jeden z těchto jazyků do svého systému a restartujte webový server.",
"Please ask your server administrator to install the module." : "Požádejte svého správce systému o instalaci tohoto modulu.",
"PHP module %s not installed." : "PHP modul %s není nainstalován.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP hodnota \"%s\" není nastavena na \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Úprava tohoto nastavení v php.ini opět rozběhne ownCloud",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Požádejte svého správce systému o aktualizaci PHP na nejnovější verzi. Vaše verze PHP již není podporována komunitami ownCloud a PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP je nakonfigurováno vytvářet raw post data. Od verze 5.6 bude toto nastavení vést PHP k vypisování hlášení i pro perfektně správný kód.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Pro nápravu tohoto chování nastavte <code>always_populate_raw_post_data</code> na <code>-1</code> ve svém php.ini",
diff --git a/lib/l10n/cy_GB.js b/lib/l10n/cy_GB.js
index cd3772cd7c1..2b4a4c40221 100644
--- a/lib/l10n/cy_GB.js
+++ b/lib/l10n/cy_GB.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Cymorth",
"Personal" : "Personol",
- "Settings" : "Gosodiadau",
"Users" : "Defnyddwyr",
"Admin" : "Gweinyddu",
"today" : "heddiw",
diff --git a/lib/l10n/cy_GB.json b/lib/l10n/cy_GB.json
index 3d88f8b876b..8a5d8a9c5bb 100644
--- a/lib/l10n/cy_GB.json
+++ b/lib/l10n/cy_GB.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Cymorth",
"Personal" : "Personol",
- "Settings" : "Gosodiadau",
"Users" : "Defnyddwyr",
"Admin" : "Gweinyddu",
"today" : "heddiw",
diff --git a/lib/l10n/da.js b/lib/l10n/da.js
index 362f27e3416..fd99586cc1e 100644
--- a/lib/l10n/da.js
+++ b/lib/l10n/da.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Der kræves ownCloud i en version som er lavere end %s.",
"Help" : "Hjælp",
"Personal" : "Personligt",
- "Settings" : "Indstillinger",
"Users" : "Brugere",
"Admin" : "Admin",
"Recommended" : "Anbefalet",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App'en \\\"%s\\\" kan ikke installeres, da den ikke er kompatible med denne version af ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Programmet \\\"%s\\\" kan ikke installeres, da følgende afhængigheder ikke er opfyldt: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App'en \"%s\" kan ikke installeres, da den er ikke er kompatibel med denne version af ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App'en \"%s\" kan ikke installeres, da følgende krav ikke er opfyldt: %s ",
"No app name specified" : "Intet app-navn angivet",
"Unknown filetype" : "Ukendt filtype",
"Invalid image" : "Ugyldigt billede",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "En gyldig adgangskode skal angives",
"The username is already being used" : "Brugernavnet er allerede i brug",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ingen database driver (sqlite, mysql eller postgresql) er installeret.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rettigheder kan som regel rettes ved %sat give webserveren skriveadgang til rodmappen%s.",
"Cannot write into \"config\" directory" : "Kan ikke skrive til mappen \"config\"",
"Cannot write into \"apps\" directory" : "Kan ikke skrive til mappen \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dette kan som regel rettes ved at %sgive webserveren skriveadgang til apps-mappen%s eller slå appstore fra i config-filen.",
"Cannot create \"data\" directory (%s)" : "Kan ikke oprette mappen \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dette kan som regel rettes ved <a href=\"%s\" target=\"_blank\">give webserveren skriveadgang til rodmappen</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rettigheder kan som regel rettes ved %sat give webserveren skriveadgang til rodmappen%s.",
"Setting locale to %s failed" : "Angivelse af %s for lokalitet mislykkedes",
"Please install one of these locales on your system and restart your webserver." : "Installér venligst én af disse lokaliteter på dit system, og genstart din webserver.",
"Please ask your server administrator to install the module." : "Du bedes anmode din serveradministrator om at installere modulet.",
"PHP module %s not installed." : "PHP-modulet %s er ikke installeret.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-indstillingen \"%s\" er ikke angivet til \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Justeres denne indstilling i php.ini, så vil ownCloud kunne køre igen",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bed venligst din serveradministrator om at opdatere PHP til seneste version. Din PHP-version understøttes ikke længere af ownCload og PHP-fællesskabet.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP er konfigureret til at udfylde rå postdata. Siden PHP 5.6 har dette ført til, at PHP smider med notitser for fuldstændig gyldig kode.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "For at rette dette problem, så angiv <code>always_populate_raw_post_data</code> til <code>-1</code> i din php.ini",
diff --git a/lib/l10n/da.json b/lib/l10n/da.json
index b0ab2b4f6e7..eb0132d0e4c 100644
--- a/lib/l10n/da.json
+++ b/lib/l10n/da.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Der kræves ownCloud i en version som er lavere end %s.",
"Help" : "Hjælp",
"Personal" : "Personligt",
- "Settings" : "Indstillinger",
"Users" : "Brugere",
"Admin" : "Admin",
"Recommended" : "Anbefalet",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App'en \\\"%s\\\" kan ikke installeres, da den ikke er kompatible med denne version af ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Programmet \\\"%s\\\" kan ikke installeres, da følgende afhængigheder ikke er opfyldt: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App'en \"%s\" kan ikke installeres, da den er ikke er kompatibel med denne version af ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App'en \"%s\" kan ikke installeres, da følgende krav ikke er opfyldt: %s ",
"No app name specified" : "Intet app-navn angivet",
"Unknown filetype" : "Ukendt filtype",
"Invalid image" : "Ugyldigt billede",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "En gyldig adgangskode skal angives",
"The username is already being used" : "Brugernavnet er allerede i brug",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ingen database driver (sqlite, mysql eller postgresql) er installeret.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rettigheder kan som regel rettes ved %sat give webserveren skriveadgang til rodmappen%s.",
"Cannot write into \"config\" directory" : "Kan ikke skrive til mappen \"config\"",
"Cannot write into \"apps\" directory" : "Kan ikke skrive til mappen \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dette kan som regel rettes ved at %sgive webserveren skriveadgang til apps-mappen%s eller slå appstore fra i config-filen.",
"Cannot create \"data\" directory (%s)" : "Kan ikke oprette mappen \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dette kan som regel rettes ved <a href=\"%s\" target=\"_blank\">give webserveren skriveadgang til rodmappen</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rettigheder kan som regel rettes ved %sat give webserveren skriveadgang til rodmappen%s.",
"Setting locale to %s failed" : "Angivelse af %s for lokalitet mislykkedes",
"Please install one of these locales on your system and restart your webserver." : "Installér venligst én af disse lokaliteter på dit system, og genstart din webserver.",
"Please ask your server administrator to install the module." : "Du bedes anmode din serveradministrator om at installere modulet.",
"PHP module %s not installed." : "PHP-modulet %s er ikke installeret.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-indstillingen \"%s\" er ikke angivet til \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Justeres denne indstilling i php.ini, så vil ownCloud kunne køre igen",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bed venligst din serveradministrator om at opdatere PHP til seneste version. Din PHP-version understøttes ikke længere af ownCload og PHP-fællesskabet.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP er konfigureret til at udfylde rå postdata. Siden PHP 5.6 har dette ført til, at PHP smider med notitser for fuldstændig gyldig kode.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "For at rette dette problem, så angiv <code>always_populate_raw_post_data</code> til <code>-1</code> i din php.ini",
diff --git a/lib/l10n/de.js b/lib/l10n/de.js
index 0d8c6085a64..20a8d4f7d89 100644
--- a/lib/l10n/de.js
+++ b/lib/l10n/de.js
@@ -1,12 +1,12 @@
OC.L10N.register(
"lib",
{
- "Cannot write into \"config\" directory!" : "Das Schreiben in das \"config\"-Verzeichnis ist nicht möglich!",
+ "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!",
"This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird",
"See %s" : "Siehe %s",
- "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.",
+ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das Konfigurationsverzeichnis gegeben wird%s.",
"Sample configuration detected" : "Beispielkonfiguration gefunden",
- "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies wird nicht unterstützt und kann zum Abruch Ihrer Installation führen. Bitte lies die Dokumentation vor der Änderung an der config.php.",
+ "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Deine Installation zerstören und wird nicht unterstützt. Bitte lies die Dokumentation, bevor Du Änderungen an der config.php vornimmst.",
"PHP %s or higher is required." : "PHP %s oder höher wird benötigt.",
"PHP with a version lower than %s is required." : "PHP wird in einer früheren Version als %s benötigt.",
"Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s",
@@ -19,13 +19,12 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud wird in einer früheren Version als %s benötigt.",
"Help" : "Hilfe",
"Personal" : "Persönlich",
- "Settings" : "Einstellungen",
"Users" : "Benutzer",
"Admin" : "Administration",
"Recommended" : "Empfohlen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Applikation \\\"%s\\\" kann nicht installiert werden, da sie mit dieser ownCloud Version nicht kompatibel ist.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App \\\"%s\\\" kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind: %s",
- "No app name specified" : "Es wurde kein Applikation-Name angegeben",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Die App „%s“ kann nicht installiert werden, da sie mit dieser ownCloud-Version nicht kompatibel ist.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App „%s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %s",
+ "No app name specified" : "Es wurde kein App-Name angegeben",
"Unknown filetype" : "Unbekannter Dateityp",
"Invalid image" : "Ungültiges Bild",
"today" : "Heute",
@@ -40,7 +39,7 @@ OC.L10N.register(
"seconds ago" : "Gerade eben",
"Database Error" : "Datenbankfehler",
"Please contact your system administrator." : "Bitte kontaktiere Deinen Systemadministrator.",
- "web services under your control" : "Web-Services unter Deiner Kontrolle",
+ "web services under your control" : "Web-Dienste unter Deiner Kontrolle",
"App directory already exists" : "Das Applikationsverzeichnis existiert bereits",
"Can't create app folder. Please fix permissions. %s" : "Es kann kein Applikationsordner erstellt werden. Bitte passe die Berechtigungen an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
@@ -48,35 +47,35 @@ OC.L10N.register(
"No path specified when installing app from local file" : "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
"Archives of type %s are not supported" : "Archive vom Typ %s werden nicht unterstützt",
"Failed to open archive when installing app" : "Das Archiv konnte bei der Installation der Applikation nicht geöffnet werden",
- "App does not provide an info.xml file" : "Die Applikation enthält keine info,xml Datei",
+ "App does not provide an info.xml file" : "Die Applikation enthält keine info.xml Datei",
"App can't be installed because of not allowed code in the App" : "Die Applikation kann auf Grund von unerlaubtem Code nicht installiert werden",
"App can't be installed because it is not compatible with this version of ownCloud" : "Die Anwendung konnte nicht installiert werden, weil Sie nicht mit dieser Version von ownCloud kompatibel ist.",
- "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die Applikation konnte nicht installiert werden, da diese das <shipped>true</shipped> Tag beinhaltet und dieses, bei nicht mitausgelieferten Applikationen, nicht erlaubt ist",
+ "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die App kann nicht installiert werden, weil sie den <shipped>true</shipped>-Tag enthält, der bei Apps, die nicht zum Standardumfang von ownCloud gehören, nicht erlaubt ist",
"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "Die Applikation konnte nicht installiert werden, da die Version in der info.xml nicht die gleiche Version wie im App-Store ist",
"Application is not enabled" : "Die Anwendung ist nicht aktiviert",
- "Authentication error" : "Fehler bei der Anmeldung",
+ "Authentication error" : "Authentifizierungsfehler",
"Token expired. Please reload page." : "Token abgelaufen. Bitte lade die Seite neu.",
"Unknown user" : "Unbekannter Benutzer",
"%s enter the database username." : "%s gib den Datenbank-Benutzernamen an.",
- "%s enter the database name." : "%s gib den Datenbank-Namen an.",
- "%s you may not use dots in the database name" : "%s Der Datenbank-Name darf keine Punkte enthalten",
- "MS SQL username and/or password not valid: %s" : "MS SQL Benutzername und/oder Password ungültig: %s",
- "You need to enter either an existing account or the administrator." : "Du musst entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
- "MySQL/MariaDB username and/or password not valid" : "MySQL/MariaDB Benutzername und/oder Passwort sind nicht gültig",
- "DB Error: \"%s\"" : "DB Fehler: \"%s\"",
- "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: \"%s\"",
+ "%s enter the database name." : "%s gib den Datenbanknamen an.",
+ "%s you may not use dots in the database name" : "%s Der Datenbankname darf keine Punkte enthalten",
+ "MS SQL username and/or password not valid: %s" : "MS SQL-Benutzername und/oder -Passwort ungültig: %s",
+ "You need to enter either an existing account or the administrator." : "Du musst entweder ein existierendes Benutzerkonto oder das Administratorenkonto angeben.",
+ "MySQL/MariaDB username and/or password not valid" : "MySQL/MariaDB-Benutzername und/oder -Passwort sind nicht gültig",
+ "DB Error: \"%s\"" : "DB-Fehler: „%s“",
+ "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"MySQL/MariaDB user '%s'@'localhost' exists already." : "MySQL/MariaDB Benutzer '%s'@'localhost' existiert bereits.",
- "Drop this user from MySQL/MariaDB" : "Lösche diesen Benutzer von MySQL/MariaDB",
- "MySQL/MariaDB user '%s'@'%%' already exists" : "MySQL/MariaDB Benutzer '%s'@'%%' existiert bereits",
- "Drop this user from MySQL/MariaDB." : "Lösche diesen Benutzer von MySQL/MariaDB.",
+ "Drop this user from MySQL/MariaDB" : "Diesen Benutzer aus MySQL/MariaDB löschen",
+ "MySQL/MariaDB user '%s'@'%%' already exists" : "MySQL/MariaDB-Benutzer '%s'@'%%' existiert bereits",
+ "Drop this user from MySQL/MariaDB." : "Diesen Benutzer aus MySQL/MariaDB löschen.",
"Oracle connection could not be established" : "Es konnte keine Verbindung zur Oracle-Datenbank hergestellt werden",
- "Oracle username and/or password not valid" : "Oracle Benutzername und/oder Passwort ungültig",
- "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
- "PostgreSQL username and/or password not valid" : "PostgreSQL Benutzername und/oder Passwort ungültig",
- "Set an admin username." : "Setze Administrator Benutzername.",
- "Set an admin password." : "Setze Administrator Passwort",
- "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder beschreiben werden",
- "%s shared »%s« with you" : "%s teilte »%s« mit Dir",
+ "Oracle username and/or password not valid" : "Oracle-Benutzername und/oder -Passwort ungültig",
+ "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
+ "PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
+ "Set an admin username." : "Einen Administrator-Benutzernamen setzen.",
+ "Set an admin password." : "Ein Administrator-Passwort setzen.",
+ "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.",
+ "%s shared »%s« with you" : "%s hat „%s“ mit Dir geteilt",
"Sharing %s failed, because the backend does not allow shares from type %i" : "Freigabe von %s fehlgeschlagen, da das Backend die Freigabe vom Typ %i nicht erlaubt.",
"Sharing %s failed, because the file does not exist" : "Freigabe von %s fehlgeschlagen, da die Datei nicht existiert",
"You are not allowed to share %s" : "Die Freigabe von %s ist Dir nicht erlaubt",
@@ -102,29 +101,31 @@ OC.L10N.register(
"Sharing %s failed, because resharing is not allowed" : "Freigabe von %s fehlgeschlagen, da das nochmalige Freigeben einer Freigabe nicht erlaubt ist",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Freigabe von %s fehlgeschlagen, da das Freigabe-Backend für %s nicht in dieser Quelle gefunden werden konnte",
"Sharing %s failed, because the file could not be found in the file cache" : "Freigabe von %s fehlgeschlagen, da die Datei im Datei-Cache nicht gefunden werden konnte",
- "Could not find category \"%s\"" : "Die Kategorie \"%s\" konnte nicht gefunden werden.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: \"a-z\", \"A-Z\", \"0-9\" und \"_.@-\"",
+ "Could not find category \"%s\"" : "Die Kategorie „%s“ konnte nicht gefunden werden",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: „a-z“, „A-Z“, „0-9“ und „_.@-“",
"A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden",
"A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden",
"The username is already being used" : "Dieser Benutzername existiert bereits",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MYSQL, oder PostgreSQL) installiert.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
- "Cannot write into \"config\" directory" : "Das Schreiben in das \"config\"-Verzeichnis nicht möglich",
- "Cannot write into \"apps\" directory" : "Das Schreiben in das \"apps\"-Verzeichnis nicht möglich",
- "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Anwendungsverzeichnis %s gegeben wird oder die Anwendungsauswahl in der Konfigurationsdatei deaktiviert wird.",
- "Cannot create \"data\" directory (%s)" : "Das Erstellen des \"data\"-Verzeichnisses nicht möglich (%s)",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MySQL oder PostgreSQL) installiert.",
+ "Cannot write into \"config\" directory" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich",
+ "Cannot write into \"apps\" directory" : "Das Schreiben in das „apps“-Verzeichnis ist nicht möglich",
+ "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird%s oder der App Store in der Konfigurationsdatei deaktiviert wird.",
+ "Cannot create \"data\" directory (%s)" : "Das Erstellen des „data“-Verzeichnisses ist nicht möglich (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dies kann normalerweise repariert werden, indem dem Webserver <a href=\"%s\" target=\"_blank\" Schreibzugriff auf das Wurzelverzeichnis gegeben wird</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
"Setting locale to %s failed" : "Das Setzen der Umgebungslokale auf %s fehlgeschlagen",
"Please install one of these locales on your system and restart your webserver." : "Bitte installiere eine dieser Sprachen auf Deinem System und starte den Webserver neu.",
"Please ask your server administrator to install the module." : "Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.",
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
- "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte frage zur Aktualisierung von PHP auf die letzte Version Deinen Server-Administrator. Deine PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
+ "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte kontaktiere Deinen Server-Administrator und bitte um Aktualisierung von PHP auf die letzte Version. Deine PHP-Version wird von ownCloud und der PHP-Community nicht mehr unterstützt.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP ist konfiguriert, unverarbeitete POST-Daten zu füllen. Seit PHP 5.6 führt dies dazu, dass PHP Warnmeldungen für vollkommen gültigen Code ausgibt.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Setze <code>always_populate_raw_post_data</code> in Deiner php.ini auf <code>-1</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
- "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?",
- "Please ask your server administrator to restart the web server." : "Bitte frage Deinen Server-Administrator zum Neustart des Webservers.",
+ "Please ask your server administrator to restart the web server." : "Bitte kontaktiere Deinen Server-Administrator und bitte um den Neustart des Webservers.",
"PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt",
"Please upgrade your database version" : "Bitte aktualisiere Deine Datenbankversion",
"Error occurred while checking PostgreSQL version" : "Es ist ein Fehler beim Prüfen der PostgreSQL-Version aufgetreten",
@@ -132,7 +133,7 @@ OC.L10N.register(
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Bitte ändere die Berechtigungen auf 0770 sodass das Verzeichnis nicht von anderen Nutzer angezeigt werden kann.",
"Data directory (%s) is readable by other users" : "Daten-Verzeichnis (%s) ist von anderen Nutzern lesbar",
"Data directory (%s) is invalid" : "Daten-Verzeichnis (%s) ist ungültig",
- "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stelle sicher, dass das Daten-Verzeichnis eine Datei namens \".ocdata\" im Wurzelverzeichnis enthält.",
- "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf \"%s\" konnte nicht ermittelt werden."
+ "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stelle sicher, dass das Datenverzeichnis auf seiner ersten Ebene eine Datei namens „.ocdata“ enthält.",
+ "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf „%s“ konnte nicht ermittelt werden."
},
"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/de.json b/lib/l10n/de.json
index cc021ab8d81..e90e388b2ea 100644
--- a/lib/l10n/de.json
+++ b/lib/l10n/de.json
@@ -1,10 +1,10 @@
{ "translations": {
- "Cannot write into \"config\" directory!" : "Das Schreiben in das \"config\"-Verzeichnis ist nicht möglich!",
+ "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!",
"This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird",
"See %s" : "Siehe %s",
- "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.",
+ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das Konfigurationsverzeichnis gegeben wird%s.",
"Sample configuration detected" : "Beispielkonfiguration gefunden",
- "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies wird nicht unterstützt und kann zum Abruch Ihrer Installation führen. Bitte lies die Dokumentation vor der Änderung an der config.php.",
+ "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Deine Installation zerstören und wird nicht unterstützt. Bitte lies die Dokumentation, bevor Du Änderungen an der config.php vornimmst.",
"PHP %s or higher is required." : "PHP %s oder höher wird benötigt.",
"PHP with a version lower than %s is required." : "PHP wird in einer früheren Version als %s benötigt.",
"Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s",
@@ -17,13 +17,12 @@
"ownCloud with a version lower than %s is required." : "ownCloud wird in einer früheren Version als %s benötigt.",
"Help" : "Hilfe",
"Personal" : "Persönlich",
- "Settings" : "Einstellungen",
"Users" : "Benutzer",
"Admin" : "Administration",
"Recommended" : "Empfohlen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Applikation \\\"%s\\\" kann nicht installiert werden, da sie mit dieser ownCloud Version nicht kompatibel ist.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App \\\"%s\\\" kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind: %s",
- "No app name specified" : "Es wurde kein Applikation-Name angegeben",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Die App „%s“ kann nicht installiert werden, da sie mit dieser ownCloud-Version nicht kompatibel ist.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App „%s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %s",
+ "No app name specified" : "Es wurde kein App-Name angegeben",
"Unknown filetype" : "Unbekannter Dateityp",
"Invalid image" : "Ungültiges Bild",
"today" : "Heute",
@@ -38,7 +37,7 @@
"seconds ago" : "Gerade eben",
"Database Error" : "Datenbankfehler",
"Please contact your system administrator." : "Bitte kontaktiere Deinen Systemadministrator.",
- "web services under your control" : "Web-Services unter Deiner Kontrolle",
+ "web services under your control" : "Web-Dienste unter Deiner Kontrolle",
"App directory already exists" : "Das Applikationsverzeichnis existiert bereits",
"Can't create app folder. Please fix permissions. %s" : "Es kann kein Applikationsordner erstellt werden. Bitte passe die Berechtigungen an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
@@ -46,35 +45,35 @@
"No path specified when installing app from local file" : "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
"Archives of type %s are not supported" : "Archive vom Typ %s werden nicht unterstützt",
"Failed to open archive when installing app" : "Das Archiv konnte bei der Installation der Applikation nicht geöffnet werden",
- "App does not provide an info.xml file" : "Die Applikation enthält keine info,xml Datei",
+ "App does not provide an info.xml file" : "Die Applikation enthält keine info.xml Datei",
"App can't be installed because of not allowed code in the App" : "Die Applikation kann auf Grund von unerlaubtem Code nicht installiert werden",
"App can't be installed because it is not compatible with this version of ownCloud" : "Die Anwendung konnte nicht installiert werden, weil Sie nicht mit dieser Version von ownCloud kompatibel ist.",
- "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die Applikation konnte nicht installiert werden, da diese das <shipped>true</shipped> Tag beinhaltet und dieses, bei nicht mitausgelieferten Applikationen, nicht erlaubt ist",
+ "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die App kann nicht installiert werden, weil sie den <shipped>true</shipped>-Tag enthält, der bei Apps, die nicht zum Standardumfang von ownCloud gehören, nicht erlaubt ist",
"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "Die Applikation konnte nicht installiert werden, da die Version in der info.xml nicht die gleiche Version wie im App-Store ist",
"Application is not enabled" : "Die Anwendung ist nicht aktiviert",
- "Authentication error" : "Fehler bei der Anmeldung",
+ "Authentication error" : "Authentifizierungsfehler",
"Token expired. Please reload page." : "Token abgelaufen. Bitte lade die Seite neu.",
"Unknown user" : "Unbekannter Benutzer",
"%s enter the database username." : "%s gib den Datenbank-Benutzernamen an.",
- "%s enter the database name." : "%s gib den Datenbank-Namen an.",
- "%s you may not use dots in the database name" : "%s Der Datenbank-Name darf keine Punkte enthalten",
- "MS SQL username and/or password not valid: %s" : "MS SQL Benutzername und/oder Password ungültig: %s",
- "You need to enter either an existing account or the administrator." : "Du musst entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
- "MySQL/MariaDB username and/or password not valid" : "MySQL/MariaDB Benutzername und/oder Passwort sind nicht gültig",
- "DB Error: \"%s\"" : "DB Fehler: \"%s\"",
- "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: \"%s\"",
+ "%s enter the database name." : "%s gib den Datenbanknamen an.",
+ "%s you may not use dots in the database name" : "%s Der Datenbankname darf keine Punkte enthalten",
+ "MS SQL username and/or password not valid: %s" : "MS SQL-Benutzername und/oder -Passwort ungültig: %s",
+ "You need to enter either an existing account or the administrator." : "Du musst entweder ein existierendes Benutzerkonto oder das Administratorenkonto angeben.",
+ "MySQL/MariaDB username and/or password not valid" : "MySQL/MariaDB-Benutzername und/oder -Passwort sind nicht gültig",
+ "DB Error: \"%s\"" : "DB-Fehler: „%s“",
+ "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"MySQL/MariaDB user '%s'@'localhost' exists already." : "MySQL/MariaDB Benutzer '%s'@'localhost' existiert bereits.",
- "Drop this user from MySQL/MariaDB" : "Lösche diesen Benutzer von MySQL/MariaDB",
- "MySQL/MariaDB user '%s'@'%%' already exists" : "MySQL/MariaDB Benutzer '%s'@'%%' existiert bereits",
- "Drop this user from MySQL/MariaDB." : "Lösche diesen Benutzer von MySQL/MariaDB.",
+ "Drop this user from MySQL/MariaDB" : "Diesen Benutzer aus MySQL/MariaDB löschen",
+ "MySQL/MariaDB user '%s'@'%%' already exists" : "MySQL/MariaDB-Benutzer '%s'@'%%' existiert bereits",
+ "Drop this user from MySQL/MariaDB." : "Diesen Benutzer aus MySQL/MariaDB löschen.",
"Oracle connection could not be established" : "Es konnte keine Verbindung zur Oracle-Datenbank hergestellt werden",
- "Oracle username and/or password not valid" : "Oracle Benutzername und/oder Passwort ungültig",
- "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
- "PostgreSQL username and/or password not valid" : "PostgreSQL Benutzername und/oder Passwort ungültig",
- "Set an admin username." : "Setze Administrator Benutzername.",
- "Set an admin password." : "Setze Administrator Passwort",
- "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder beschreiben werden",
- "%s shared »%s« with you" : "%s teilte »%s« mit Dir",
+ "Oracle username and/or password not valid" : "Oracle-Benutzername und/oder -Passwort ungültig",
+ "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
+ "PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
+ "Set an admin username." : "Einen Administrator-Benutzernamen setzen.",
+ "Set an admin password." : "Ein Administrator-Passwort setzen.",
+ "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.",
+ "%s shared »%s« with you" : "%s hat „%s“ mit Dir geteilt",
"Sharing %s failed, because the backend does not allow shares from type %i" : "Freigabe von %s fehlgeschlagen, da das Backend die Freigabe vom Typ %i nicht erlaubt.",
"Sharing %s failed, because the file does not exist" : "Freigabe von %s fehlgeschlagen, da die Datei nicht existiert",
"You are not allowed to share %s" : "Die Freigabe von %s ist Dir nicht erlaubt",
@@ -100,29 +99,31 @@
"Sharing %s failed, because resharing is not allowed" : "Freigabe von %s fehlgeschlagen, da das nochmalige Freigeben einer Freigabe nicht erlaubt ist",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Freigabe von %s fehlgeschlagen, da das Freigabe-Backend für %s nicht in dieser Quelle gefunden werden konnte",
"Sharing %s failed, because the file could not be found in the file cache" : "Freigabe von %s fehlgeschlagen, da die Datei im Datei-Cache nicht gefunden werden konnte",
- "Could not find category \"%s\"" : "Die Kategorie \"%s\" konnte nicht gefunden werden.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: \"a-z\", \"A-Z\", \"0-9\" und \"_.@-\"",
+ "Could not find category \"%s\"" : "Die Kategorie „%s“ konnte nicht gefunden werden",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: „a-z“, „A-Z“, „0-9“ und „_.@-“",
"A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden",
"A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden",
"The username is already being used" : "Dieser Benutzername existiert bereits",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MYSQL, oder PostgreSQL) installiert.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
- "Cannot write into \"config\" directory" : "Das Schreiben in das \"config\"-Verzeichnis nicht möglich",
- "Cannot write into \"apps\" directory" : "Das Schreiben in das \"apps\"-Verzeichnis nicht möglich",
- "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Anwendungsverzeichnis %s gegeben wird oder die Anwendungsauswahl in der Konfigurationsdatei deaktiviert wird.",
- "Cannot create \"data\" directory (%s)" : "Das Erstellen des \"data\"-Verzeichnisses nicht möglich (%s)",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MySQL oder PostgreSQL) installiert.",
+ "Cannot write into \"config\" directory" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich",
+ "Cannot write into \"apps\" directory" : "Das Schreiben in das „apps“-Verzeichnis ist nicht möglich",
+ "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird%s oder der App Store in der Konfigurationsdatei deaktiviert wird.",
+ "Cannot create \"data\" directory (%s)" : "Das Erstellen des „data“-Verzeichnisses ist nicht möglich (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dies kann normalerweise repariert werden, indem dem Webserver <a href=\"%s\" target=\"_blank\" Schreibzugriff auf das Wurzelverzeichnis gegeben wird</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
"Setting locale to %s failed" : "Das Setzen der Umgebungslokale auf %s fehlgeschlagen",
"Please install one of these locales on your system and restart your webserver." : "Bitte installiere eine dieser Sprachen auf Deinem System und starte den Webserver neu.",
"Please ask your server administrator to install the module." : "Bitte frage, für die Installation des Moduls, Deinen Server-Administrator.",
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
- "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte frage zur Aktualisierung von PHP auf die letzte Version Deinen Server-Administrator. Deine PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
+ "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte kontaktiere Deinen Server-Administrator und bitte um Aktualisierung von PHP auf die letzte Version. Deine PHP-Version wird von ownCloud und der PHP-Community nicht mehr unterstützt.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP ist konfiguriert, unverarbeitete POST-Daten zu füllen. Seit PHP 5.6 führt dies dazu, dass PHP Warnmeldungen für vollkommen gültigen Code ausgibt.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Setze <code>always_populate_raw_post_data</code> in Deiner php.ini auf <code>-1</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
- "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?",
- "Please ask your server administrator to restart the web server." : "Bitte frage Deinen Server-Administrator zum Neustart des Webservers.",
+ "Please ask your server administrator to restart the web server." : "Bitte kontaktiere Deinen Server-Administrator und bitte um den Neustart des Webservers.",
"PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt",
"Please upgrade your database version" : "Bitte aktualisiere Deine Datenbankversion",
"Error occurred while checking PostgreSQL version" : "Es ist ein Fehler beim Prüfen der PostgreSQL-Version aufgetreten",
@@ -130,7 +131,7 @@
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Bitte ändere die Berechtigungen auf 0770 sodass das Verzeichnis nicht von anderen Nutzer angezeigt werden kann.",
"Data directory (%s) is readable by other users" : "Daten-Verzeichnis (%s) ist von anderen Nutzern lesbar",
"Data directory (%s) is invalid" : "Daten-Verzeichnis (%s) ist ungültig",
- "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stelle sicher, dass das Daten-Verzeichnis eine Datei namens \".ocdata\" im Wurzelverzeichnis enthält.",
- "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf \"%s\" konnte nicht ermittelt werden."
+ "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stelle sicher, dass das Datenverzeichnis auf seiner ersten Ebene eine Datei namens „.ocdata“ enthält.",
+ "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf „%s“ konnte nicht ermittelt werden."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/lib/l10n/de_AT.js b/lib/l10n/de_AT.js
index 3c567ba4d2d..4dda0e03fd3 100644
--- a/lib/l10n/de_AT.js
+++ b/lib/l10n/de_AT.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Hilfe",
"Personal" : "Persönlich",
- "Settings" : "Einstellungen",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/de_AT.json b/lib/l10n/de_AT.json
index 6e81c34cf1a..90fce6927b0 100644
--- a/lib/l10n/de_AT.json
+++ b/lib/l10n/de_AT.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Hilfe",
"Personal" : "Persönlich",
- "Settings" : "Einstellungen",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/de_DE.js b/lib/l10n/de_DE.js
index c315ea09728..e98aa9d3fb3 100644
--- a/lib/l10n/de_DE.js
+++ b/lib/l10n/de_DE.js
@@ -1,12 +1,12 @@
OC.L10N.register(
"lib",
{
- "Cannot write into \"config\" directory!" : "Das Schreiben in das »config«-Verzeichnis nicht möglich!",
+ "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!",
"This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird",
"See %s" : "Siehe %s",
- "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.",
+ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das Konfigurationsverzeichnis gegeben wird%s.",
"Sample configuration detected" : "Beispielkonfiguration gefunden",
- "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde, Dies wird nicht unterstützt kann zum Abruch Ihrer Installation führen. Bitte lesen Sie die Dokumentation vor der Änderung an der config.php.",
+ "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Ihre Installation zerstören und wird nicht unterstützt. Bitte lesen Sie die Dokumentation, bevor Sie Änderungen an der config.php vornehmen.",
"PHP %s or higher is required." : "PHP %s oder höher wird benötigt.",
"PHP with a version lower than %s is required." : "PHP wird in einer früheren Version als %s benötigt.",
"Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s",
@@ -19,13 +19,12 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud wird in einer früheren Version als %s benötigt.",
"Help" : "Hilfe",
"Personal" : "Persönlich",
- "Settings" : "Einstellungen",
"Users" : "Benutzer",
"Admin" : "Administrator",
"Recommended" : "Empfohlen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App »%s« kann nicht installiert werden, da sie mit dieser ownCloud-Version nicht kompatibel ist.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App \\\"%s\\\" kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind: %s",
- "No app name specified" : "Es wurde kein Applikation-Name angegeben",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Die App „%s“ kann nicht installiert werden, da sie mit dieser ownCloud-Version nicht kompatibel ist.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App „%s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %s",
+ "No app name specified" : "Es wurde kein App-Name angegeben",
"Unknown filetype" : "Unbekannter Dateityp",
"Invalid image" : "Ungültiges Bild",
"today" : "Heute",
@@ -40,9 +39,9 @@ OC.L10N.register(
"seconds ago" : "Gerade eben",
"Database Error" : "Datenbankfehler",
"Please contact your system administrator." : "Bitte kontaktieren Sie Ihren Systemadministrator.",
- "web services under your control" : "Web-Services unter Ihrer Kontrolle",
- "App directory already exists" : "Der Ordner für die Anwendung ist bereits vorhanden.",
- "Can't create app folder. Please fix permissions. %s" : "Der Ordner für die Anwendung konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
+ "web services under your control" : "Web-Dienste unter Ihrer Kontrolle",
+ "App directory already exists" : "Der Ordner für die App ist bereits vorhanden.",
+ "Can't create app folder. Please fix permissions. %s" : "Der Ordner für die App konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
"No href specified when installing app from http" : "Der Link (href) wurde nicht angegeben um die Applikation per http zu installieren",
"No path specified when installing app from local file" : "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
@@ -51,10 +50,10 @@ OC.L10N.register(
"App does not provide an info.xml file" : "Die Applikation enthält keine info.xml Datei",
"App can't be installed because of not allowed code in the App" : "Die Applikation kann auf Grund von unerlaubten Code nicht installiert werden",
"App can't be installed because it is not compatible with this version of ownCloud" : "Die Anwendung konnte nicht installiert werden, weil Sie nicht mit dieser Version von ownCloud kompatibel ist.",
- "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die Applikation konnte nicht installiert werden, da diese das <shipped>true</shipped> Tag beinhaltet und dieses, bei nicht mitausgelieferten Applikationen, nicht erlaubt ist ist",
+ "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die App kann nicht installiert werden, weil sie den <shipped>true</shipped>-Tag enthält, der bei Apps, die nicht zum Standardumfang von ownCloud gehören, nicht erlaubt ist",
"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "Die Applikation konnte nicht installiert werden, da die Version in der info.xml nicht die gleiche Version wie im App-Store ist",
"Application is not enabled" : "Die Anwendung ist nicht aktiviert",
- "Authentication error" : "Authentifizierungs-Fehler",
+ "Authentication error" : "Authentifizierungsfehler",
"Token expired. Please reload page." : "Token abgelaufen. Bitte laden Sie die Seite neu.",
"Unknown user" : "Unbekannter Benutzer",
"%s enter the database username." : "%s geben Sie den Datenbank-Benutzernamen an.",
@@ -63,20 +62,20 @@ OC.L10N.register(
"MS SQL username and/or password not valid: %s" : "MS SQL-Benutzername und/oder -Passwort ungültig: %s",
"You need to enter either an existing account or the administrator." : "Sie müssen entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
"MySQL/MariaDB username and/or password not valid" : "MySQL/MariaDB-Benutzername und/oder -Passwort sind nicht gültig",
- "DB Error: \"%s\"" : "DB Fehler: \"%s\"",
- "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: \"%s\"",
+ "DB Error: \"%s\"" : "DB-Fehler: „%s“",
+ "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"MySQL/MariaDB user '%s'@'localhost' exists already." : "MySQL/MariaDB Benutzer '%s'@'localhost' existiert bereits.",
"Drop this user from MySQL/MariaDB" : "Löschen Sie diesen Benutzer von MySQL/MariaDB",
"MySQL/MariaDB user '%s'@'%%' already exists" : "MySQL/MariaDB-Benutzer '%s'@'%%' existiert bereits",
"Drop this user from MySQL/MariaDB." : "Löschen Sie diesen Benutzer von MySQL/MariaDB.",
"Oracle connection could not be established" : "Die Oracle-Verbindung konnte nicht aufgebaut werden.",
"Oracle username and/or password not valid" : "Oracle-Benutzername und/oder -Passwort ungültig",
- "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
+ "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
"PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
"Set an admin username." : "Einen Administrator-Benutzernamen setzen.",
"Set an admin password." : "Setze Administrator Passwort",
- "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder beschreiben werden",
- "%s shared »%s« with you" : "%s hat »%s« mit Ihnen geteilt",
+ "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.",
+ "%s shared »%s« with you" : "%s hat „%s“ mit Ihnen geteilt",
"Sharing %s failed, because the backend does not allow shares from type %i" : "Freigabe von %s fehlgeschlagen, da das Backend die Freigabe vom Typ %i nicht erlaubt.",
"Sharing %s failed, because the file does not exist" : "Freigabe von %s fehlgeschlagen, da die Datei nicht existiert",
"You are not allowed to share %s" : "Die Freigabe von %s ist Ihnen nicht erlaubt",
@@ -102,29 +101,31 @@ OC.L10N.register(
"Sharing %s failed, because resharing is not allowed" : "Freigabe von %s fehlgeschlagen, da das nochmalige Freigeben einer Freigabe nicht erlaubt ist",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Freigabe von %s fehlgeschlagen, da das Freigabe-Backend für %s nicht in dieser Quelle gefunden werden konnte",
"Sharing %s failed, because the file could not be found in the file cache" : "Freigabe von %s fehlgeschlagen, da die Datei im Datei-Cache nicht gefunden werden konnte",
- "Could not find category \"%s\"" : "Die Kategorie \"%s\" konnte nicht gefunden werden.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: »a-z«, »A-Z«, »0-9« und »_.@-«",
+ "Could not find category \"%s\"" : "Die Kategorie „%s“ konnte nicht gefunden werden",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: „a-z“, „A-Z“, „0-9“ und „_.@-“",
"A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden",
"A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden",
"The username is already being used" : "Der Benutzername existiert bereits",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MYSQL, oder PostgreSQL) installiert.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
- "Cannot write into \"config\" directory" : "Das Schreiben in das »config«-Verzeichnis ist nicht möglich",
- "Cannot write into \"apps\" directory" : "Das Schreiben in das »apps«-Verzeichnis ist nicht möglich",
- "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Anwendungsverzeichnis %s gegeben wird oder die Anwendungsauswahl in der Konfigurationsdatei deaktiviert wird.",
- "Cannot create \"data\" directory (%s)" : "Das Erstellen des »data«-Verzeichnisses ist nicht möglich (%s)",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MYSQL oder PostgreSQL) installiert.",
+ "Cannot write into \"config\" directory" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich",
+ "Cannot write into \"apps\" directory" : "Das Schreiben in das „apps“-Verzeichnis ist nicht möglich",
+ "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird%s oder der App Store in der Konfigurationsdatei deaktiviert wird.",
+ "Cannot create \"data\" directory (%s)" : "Das Erstellen des „data“-Verzeichnisses ist nicht möglich (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dies kann normalerweise repariert werden, indem dem Webserver <a href=\"%s\" target=\"_blank\" Schreibzugriff auf das Wurzelverzeichnis gegeben wird</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
"Setting locale to %s failed" : "Das Setzen der Umgebungslokale auf %s fehlgeschlagen",
"Please install one of these locales on your system and restart your webserver." : "Bitte installieren Sie eine dieser Sprachen auf Ihrem System und starten Sie den Webserver neu.",
- "Please ask your server administrator to install the module." : "Bitte fragen Sie, für die Installation des Moduls, Ihren Server-Administrator.",
+ "Please ask your server administrator to install the module." : "Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um die Installation des Moduls.",
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
- "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte fragen Sie zur Aktualisierung von PHP auf die letzte Version Ihren Server-Administrator. Ihre PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
+ "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um Aktualisierung von PHP auf die letzte Version. Ihre PHP-Version wird von ownCloud und der PHP-Community nicht mehr unterstützt.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP ist konfiguriert, unverarbeitete POST-Daten zu füllen. Seit PHP 5.6 führt dies dazu, dass PHP Warnmeldungen für vollkommen gültigen Code ausgibt.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Setzen Sie in Ihrer php.ini <code>always_populate_raw_post_data</code> auf <code>-1</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
- "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?",
- "Please ask your server administrator to restart the web server." : "Bitte fragen Sie Ihren Server-Administrator zum Neustart des Webservers.",
+ "Please ask your server administrator to restart the web server." : "Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um den Neustart des Webservers.",
"PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt",
"Please upgrade your database version" : "Bitte aktualisieren Sie Ihre Datenbankversion",
"Error occurred while checking PostgreSQL version" : "Es ist ein Fehler beim Prüfen der PostgreSQL-Version aufgetreten",
@@ -132,7 +133,7 @@ OC.L10N.register(
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Bitte ändern Sie die Berechtigungen auf 0770, so dass das Verzeichnis nicht von anderen Benutzern angezeigt werden kann.",
"Data directory (%s) is readable by other users" : "Daten-Verzeichnis (%s) ist von anderen Benutzern lesbar",
"Data directory (%s) is invalid" : "Daten-Verzeichnis (%s) ist ungültig",
- "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stellen Sie sicher, dass das Daten-Verzeichnis eine Datei namens \".ocdata\" im Wurzelverzeichnis enthält.",
- "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf »%s« konnte nicht ermittelt werden."
+ "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stellen Sie sicher, dass das Datenverzeichnis auf seiner ersten Ebene eine Datei namens „.ocdata“ enthält.",
+ "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf „%s“ konnte nicht ermittelt werden."
},
"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/de_DE.json b/lib/l10n/de_DE.json
index 55f9522274e..973f3bf7761 100644
--- a/lib/l10n/de_DE.json
+++ b/lib/l10n/de_DE.json
@@ -1,10 +1,10 @@
{ "translations": {
- "Cannot write into \"config\" directory!" : "Das Schreiben in das »config«-Verzeichnis nicht möglich!",
+ "Cannot write into \"config\" directory!" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich!",
"This can usually be fixed by giving the webserver write access to the config directory" : "Dies kann normalerweise repariert werden, indem dem Webserver Schreibzugriff auf das config-Verzeichnis gegeben wird",
"See %s" : "Siehe %s",
- "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das config-Verzeichnis %s gegeben wird.",
+ "This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das Konfigurationsverzeichnis gegeben wird%s.",
"Sample configuration detected" : "Beispielkonfiguration gefunden",
- "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde, Dies wird nicht unterstützt kann zum Abruch Ihrer Installation führen. Bitte lesen Sie die Dokumentation vor der Änderung an der config.php.",
+ "It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Es wurde festgestellt, dass die Beispielkonfiguration kopiert wurde. Dies kann Ihre Installation zerstören und wird nicht unterstützt. Bitte lesen Sie die Dokumentation, bevor Sie Änderungen an der config.php vornehmen.",
"PHP %s or higher is required." : "PHP %s oder höher wird benötigt.",
"PHP with a version lower than %s is required." : "PHP wird in einer früheren Version als %s benötigt.",
"Following databases are supported: %s" : "Die folgenden Datenbanken werden unterstützt: %s",
@@ -17,13 +17,12 @@
"ownCloud with a version lower than %s is required." : "ownCloud wird in einer früheren Version als %s benötigt.",
"Help" : "Hilfe",
"Personal" : "Persönlich",
- "Settings" : "Einstellungen",
"Users" : "Benutzer",
"Admin" : "Administrator",
"Recommended" : "Empfohlen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App »%s« kann nicht installiert werden, da sie mit dieser ownCloud-Version nicht kompatibel ist.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App \\\"%s\\\" kann nicht installiert werden, weil die folgenden Abhängigkeiten nicht erfüllt sind: %s",
- "No app name specified" : "Es wurde kein Applikation-Name angegeben",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Die App „%s“ kann nicht installiert werden, da sie mit dieser ownCloud-Version nicht kompatibel ist.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Die App „%s“ kann nicht installiert werden, da die folgenden Abhängigkeiten nicht erfüllt sind: %s",
+ "No app name specified" : "Es wurde kein App-Name angegeben",
"Unknown filetype" : "Unbekannter Dateityp",
"Invalid image" : "Ungültiges Bild",
"today" : "Heute",
@@ -38,9 +37,9 @@
"seconds ago" : "Gerade eben",
"Database Error" : "Datenbankfehler",
"Please contact your system administrator." : "Bitte kontaktieren Sie Ihren Systemadministrator.",
- "web services under your control" : "Web-Services unter Ihrer Kontrolle",
- "App directory already exists" : "Der Ordner für die Anwendung ist bereits vorhanden.",
- "Can't create app folder. Please fix permissions. %s" : "Der Ordner für die Anwendung konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
+ "web services under your control" : "Web-Dienste unter Ihrer Kontrolle",
+ "App directory already exists" : "Der Ordner für die App ist bereits vorhanden.",
+ "Can't create app folder. Please fix permissions. %s" : "Der Ordner für die App konnte nicht angelegt werden. Bitte überprüfen Sie die Ordner- und Dateirechte und passen Sie diese entsprechend an. %s",
"No source specified when installing app" : "Für die Installation der Applikation wurde keine Quelle angegeben",
"No href specified when installing app from http" : "Der Link (href) wurde nicht angegeben um die Applikation per http zu installieren",
"No path specified when installing app from local file" : "Bei der Installation der Applikation aus einer lokalen Datei wurde kein Pfad angegeben",
@@ -49,10 +48,10 @@
"App does not provide an info.xml file" : "Die Applikation enthält keine info.xml Datei",
"App can't be installed because of not allowed code in the App" : "Die Applikation kann auf Grund von unerlaubten Code nicht installiert werden",
"App can't be installed because it is not compatible with this version of ownCloud" : "Die Anwendung konnte nicht installiert werden, weil Sie nicht mit dieser Version von ownCloud kompatibel ist.",
- "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die Applikation konnte nicht installiert werden, da diese das <shipped>true</shipped> Tag beinhaltet und dieses, bei nicht mitausgelieferten Applikationen, nicht erlaubt ist ist",
+ "App can't be installed because it contains the <shipped>true</shipped> tag which is not allowed for non shipped apps" : "Die App kann nicht installiert werden, weil sie den <shipped>true</shipped>-Tag enthält, der bei Apps, die nicht zum Standardumfang von ownCloud gehören, nicht erlaubt ist",
"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "Die Applikation konnte nicht installiert werden, da die Version in der info.xml nicht die gleiche Version wie im App-Store ist",
"Application is not enabled" : "Die Anwendung ist nicht aktiviert",
- "Authentication error" : "Authentifizierungs-Fehler",
+ "Authentication error" : "Authentifizierungsfehler",
"Token expired. Please reload page." : "Token abgelaufen. Bitte laden Sie die Seite neu.",
"Unknown user" : "Unbekannter Benutzer",
"%s enter the database username." : "%s geben Sie den Datenbank-Benutzernamen an.",
@@ -61,20 +60,20 @@
"MS SQL username and/or password not valid: %s" : "MS SQL-Benutzername und/oder -Passwort ungültig: %s",
"You need to enter either an existing account or the administrator." : "Sie müssen entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
"MySQL/MariaDB username and/or password not valid" : "MySQL/MariaDB-Benutzername und/oder -Passwort sind nicht gültig",
- "DB Error: \"%s\"" : "DB Fehler: \"%s\"",
- "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: \"%s\"",
+ "DB Error: \"%s\"" : "DB-Fehler: „%s“",
+ "Offending command was: \"%s\"" : "Fehlerhafter Befehl war: „%s“",
"MySQL/MariaDB user '%s'@'localhost' exists already." : "MySQL/MariaDB Benutzer '%s'@'localhost' existiert bereits.",
"Drop this user from MySQL/MariaDB" : "Löschen Sie diesen Benutzer von MySQL/MariaDB",
"MySQL/MariaDB user '%s'@'%%' already exists" : "MySQL/MariaDB-Benutzer '%s'@'%%' existiert bereits",
"Drop this user from MySQL/MariaDB." : "Löschen Sie diesen Benutzer von MySQL/MariaDB.",
"Oracle connection could not be established" : "Die Oracle-Verbindung konnte nicht aufgebaut werden.",
"Oracle username and/or password not valid" : "Oracle-Benutzername und/oder -Passwort ungültig",
- "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
+ "Offending command was: \"%s\", name: %s, password: %s" : "Fehlerhafter Befehl war: „%s“, Name: %s, Passwort: %s",
"PostgreSQL username and/or password not valid" : "PostgreSQL-Benutzername und/oder -Passwort ungültig",
"Set an admin username." : "Einen Administrator-Benutzernamen setzen.",
"Set an admin password." : "Setze Administrator Passwort",
- "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder beschreiben werden",
- "%s shared »%s« with you" : "%s hat »%s« mit Ihnen geteilt",
+ "Can't create or write into the data directory %s" : "Das Datenverzeichnis %s kann nicht erstellt oder es kann darin nicht geschrieben werden.",
+ "%s shared »%s« with you" : "%s hat „%s“ mit Ihnen geteilt",
"Sharing %s failed, because the backend does not allow shares from type %i" : "Freigabe von %s fehlgeschlagen, da das Backend die Freigabe vom Typ %i nicht erlaubt.",
"Sharing %s failed, because the file does not exist" : "Freigabe von %s fehlgeschlagen, da die Datei nicht existiert",
"You are not allowed to share %s" : "Die Freigabe von %s ist Ihnen nicht erlaubt",
@@ -100,29 +99,31 @@
"Sharing %s failed, because resharing is not allowed" : "Freigabe von %s fehlgeschlagen, da das nochmalige Freigeben einer Freigabe nicht erlaubt ist",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Freigabe von %s fehlgeschlagen, da das Freigabe-Backend für %s nicht in dieser Quelle gefunden werden konnte",
"Sharing %s failed, because the file could not be found in the file cache" : "Freigabe von %s fehlgeschlagen, da die Datei im Datei-Cache nicht gefunden werden konnte",
- "Could not find category \"%s\"" : "Die Kategorie \"%s\" konnte nicht gefunden werden.",
- "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: »a-z«, »A-Z«, »0-9« und »_.@-«",
+ "Could not find category \"%s\"" : "Die Kategorie „%s“ konnte nicht gefunden werden",
+ "Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Folgende Zeichen sind im Benutzernamen erlaubt: „a-z“, „A-Z“, „0-9“ und „_.@-“",
"A valid username must be provided" : "Es muss ein gültiger Benutzername angegeben werden",
"A valid password must be provided" : "Es muss ein gültiges Passwort angegeben werden",
"The username is already being used" : "Der Benutzername existiert bereits",
- "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MYSQL, oder PostgreSQL) installiert.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
- "Cannot write into \"config\" directory" : "Das Schreiben in das »config«-Verzeichnis ist nicht möglich",
- "Cannot write into \"apps\" directory" : "Das Schreiben in das »apps«-Verzeichnis ist nicht möglich",
- "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Anwendungsverzeichnis %s gegeben wird oder die Anwendungsauswahl in der Konfigurationsdatei deaktiviert wird.",
- "Cannot create \"data\" directory (%s)" : "Das Erstellen des »data«-Verzeichnisses ist nicht möglich (%s)",
+ "No database drivers (sqlite, mysql, or postgresql) installed." : "Keine Datenbanktreiber (SQLite, MYSQL oder PostgreSQL) installiert.",
+ "Cannot write into \"config\" directory" : "Das Schreiben in das „config“-Verzeichnis ist nicht möglich",
+ "Cannot write into \"apps\" directory" : "Das Schreiben in das „apps“-Verzeichnis ist nicht möglich",
+ "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dies kann normalerweise behoben werden, %sindem dem Webserver Schreibzugriff auf das App-Verzeichnis gegeben wird%s oder der App Store in der Konfigurationsdatei deaktiviert wird.",
+ "Cannot create \"data\" directory (%s)" : "Das Erstellen des „data“-Verzeichnisses ist nicht möglich (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dies kann normalerweise repariert werden, indem dem Webserver <a href=\"%s\" target=\"_blank\" Schreibzugriff auf das Wurzelverzeichnis gegeben wird</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Berechtigungen können normalerweise repariert werden, indem dem Webserver %s Schreibzugriff auf das Wurzelverzeichnis %s gegeben wird.",
"Setting locale to %s failed" : "Das Setzen der Umgebungslokale auf %s fehlgeschlagen",
"Please install one of these locales on your system and restart your webserver." : "Bitte installieren Sie eine dieser Sprachen auf Ihrem System und starten Sie den Webserver neu.",
- "Please ask your server administrator to install the module." : "Bitte fragen Sie, für die Installation des Moduls, Ihren Server-Administrator.",
+ "Please ask your server administrator to install the module." : "Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um die Installation des Moduls.",
"PHP module %s not installed." : "PHP-Modul %s nicht installiert.",
- "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte fragen Sie zur Aktualisierung von PHP auf die letzte Version Ihren Server-Administrator. Ihre PHP-Version wird nicht länger durch ownCloud und der PHP-Gemeinschaft unterstützt.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-Einstellung „%s“ ist nicht auf „%s“ gesetzt.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Durch das Anpassen dieser Einstellung in der php.ini wird ownCloud wieder laufen",
+ "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um Aktualisierung von PHP auf die letzte Version. Ihre PHP-Version wird von ownCloud und der PHP-Community nicht mehr unterstützt.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP ist konfiguriert, unverarbeitete POST-Daten zu füllen. Seit PHP 5.6 führt dies dazu, dass PHP Warnmeldungen für vollkommen gültigen Code ausgibt.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Setzen Sie in Ihrer php.ini <code>always_populate_raw_post_data</code> auf <code>-1</code>, um dieses Problem zu beheben.",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP ist offenbar so konfiguriert, dass PHPDoc-Blöcke in der Anweisung entfernt werden. Dadurch sind mehrere Kern-Apps nicht erreichbar.",
- "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie z.B. OPcache oder eAccelerator verursacht.",
+ "This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dies wird wahrscheinlich durch Zwischenspeicher/Beschleuniger wie etwa Zend OPcache oder eAccelerator verursacht.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-Module wurden installiert, werden aber als noch fehlend gelistet?",
- "Please ask your server administrator to restart the web server." : "Bitte fragen Sie Ihren Server-Administrator zum Neustart des Webservers.",
+ "Please ask your server administrator to restart the web server." : "Bitte kontaktieren Sie Ihren Server-Administrator und bitten Sie um den Neustart des Webservers.",
"PostgreSQL >= 9 required" : "PostgreSQL >= 9 benötigt",
"Please upgrade your database version" : "Bitte aktualisieren Sie Ihre Datenbankversion",
"Error occurred while checking PostgreSQL version" : "Es ist ein Fehler beim Prüfen der PostgreSQL-Version aufgetreten",
@@ -130,7 +131,7 @@
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Bitte ändern Sie die Berechtigungen auf 0770, so dass das Verzeichnis nicht von anderen Benutzern angezeigt werden kann.",
"Data directory (%s) is readable by other users" : "Daten-Verzeichnis (%s) ist von anderen Benutzern lesbar",
"Data directory (%s) is invalid" : "Daten-Verzeichnis (%s) ist ungültig",
- "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stellen Sie sicher, dass das Daten-Verzeichnis eine Datei namens \".ocdata\" im Wurzelverzeichnis enthält.",
- "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf »%s« konnte nicht ermittelt werden."
+ "Please check that the data directory contains a file \".ocdata\" in its root." : "Bitte stellen Sie sicher, dass das Datenverzeichnis auf seiner ersten Ebene eine Datei namens „.ocdata“ enthält.",
+ "Could not obtain lock type %d on \"%s\"." : "Sperrtyp %d auf „%s“ konnte nicht ermittelt werden."
},"pluralForm" :"nplurals=2; plural=(n != 1);"
} \ No newline at end of file
diff --git a/lib/l10n/el.js b/lib/l10n/el.js
index db45139a1cb..b2a9542da90 100644
--- a/lib/l10n/el.js
+++ b/lib/l10n/el.js
@@ -8,13 +8,13 @@ OC.L10N.register(
"Sample configuration detected" : "Ανιχνεύθηκε δείγμα εγκατάστασης",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Έχει ανιχνευθεί ότι το δείγμα εγκατάστασης έχει αντιγραφεί. Αυτό μπορεί να σπάσει την εγκατάστασή σας και δεν υποστηρίζεται. Παρακαλώ διαβάστε την τεκμηρίωση πριν εκτελέσετε αλλαγές στο config.php",
"PHP %s or higher is required." : "PHP %s ή νεώτερη απαιτείται.",
+ "The library %s is not available." : "Το %s της βιβλιοθήκης δεν είναι διαθέσιμο.",
+ "Following platforms are supported: %s" : "Οι ακόλουθες πλατφόρμες υποστηρίζονται: %s",
"Help" : "Βοήθεια",
"Personal" : "Προσωπικά",
- "Settings" : "Ρυθμίσεις",
"Users" : "Χρήστες",
"Admin" : "Διαχείριση",
"Recommended" : "Προτείνεται",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Η εφαρμογή \"%s\" δεν μπορεί να εγκατασταθεί επειδή δεν είναι συμβατή με αυτή την έκδοση του ownCloud.",
"No app name specified" : "Δεν προδιορίστηκε όνομα εφαρμογής",
"Unknown filetype" : "Άγνωστος τύπος αρχείου",
"Invalid image" : "Μη έγκυρη εικόνα",
@@ -96,12 +96,12 @@ OC.L10N.register(
"A valid password must be provided" : "Πρέπει να δοθεί έγκυρο συνθηματικό",
"The username is already being used" : "Το όνομα χρήστη είναι κατειλημμένο",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Δεν βρέθηκαν εγκατεστημένοι οδηγοί βάσεων δεδομένων (sqlite, mysql, or postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Τα δικαιώματα πρόσβασης μπορούν συνήθως να διορθωθούν %sδίνοντας δικαιώματα εγγραφής για τον βασικό κατάλογο στο διακομιστή δικτύου%s.",
"Cannot write into \"config\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"config\"",
"Cannot write into \"apps\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Αυτό μπορεί συνήθως να διορθωθεί %sδίνοντας διακαιώματα εγγραφής για τον κατάλογο εφαρμογών στο διακομιστή δικτύου%s ή απενεργοποιώντας το κέντρο εφαρμογών στο αρχείο config.",
"Cannot create \"data\" directory (%s)" : "Αδυναμία δημιουργίας του καταλόγου \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Αυτό μπορεί συνήθως να διορθωθεί <a href=\"%s\" target=\"_blank\">δίνοντας δικαιώματα εγγραφής για το βασικό κατάλογο στο διακομιστή δικτύου</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Τα δικαιώματα πρόσβασης μπορούν συνήθως να διορθωθούν %sδίνοντας δικαιώματα εγγραφής για τον βασικό κατάλογο στο διακομιστή δικτύου%s.",
"Setting locale to %s failed" : "Ρύθμιση τοπικών ρυθμίσεων σε %s απέτυχε",
"Please install one of these locales on your system and restart your webserver." : "Παρακαλώ να εγκαταστήσετε μία από αυτές τις τοπικές ρυθμίσεις στο σύστημά σας και να επανεκκινήσετε τον διακομιστή δικτύου σας.",
"Please ask your server administrator to install the module." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να εγκαταστήσει τη μονάδα.",
diff --git a/lib/l10n/el.json b/lib/l10n/el.json
index da637c4a12b..7d33f8a1980 100644
--- a/lib/l10n/el.json
+++ b/lib/l10n/el.json
@@ -6,13 +6,13 @@
"Sample configuration detected" : "Ανιχνεύθηκε δείγμα εγκατάστασης",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Έχει ανιχνευθεί ότι το δείγμα εγκατάστασης έχει αντιγραφεί. Αυτό μπορεί να σπάσει την εγκατάστασή σας και δεν υποστηρίζεται. Παρακαλώ διαβάστε την τεκμηρίωση πριν εκτελέσετε αλλαγές στο config.php",
"PHP %s or higher is required." : "PHP %s ή νεώτερη απαιτείται.",
+ "The library %s is not available." : "Το %s της βιβλιοθήκης δεν είναι διαθέσιμο.",
+ "Following platforms are supported: %s" : "Οι ακόλουθες πλατφόρμες υποστηρίζονται: %s",
"Help" : "Βοήθεια",
"Personal" : "Προσωπικά",
- "Settings" : "Ρυθμίσεις",
"Users" : "Χρήστες",
"Admin" : "Διαχείριση",
"Recommended" : "Προτείνεται",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Η εφαρμογή \"%s\" δεν μπορεί να εγκατασταθεί επειδή δεν είναι συμβατή με αυτή την έκδοση του ownCloud.",
"No app name specified" : "Δεν προδιορίστηκε όνομα εφαρμογής",
"Unknown filetype" : "Άγνωστος τύπος αρχείου",
"Invalid image" : "Μη έγκυρη εικόνα",
@@ -94,12 +94,12 @@
"A valid password must be provided" : "Πρέπει να δοθεί έγκυρο συνθηματικό",
"The username is already being used" : "Το όνομα χρήστη είναι κατειλημμένο",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Δεν βρέθηκαν εγκατεστημένοι οδηγοί βάσεων δεδομένων (sqlite, mysql, or postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Τα δικαιώματα πρόσβασης μπορούν συνήθως να διορθωθούν %sδίνοντας δικαιώματα εγγραφής για τον βασικό κατάλογο στο διακομιστή δικτύου%s.",
"Cannot write into \"config\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"config\"",
"Cannot write into \"apps\" directory" : "Αδυναμία εγγραφής στον κατάλογο \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Αυτό μπορεί συνήθως να διορθωθεί %sδίνοντας διακαιώματα εγγραφής για τον κατάλογο εφαρμογών στο διακομιστή δικτύου%s ή απενεργοποιώντας το κέντρο εφαρμογών στο αρχείο config.",
"Cannot create \"data\" directory (%s)" : "Αδυναμία δημιουργίας του καταλόγου \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Αυτό μπορεί συνήθως να διορθωθεί <a href=\"%s\" target=\"_blank\">δίνοντας δικαιώματα εγγραφής για το βασικό κατάλογο στο διακομιστή δικτύου</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Τα δικαιώματα πρόσβασης μπορούν συνήθως να διορθωθούν %sδίνοντας δικαιώματα εγγραφής για τον βασικό κατάλογο στο διακομιστή δικτύου%s.",
"Setting locale to %s failed" : "Ρύθμιση τοπικών ρυθμίσεων σε %s απέτυχε",
"Please install one of these locales on your system and restart your webserver." : "Παρακαλώ να εγκαταστήσετε μία από αυτές τις τοπικές ρυθμίσεις στο σύστημά σας και να επανεκκινήσετε τον διακομιστή δικτύου σας.",
"Please ask your server administrator to install the module." : "Παρακαλώ ζητήστε από το διαχειριστή του διακομιστή σας να εγκαταστήσει τη μονάδα.",
diff --git a/lib/l10n/en_GB.js b/lib/l10n/en_GB.js
index e3c2a7ab67d..9dfedaa889d 100644
--- a/lib/l10n/en_GB.js
+++ b/lib/l10n/en_GB.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud with a version lower than %s is required.",
"Help" : "Help",
"Personal" : "Personal",
- "Settings" : "Settings",
"Users" : "Users",
"Admin" : "Admin",
"Recommended" : "Recommended",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s",
"No app name specified" : "No app name specified",
"Unknown filetype" : "Unknown filetype",
"Invalid image" : "Invalid image",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "A valid password must be provided",
"The username is already being used" : "The username is already being used",
"No database drivers (sqlite, mysql, or postgresql) installed." : "No database drivers (sqlite, mysql, or postgresql) installed.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s.",
"Cannot write into \"config\" directory" : "Cannot write into \"config\" directory",
"Cannot write into \"apps\" directory" : "Cannot write into \"apps\" directory",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file.",
"Cannot create \"data\" directory (%s)" : "Cannot create \"data\" directory (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s.",
"Setting locale to %s failed" : "Setting locale to %s failed",
"Please install one of these locales on your system and restart your webserver." : "Please install one of these locales on your system and restart your webserver.",
"Please ask your server administrator to install the module." : "Please ask your server administrator to install the module.",
"PHP module %s not installed." : "PHP module %s not installed.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP setting \"%s\" is not set to \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Adjusting this setting in php.ini will make ownCloud run again",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini",
diff --git a/lib/l10n/en_GB.json b/lib/l10n/en_GB.json
index 013afd3a0d1..739d5dd1702 100644
--- a/lib/l10n/en_GB.json
+++ b/lib/l10n/en_GB.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "ownCloud with a version lower than %s is required.",
"Help" : "Help",
"Personal" : "Personal",
- "Settings" : "Settings",
"Users" : "Users",
"Admin" : "Admin",
"Recommended" : "Recommended",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s",
"No app name specified" : "No app name specified",
"Unknown filetype" : "Unknown filetype",
"Invalid image" : "Invalid image",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "A valid password must be provided",
"The username is already being used" : "The username is already being used",
"No database drivers (sqlite, mysql, or postgresql) installed." : "No database drivers (sqlite, mysql, or postgresql) installed.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s.",
"Cannot write into \"config\" directory" : "Cannot write into \"config\" directory",
"Cannot write into \"apps\" directory" : "Cannot write into \"apps\" directory",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file.",
"Cannot create \"data\" directory (%s)" : "Cannot create \"data\" directory (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s.",
"Setting locale to %s failed" : "Setting locale to %s failed",
"Please install one of these locales on your system and restart your webserver." : "Please install one of these locales on your system and restart your webserver.",
"Please ask your server administrator to install the module." : "Please ask your server administrator to install the module.",
"PHP module %s not installed." : "PHP module %s not installed.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP setting \"%s\" is not set to \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Adjusting this setting in php.ini will make ownCloud run again",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini",
diff --git a/lib/l10n/eo.js b/lib/l10n/eo.js
index fdf8d5b5ab0..5c29ba0ede3 100644
--- a/lib/l10n/eo.js
+++ b/lib/l10n/eo.js
@@ -5,10 +5,8 @@ OC.L10N.register(
"PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.",
"Help" : "Helpo",
"Personal" : "Persona",
- "Settings" : "Agordo",
"Users" : "Uzantoj",
"Admin" : "Administranto",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "La aplikaĵo “%s” ne povas instaliĝi ĉar ĝi ne kongruas kun ĉi tiu eldono de ownCloud.",
"Unknown filetype" : "Ne konatas dosiertipo",
"Invalid image" : "Ne validas bildo",
"today" : "hodiaŭ",
diff --git a/lib/l10n/eo.json b/lib/l10n/eo.json
index bd433423828..618e4852868 100644
--- a/lib/l10n/eo.json
+++ b/lib/l10n/eo.json
@@ -3,10 +3,8 @@
"PHP %s or higher is required." : "PHP %s aŭ pli alta necesas.",
"Help" : "Helpo",
"Personal" : "Persona",
- "Settings" : "Agordo",
"Users" : "Uzantoj",
"Admin" : "Administranto",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "La aplikaĵo “%s” ne povas instaliĝi ĉar ĝi ne kongruas kun ĉi tiu eldono de ownCloud.",
"Unknown filetype" : "Ne konatas dosiertipo",
"Invalid image" : "Ne validas bildo",
"today" : "hodiaŭ",
diff --git a/lib/l10n/es.js b/lib/l10n/es.js
index 39631f01c05..33a5cbc468c 100644
--- a/lib/l10n/es.js
+++ b/lib/l10n/es.js
@@ -1,7 +1,7 @@
OC.L10N.register(
"lib",
{
- "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio de configuración!",
+ "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!",
"This can usually be fixed by giving the webserver write access to the config directory" : "Esto puede solucionarse fácilmente dándole al servidor permisos de escritura del directorio de configuración",
"See %s" : "Mirar %s",
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Esto puede solucionarse fácilmente %sotorgándole permisos de escritura al directorio de configuración%s.",
@@ -11,43 +11,40 @@ OC.L10N.register(
"PHP with a version lower than %s is required." : "PHP con una versión inferior que %s la requerida.",
"Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s",
"The command line tool %s could not be found" : "No se encontró la herramienta %s de línea de comandos",
- "The library %s is not available." : "La librería %s no está disponible",
+ "The library %s is not available." : "La biblioteca %s no está disponible",
"Library %s with a version higher than %s is required - available version %s." : "Biblioteca %s con una versión superior que %s la requerida - versión disponible %s.",
"Library %s with a version lower than %s is required - available version %s." : "Biblioteca %s con una versión inferior que %s la requerida - versión disponible %s.",
- "Following platforms are supported: %s" : "Las siguientes plataformas son soportadas: %s",
+ "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s",
"ownCloud %s or higher is required." : "Se requiere ownCloud %s o superior.",
"ownCloud with a version lower than %s is required." : "ownCloud con una versión inferior que %s la requerida.",
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Ajustes",
"Users" : "Usuarios",
"Admin" : "Administración",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "La aplicación \\\"%s\\\" no se puede instalar porque no es compatible con esta versión de ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "La aplicación \\\"%s\\\" no puede instalarse porque las siguientes dependencias no están cumplimentadas: %s",
"No app name specified" : "No se ha especificado nombre de la aplicación",
"Unknown filetype" : "Tipo de archivo desconocido",
"Invalid image" : "Imagen inválida",
"today" : "hoy",
"yesterday" : "ayer",
- "_%n day ago_::_%n days ago_" : ["Hace %n día","Hace %n días"],
+ "_%n day ago_::_%n days ago_" : ["Hace %n día","hace %n días"],
"last month" : "mes pasado",
"_%n month ago_::_%n months ago_" : ["Hace %n mes","Hace %n meses"],
"last year" : "año pasado",
- "_%n year ago_::_%n years ago_" : ["Hace %n año","Hace %n años"],
+ "_%n year ago_::_%n years ago_" : ["Hace %n año","hace %n años"],
"_%n hour ago_::_%n hours ago_" : ["Hace %n hora","Hace %n horas"],
"_%n minute ago_::_%n minutes ago_" : ["Hace %n minuto","Hace %n minutos"],
"seconds ago" : "hace segundos",
"Database Error" : "Error en la base de datos",
- "Please contact your system administrator." : "Por favor contacte al administrador del sistema.",
+ "Please contact your system administrator." : "Por favor, contacte al administrador del sistema.",
"web services under your control" : "Servicios web bajo su control",
"App directory already exists" : "El directorio de la aplicación ya existe",
"Can't create app folder. Please fix permissions. %s" : "No se puede crear la carpeta de la aplicación. Corrija los permisos. %s",
"No source specified when installing app" : "No se ha especificado origen cuando se ha instalado la aplicación",
"No href specified when installing app from http" : "No href especificado cuando se ha instalado la aplicación",
- "No path specified when installing app from local file" : "Sin path especificado cuando se ha instalado la aplicación desde el fichero local",
- "Archives of type %s are not supported" : "Ficheros de tipo %s no son soportados",
- "Failed to open archive when installing app" : "Fallo de apertura de fichero mientras se instala la aplicación",
+ "No path specified when installing app from local file" : "Ninguna ruta especificada al instalar la aplicación desde el fichero local",
+ "Archives of type %s are not supported" : "Los ficheros de tipo %s no son soportados",
+ "Failed to open archive when installing app" : "Falló la apertura ded fichero mientras se instalaba la aplicación",
"App does not provide an info.xml file" : "La aplicación no suministra un fichero info.xml",
"App can't be installed because of not allowed code in the App" : "La aplicación no puede ser instalada por tener código no autorizado en la aplicación",
"App can't be installed because it is not compatible with this version of ownCloud" : "La aplicación no se puede instalar porque no es compatible con esta versión de ownCloud",
@@ -55,7 +52,7 @@ OC.L10N.register(
"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "La aplicación no puede ser instalada por que la versión en info.xml/version no es la misma que la establecida en la app store",
"Application is not enabled" : "La aplicación no está habilitada",
"Authentication error" : "Error de autenticación",
- "Token expired. Please reload page." : "Token expirado. Por favor, recarga la página.",
+ "Token expired. Please reload page." : "Token expirado. Por favor, recarge la página.",
"Unknown user" : "Usuario desconocido",
"%s enter the database username." : "%s ingresar el usuario de la base de datos.",
"%s enter the database name." : "%s ingresar el nombre de la base de datos",
@@ -102,22 +99,23 @@ OC.L10N.register(
"Sharing %s failed, because resharing is not allowed" : "Se ha fallado al compartir %s, ya que volver a compartir no está permitido",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Se ha fallado al compartir %s porque el motor compartido para %s podría no encontrar su origen",
"Sharing %s failed, because the file could not be found in the file cache" : "Se ha fallado al compartir %s, ya que el archivo no pudo ser encontrado en el cache de archivo",
- "Could not find category \"%s\"" : "No puede encontrar la categoria \"%s\"",
+ "Could not find category \"%s\"" : "No puede encontrar la categoría \"%s\"",
"Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Solo los siguientes caracteres están permitidos en un nombre de usuario: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"",
"A valid username must be provided" : "Se debe proporcionar un nombre de usuario válido",
"A valid password must be provided" : "Se debe proporcionar una contraseña válida",
"The username is already being used" : "El nombre de usuario ya está en uso",
"No database drivers (sqlite, mysql, or postgresql) installed." : "No están instalados los drivers de BBDD (sqlite, mysql, o postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Los permisos normalmente puede solucionarse %sdándole al servidor permisos de escritura del directorio raíz%s.",
"Cannot write into \"config\" directory" : "No se puede escribir el el directorio de configuración",
"Cannot write into \"apps\" directory" : "No se puede escribir en el directorio de \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Esto puede solucionarse fácilmente %sdándole permisos de escritura al servidor en el directorio%s de apps o deshabilitando la tienda de apps en el archivo de configuración.",
"Cannot create \"data\" directory (%s)" : "No puedo crear del directorio \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Esto puede ser solucionado <a href=\"%s\" target=\"_blank\">dando al servidor web permisos de escritura en el directorio raíz</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Los permisos normalmente puede solucionarse %sdándole al servidor permisos de escritura del directorio raíz%s.",
"Setting locale to %s failed" : "Falló la activación del idioma %s ",
"Please install one of these locales on your system and restart your webserver." : "Instale uno de estos idiomas en su sistema y reinicie su servidor web.",
"Please ask your server administrator to install the module." : "Consulte al administrador de su servidor para instalar el módulo.",
"PHP module %s not installed." : "El módulo PHP %s no está instalado.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajustando esta opción en php.ini permitirá que ownCloud vuelva a funcionar",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Consulte a su administrador del servidor para actualizar PHP a la versión más reciente. Su versión de PHP ya no es apoyado por ownCloud y la comunidad PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para transmitir datos raw. Desde la versión 5.6 de PHP se permitirá enviar noticias perfectamente validas.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para arreglar este error, cambia <code>always_populate_raw_post_data</code> a <code>-1</code> en su php.ini",
@@ -130,7 +128,7 @@ OC.L10N.register(
"Error occurred while checking PostgreSQL version" : "Ha ocurrido un error mientras se comprobaba la versión de PostgreSQL",
"Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" : "Por favor, asegúrese de que tiene PostgreSQL 9 o superior, o revise los registros para obtener más información acerca del error.",
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Por favor cambie los permisos a 0770 para que el directorio no se pueda mostrar para otros usuarios.",
- "Data directory (%s) is readable by other users" : "Directorio de datos (%s) se puede leer por otros usuarios.",
+ "Data directory (%s) is readable by other users" : "El directorio de datos (%s) se puede leer por otros usuarios.",
"Data directory (%s) is invalid" : "El directorio de datos (%s) no es válido",
"Please check that the data directory contains a file \".ocdata\" in its root." : "Verifique que el directorio de datos contiene un archivo \".ocdata\" en su directorio raíz.",
"Could not obtain lock type %d on \"%s\"." : "No se pudo realizar el bloqueo %d en \"%s\"."
diff --git a/lib/l10n/es.json b/lib/l10n/es.json
index 5b08223b093..27c79f92b51 100644
--- a/lib/l10n/es.json
+++ b/lib/l10n/es.json
@@ -1,5 +1,5 @@
{ "translations": {
- "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio de configuración!",
+ "Cannot write into \"config\" directory!" : "¡No se puede escribir en el directorio \"config\"!",
"This can usually be fixed by giving the webserver write access to the config directory" : "Esto puede solucionarse fácilmente dándole al servidor permisos de escritura del directorio de configuración",
"See %s" : "Mirar %s",
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Esto puede solucionarse fácilmente %sotorgándole permisos de escritura al directorio de configuración%s.",
@@ -9,43 +9,40 @@
"PHP with a version lower than %s is required." : "PHP con una versión inferior que %s la requerida.",
"Following databases are supported: %s" : "Las siguientes bases de datos están soportadas: %s",
"The command line tool %s could not be found" : "No se encontró la herramienta %s de línea de comandos",
- "The library %s is not available." : "La librería %s no está disponible",
+ "The library %s is not available." : "La biblioteca %s no está disponible",
"Library %s with a version higher than %s is required - available version %s." : "Biblioteca %s con una versión superior que %s la requerida - versión disponible %s.",
"Library %s with a version lower than %s is required - available version %s." : "Biblioteca %s con una versión inferior que %s la requerida - versión disponible %s.",
- "Following platforms are supported: %s" : "Las siguientes plataformas son soportadas: %s",
+ "Following platforms are supported: %s" : "Las siguientes plataformas están soportadas: %s",
"ownCloud %s or higher is required." : "Se requiere ownCloud %s o superior.",
"ownCloud with a version lower than %s is required." : "ownCloud con una versión inferior que %s la requerida.",
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Ajustes",
"Users" : "Usuarios",
"Admin" : "Administración",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "La aplicación \\\"%s\\\" no se puede instalar porque no es compatible con esta versión de ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "La aplicación \\\"%s\\\" no puede instalarse porque las siguientes dependencias no están cumplimentadas: %s",
"No app name specified" : "No se ha especificado nombre de la aplicación",
"Unknown filetype" : "Tipo de archivo desconocido",
"Invalid image" : "Imagen inválida",
"today" : "hoy",
"yesterday" : "ayer",
- "_%n day ago_::_%n days ago_" : ["Hace %n día","Hace %n días"],
+ "_%n day ago_::_%n days ago_" : ["Hace %n día","hace %n días"],
"last month" : "mes pasado",
"_%n month ago_::_%n months ago_" : ["Hace %n mes","Hace %n meses"],
"last year" : "año pasado",
- "_%n year ago_::_%n years ago_" : ["Hace %n año","Hace %n años"],
+ "_%n year ago_::_%n years ago_" : ["Hace %n año","hace %n años"],
"_%n hour ago_::_%n hours ago_" : ["Hace %n hora","Hace %n horas"],
"_%n minute ago_::_%n minutes ago_" : ["Hace %n minuto","Hace %n minutos"],
"seconds ago" : "hace segundos",
"Database Error" : "Error en la base de datos",
- "Please contact your system administrator." : "Por favor contacte al administrador del sistema.",
+ "Please contact your system administrator." : "Por favor, contacte al administrador del sistema.",
"web services under your control" : "Servicios web bajo su control",
"App directory already exists" : "El directorio de la aplicación ya existe",
"Can't create app folder. Please fix permissions. %s" : "No se puede crear la carpeta de la aplicación. Corrija los permisos. %s",
"No source specified when installing app" : "No se ha especificado origen cuando se ha instalado la aplicación",
"No href specified when installing app from http" : "No href especificado cuando se ha instalado la aplicación",
- "No path specified when installing app from local file" : "Sin path especificado cuando se ha instalado la aplicación desde el fichero local",
- "Archives of type %s are not supported" : "Ficheros de tipo %s no son soportados",
- "Failed to open archive when installing app" : "Fallo de apertura de fichero mientras se instala la aplicación",
+ "No path specified when installing app from local file" : "Ninguna ruta especificada al instalar la aplicación desde el fichero local",
+ "Archives of type %s are not supported" : "Los ficheros de tipo %s no son soportados",
+ "Failed to open archive when installing app" : "Falló la apertura ded fichero mientras se instalaba la aplicación",
"App does not provide an info.xml file" : "La aplicación no suministra un fichero info.xml",
"App can't be installed because of not allowed code in the App" : "La aplicación no puede ser instalada por tener código no autorizado en la aplicación",
"App can't be installed because it is not compatible with this version of ownCloud" : "La aplicación no se puede instalar porque no es compatible con esta versión de ownCloud",
@@ -53,7 +50,7 @@
"App can't be installed because the version in info.xml/version is not the same as the version reported from the app store" : "La aplicación no puede ser instalada por que la versión en info.xml/version no es la misma que la establecida en la app store",
"Application is not enabled" : "La aplicación no está habilitada",
"Authentication error" : "Error de autenticación",
- "Token expired. Please reload page." : "Token expirado. Por favor, recarga la página.",
+ "Token expired. Please reload page." : "Token expirado. Por favor, recarge la página.",
"Unknown user" : "Usuario desconocido",
"%s enter the database username." : "%s ingresar el usuario de la base de datos.",
"%s enter the database name." : "%s ingresar el nombre de la base de datos",
@@ -100,22 +97,23 @@
"Sharing %s failed, because resharing is not allowed" : "Se ha fallado al compartir %s, ya que volver a compartir no está permitido",
"Sharing %s failed, because the sharing backend for %s could not find its source" : "Se ha fallado al compartir %s porque el motor compartido para %s podría no encontrar su origen",
"Sharing %s failed, because the file could not be found in the file cache" : "Se ha fallado al compartir %s, ya que el archivo no pudo ser encontrado en el cache de archivo",
- "Could not find category \"%s\"" : "No puede encontrar la categoria \"%s\"",
+ "Could not find category \"%s\"" : "No puede encontrar la categoría \"%s\"",
"Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Solo los siguientes caracteres están permitidos en un nombre de usuario: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"",
"A valid username must be provided" : "Se debe proporcionar un nombre de usuario válido",
"A valid password must be provided" : "Se debe proporcionar una contraseña válida",
"The username is already being used" : "El nombre de usuario ya está en uso",
"No database drivers (sqlite, mysql, or postgresql) installed." : "No están instalados los drivers de BBDD (sqlite, mysql, o postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Los permisos normalmente puede solucionarse %sdándole al servidor permisos de escritura del directorio raíz%s.",
"Cannot write into \"config\" directory" : "No se puede escribir el el directorio de configuración",
"Cannot write into \"apps\" directory" : "No se puede escribir en el directorio de \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Esto puede solucionarse fácilmente %sdándole permisos de escritura al servidor en el directorio%s de apps o deshabilitando la tienda de apps en el archivo de configuración.",
"Cannot create \"data\" directory (%s)" : "No puedo crear del directorio \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Esto puede ser solucionado <a href=\"%s\" target=\"_blank\">dando al servidor web permisos de escritura en el directorio raíz</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Los permisos normalmente puede solucionarse %sdándole al servidor permisos de escritura del directorio raíz%s.",
"Setting locale to %s failed" : "Falló la activación del idioma %s ",
"Please install one of these locales on your system and restart your webserver." : "Instale uno de estos idiomas en su sistema y reinicie su servidor web.",
"Please ask your server administrator to install the module." : "Consulte al administrador de su servidor para instalar el módulo.",
"PHP module %s not installed." : "El módulo PHP %s no está instalado.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajustando esta opción en php.ini permitirá que ownCloud vuelva a funcionar",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Consulte a su administrador del servidor para actualizar PHP a la versión más reciente. Su versión de PHP ya no es apoyado por ownCloud y la comunidad PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para transmitir datos raw. Desde la versión 5.6 de PHP se permitirá enviar noticias perfectamente validas.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para arreglar este error, cambia <code>always_populate_raw_post_data</code> a <code>-1</code> en su php.ini",
@@ -128,7 +126,7 @@
"Error occurred while checking PostgreSQL version" : "Ha ocurrido un error mientras se comprobaba la versión de PostgreSQL",
"Please make sure you have PostgreSQL >= 9 or check the logs for more information about the error" : "Por favor, asegúrese de que tiene PostgreSQL 9 o superior, o revise los registros para obtener más información acerca del error.",
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Por favor cambie los permisos a 0770 para que el directorio no se pueda mostrar para otros usuarios.",
- "Data directory (%s) is readable by other users" : "Directorio de datos (%s) se puede leer por otros usuarios.",
+ "Data directory (%s) is readable by other users" : "El directorio de datos (%s) se puede leer por otros usuarios.",
"Data directory (%s) is invalid" : "El directorio de datos (%s) no es válido",
"Please check that the data directory contains a file \".ocdata\" in its root." : "Verifique que el directorio de datos contiene un archivo \".ocdata\" en su directorio raíz.",
"Could not obtain lock type %d on \"%s\"." : "No se pudo realizar el bloqueo %d en \"%s\"."
diff --git a/lib/l10n/es_AR.js b/lib/l10n/es_AR.js
index bc291ddb3b6..db0da45be58 100644
--- a/lib/l10n/es_AR.js
+++ b/lib/l10n/es_AR.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Configuración",
"Users" : "Usuarios",
"Admin" : "Administración",
"No app name specified" : "No fue especificado el nombre de la app",
diff --git a/lib/l10n/es_AR.json b/lib/l10n/es_AR.json
index e1245fabfef..2b95e2ab678 100644
--- a/lib/l10n/es_AR.json
+++ b/lib/l10n/es_AR.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Configuración",
"Users" : "Usuarios",
"Admin" : "Administración",
"No app name specified" : "No fue especificado el nombre de la app",
diff --git a/lib/l10n/es_CL.js b/lib/l10n/es_CL.js
index 84e47673937..6d03cf1afee 100644
--- a/lib/l10n/es_CL.js
+++ b/lib/l10n/es_CL.js
@@ -7,10 +7,8 @@ OC.L10N.register(
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Generalmente esto se puede resolver %s otorgando permisos de escritura al servidor web en la carpeta configurada %s",
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Configuración",
"Users" : "Usuarios",
"Admin" : "Administración",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "La aplicación \\\"%s\\\" no puede ser instalada debido a que no es compatible con esta versión de ownCloud.",
"No app name specified" : "No se especificó el nombre de la aplicación",
"Unknown filetype" : "Tipo de archivo desconocido",
"Invalid image" : "Imagen no válida",
diff --git a/lib/l10n/es_CL.json b/lib/l10n/es_CL.json
index 946cf11dc09..28d2d48a0db 100644
--- a/lib/l10n/es_CL.json
+++ b/lib/l10n/es_CL.json
@@ -5,10 +5,8 @@
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Generalmente esto se puede resolver %s otorgando permisos de escritura al servidor web en la carpeta configurada %s",
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Configuración",
"Users" : "Usuarios",
"Admin" : "Administración",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "La aplicación \\\"%s\\\" no puede ser instalada debido a que no es compatible con esta versión de ownCloud.",
"No app name specified" : "No se especificó el nombre de la aplicación",
"Unknown filetype" : "Tipo de archivo desconocido",
"Invalid image" : "Imagen no válida",
diff --git a/lib/l10n/es_MX.js b/lib/l10n/es_MX.js
index e739b14c9fd..f607baaf755 100644
--- a/lib/l10n/es_MX.js
+++ b/lib/l10n/es_MX.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Ajustes",
"Users" : "Usuarios",
"Admin" : "Administración",
"No app name specified" : "No se ha especificado nombre de la aplicación",
diff --git a/lib/l10n/es_MX.json b/lib/l10n/es_MX.json
index 9b63e52244c..55f23534ea6 100644
--- a/lib/l10n/es_MX.json
+++ b/lib/l10n/es_MX.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Ayuda",
"Personal" : "Personal",
- "Settings" : "Ajustes",
"Users" : "Usuarios",
"Admin" : "Administración",
"No app name specified" : "No se ha especificado nombre de la aplicación",
diff --git a/lib/l10n/et_EE.js b/lib/l10n/et_EE.js
index 2718a1e4223..486d4ac7f16 100644
--- a/lib/l10n/et_EE.js
+++ b/lib/l10n/et_EE.js
@@ -10,11 +10,9 @@ OC.L10N.register(
"PHP %s or higher is required." : "PHP %s või uuem on nõutav.",
"Help" : "Abiinfo",
"Personal" : "Isiklik",
- "Settings" : "Seaded",
"Users" : "Kasutajad",
"Admin" : "Admin",
"Recommended" : "Soovitatud",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Rakendit \\\"%s\\\" ei saa paigaldada, kuna see pole ühilduv selle ownCloud versiooniga.",
"No app name specified" : "Ühegi rakendi nime pole määratletud",
"Unknown filetype" : "Tundmatu failitüüp",
"Invalid image" : "Vigane pilt",
@@ -94,12 +92,12 @@ OC.L10N.register(
"A valid password must be provided" : "Sisesta nõuetele vastav parool",
"The username is already being used" : "Kasutajanimi on juba kasutuses",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ühtegi andmebaasi (sqlite, mysql või postgresql) draiverit pole paigaldatud.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Õigused saab tavaliselt paika %s andes veebiserverile juurkataloogile kirjutusõigused %s",
"Cannot write into \"config\" directory" : "Ei saa kirjutada \"config\" kataloogi",
"Cannot write into \"apps\" directory" : "Ei saa kirjutada \"apps\" kataloogi!",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Tavaliselt saab selle lahendada %s andes veebiserverile rakendite kataloogile kirjutusõigused %s või keelates seadetes rakendikogu.",
"Cannot create \"data\" directory (%s)" : "Ei suuda luua \"data\" kataloogi (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Tavaliselt saab selle lahendada <a href=\"%s\" target=\"_blank\">andes veebiserverile juur-kataloogile kirjutusõigused</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Õigused saab tavaliselt paika %s andes veebiserverile juurkataloogile kirjutusõigused %s",
"Setting locale to %s failed" : "Lokaadi %s määramine ebaõnnestus.",
"Please install one of these locales on your system and restart your webserver." : "Palun paigalda mõni neist lokaatides oma süsteemi ning taaskäivita veebiserver.",
"Please ask your server administrator to install the module." : "Palu oma serveri haldajal moodul paigadalda.",
diff --git a/lib/l10n/et_EE.json b/lib/l10n/et_EE.json
index f71ee98481d..bcdb286d4a3 100644
--- a/lib/l10n/et_EE.json
+++ b/lib/l10n/et_EE.json
@@ -8,11 +8,9 @@
"PHP %s or higher is required." : "PHP %s või uuem on nõutav.",
"Help" : "Abiinfo",
"Personal" : "Isiklik",
- "Settings" : "Seaded",
"Users" : "Kasutajad",
"Admin" : "Admin",
"Recommended" : "Soovitatud",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Rakendit \\\"%s\\\" ei saa paigaldada, kuna see pole ühilduv selle ownCloud versiooniga.",
"No app name specified" : "Ühegi rakendi nime pole määratletud",
"Unknown filetype" : "Tundmatu failitüüp",
"Invalid image" : "Vigane pilt",
@@ -92,12 +90,12 @@
"A valid password must be provided" : "Sisesta nõuetele vastav parool",
"The username is already being used" : "Kasutajanimi on juba kasutuses",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ühtegi andmebaasi (sqlite, mysql või postgresql) draiverit pole paigaldatud.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Õigused saab tavaliselt paika %s andes veebiserverile juurkataloogile kirjutusõigused %s",
"Cannot write into \"config\" directory" : "Ei saa kirjutada \"config\" kataloogi",
"Cannot write into \"apps\" directory" : "Ei saa kirjutada \"apps\" kataloogi!",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Tavaliselt saab selle lahendada %s andes veebiserverile rakendite kataloogile kirjutusõigused %s või keelates seadetes rakendikogu.",
"Cannot create \"data\" directory (%s)" : "Ei suuda luua \"data\" kataloogi (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Tavaliselt saab selle lahendada <a href=\"%s\" target=\"_blank\">andes veebiserverile juur-kataloogile kirjutusõigused</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Õigused saab tavaliselt paika %s andes veebiserverile juurkataloogile kirjutusõigused %s",
"Setting locale to %s failed" : "Lokaadi %s määramine ebaõnnestus.",
"Please install one of these locales on your system and restart your webserver." : "Palun paigalda mõni neist lokaatides oma süsteemi ning taaskäivita veebiserver.",
"Please ask your server administrator to install the module." : "Palu oma serveri haldajal moodul paigadalda.",
diff --git a/lib/l10n/eu.js b/lib/l10n/eu.js
index f4e0e337107..32152d386f8 100644
--- a/lib/l10n/eu.js
+++ b/lib/l10n/eu.js
@@ -8,26 +8,35 @@ OC.L10N.register(
"Sample configuration detected" : "Adibide-ezarpena detektatua",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detektatu da adibide-ezarpena kopiatu dela. Honek zure instalazioa apur dezake eta ez da onartzen. Irakurri dokumentazioa config.php fitxategia aldatu aurretik.",
"PHP %s or higher is required." : "PHP %s edo berriagoa behar da.",
+ "PHP with a version lower than %s is required." : "PHPren bertsioa %s baino txikiagoa izan behar da.",
+ "Following databases are supported: %s" : "Hurrengo datubaseak onartzen dira: %s",
+ "The command line tool %s could not be found" : "Komando lerroko %s tresna ezin da aurkitu",
+ "The library %s is not available." : "%s liburutegia ez dago eskuragarri.",
+ "Library %s with a version higher than %s is required - available version %s." : "%s liburutegiak %s baino bertsio handiagoa izan behar du - dagoen bertsioa %s.",
+ "Library %s with a version lower than %s is required - available version %s." : "%s liburutegiak %s baino bertsio txikiagoa izan behar du - dagoen bertsioa %s.",
+ "Following platforms are supported: %s" : "Hurrengo plataformak onartzen dira: %s",
+ "ownCloud %s or higher is required." : "ownCloud %s edo haundiagoa behar da.",
+ "ownCloud with a version lower than %s is required." : "ownCloud %s baino bertsio txikiagoa behar da.",
"Help" : "Laguntza",
"Personal" : "Pertsonala",
- "Settings" : "Ezarpenak",
"Users" : "Erabiltzaileak",
"Admin" : "Admin",
"Recommended" : "Aholkatuta",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "\\\"%s\\\" Aplikazioa ezin da instalatu ownCloud bertsio honekin bateragarria ez delako.",
"No app name specified" : "Ez da aplikazioaren izena zehaztu",
"Unknown filetype" : "Fitxategi mota ezezaguna",
"Invalid image" : "Baliogabeko irudia",
"today" : "gaur",
"yesterday" : "atzo",
- "_%n day ago_::_%n days ago_" : ["",""],
+ "_%n day ago_::_%n days ago_" : ["orain dela egun %n","orain dela %n egun"],
"last month" : "joan den hilabetean",
"_%n month ago_::_%n months ago_" : ["orain dela hilabete %n","orain dela %n hilabete"],
"last year" : "joan den urtean",
- "_%n year ago_::_%n years ago_" : ["",""],
+ "_%n year ago_::_%n years ago_" : ["orain dela urte %n","orain dela %n urte"],
"_%n hour ago_::_%n hours ago_" : ["orain dela ordu %n","orain dela %n ordu"],
"_%n minute ago_::_%n minutes ago_" : ["orain dela minutu %n","orain dela %n minutu"],
"seconds ago" : "segundu",
+ "Database Error" : "Datu basearen errorea",
+ "Please contact your system administrator." : "Mesedez jarri harremetan zure sistemaren kudeatzailearekin.",
"web services under your control" : "web zerbitzuak zure kontrolpean",
"App directory already exists" : "Aplikazioaren karpeta dagoeneko existitzen da",
"Can't create app folder. Please fix permissions. %s" : "Ezin izan da aplikazioaren karpeta sortu. Mesdez konpondu baimenak. %s",
@@ -65,6 +74,7 @@ OC.L10N.register(
"Set an admin password." : "Ezarri administraziorako pasahitza.",
"Can't create or write into the data directory %s" : "Ezin da %s datu karpeta sortu edo bertan idatzi ",
"%s shared »%s« with you" : "%s-ek »%s« zurekin partekatu du",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "%s partekatzeak huts egin du, motorrak %i motako partekatzeak baimentzen ez dituelako",
"Sharing %s failed, because the file does not exist" : "%s elkarbanatzeak huts egin du, fitxategia ez delako existitzen",
"You are not allowed to share %s" : "Ez zadue %s elkarbanatzeko baimendua",
"Sharing %s failed, because the user %s is the item owner" : "%s elkarbanatzeak huts egin du, %s erabiltzailea jabea delako",
@@ -75,6 +85,7 @@ OC.L10N.register(
"Sharing %s failed, because %s is not a member of the group %s" : "%s elkarbanatzeak huts egin du, %s ez delako %s taldearen partaidea",
"You need to provide a password to create a public link, only protected links are allowed" : "Lotura publiko bat sortzeko pasahitza idatzi behar duzu, bakarrik babestutako loturak baimenduta daude",
"Sharing %s failed, because sharing with links is not allowed" : "%s elkarbanatzeak huts egin du, lotura bidezko elkarbanatzea baimendua ez dagoelako",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "%s partekatzeak huts egin du, ezin da %s aurkitu, agian zerbitzaria orain ez dago eskuragarri.",
"Share type %s is not valid for %s" : "%s elkarbanaketa mota ez da %srentzako egokia",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "%srentzako baimenak ezartzea huts egin du, baimenak %sri emandakoak baino gehiago direlako",
"Setting permissions for %s failed, because the item was not found" : "%srentzako baimenak ezartzea huts egin du, aurkitu ez delako",
@@ -94,17 +105,18 @@ OC.L10N.register(
"A valid password must be provided" : "Baliozko pasahitza eman behar da",
"The username is already being used" : "Erabiltzaile izena dagoeneko erabiltzen ari da",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ez dago datubaseen (sqlite, mysql edo postgresql) driverrik instalatuta.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Hau normalean konpondu daiteke %sweb zerbitzarira erro karpetan idazteko baimenak emanez%s.",
"Cannot write into \"config\" directory" : "Ezin da idatzi \"config\" karpetan",
"Cannot write into \"apps\" directory" : "Ezin da idatzi \"apps\" karpetan",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Hau normalean konpondu daiteke %sweb zerbitzarira apps karpetan idazteko baimenak emanez%s edo konfigurazio fitxategian appstorea ez gaituz.",
"Cannot create \"data\" directory (%s)" : "Ezin da \"data\" karpeta sortu (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Hau normalean konpondu daiteke <a href=\"%s\" target=\"_blank\">web zerbitzarira erro karpetan idazteko baimenak emanez</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Hau normalean konpondu daiteke %sweb zerbitzarira erro karpetan idazteko baimenak emanez%s.",
"Setting locale to %s failed" : "Lokala %sra ezartzeak huts egin du",
"Please install one of these locales on your system and restart your webserver." : "Instalatu hauetako lokal bat zure sisteman eta berrabiarazi zure web zerbitzaria.",
"Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari modulua instala dezan.",
"PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari PHP azkenengo bertsiora eguneratzea. Zure PHP bertsioa ez dute ez ownCloud eta ez PHP komunitateek mantentzen.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Hau konpontzeko ezarri <code>always_populate_raw_post_data</code> berdin <code>-1</code> zure php.inian",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Badirudi PHP konfiguratuta dagoela lineako dokumentu blokeak aldatzeko. Honek zenbait oinarrizko aplikazio eskuraezin bihurtuko ditu.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Hau ziur aski cache/accelerator batek eragin du, hala nola Zend OPcache edo eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik faltan bezala markatuta daude?",
diff --git a/lib/l10n/eu.json b/lib/l10n/eu.json
index 46786f41d9c..f8ab91f00e0 100644
--- a/lib/l10n/eu.json
+++ b/lib/l10n/eu.json
@@ -6,26 +6,35 @@
"Sample configuration detected" : "Adibide-ezarpena detektatua",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Detektatu da adibide-ezarpena kopiatu dela. Honek zure instalazioa apur dezake eta ez da onartzen. Irakurri dokumentazioa config.php fitxategia aldatu aurretik.",
"PHP %s or higher is required." : "PHP %s edo berriagoa behar da.",
+ "PHP with a version lower than %s is required." : "PHPren bertsioa %s baino txikiagoa izan behar da.",
+ "Following databases are supported: %s" : "Hurrengo datubaseak onartzen dira: %s",
+ "The command line tool %s could not be found" : "Komando lerroko %s tresna ezin da aurkitu",
+ "The library %s is not available." : "%s liburutegia ez dago eskuragarri.",
+ "Library %s with a version higher than %s is required - available version %s." : "%s liburutegiak %s baino bertsio handiagoa izan behar du - dagoen bertsioa %s.",
+ "Library %s with a version lower than %s is required - available version %s." : "%s liburutegiak %s baino bertsio txikiagoa izan behar du - dagoen bertsioa %s.",
+ "Following platforms are supported: %s" : "Hurrengo plataformak onartzen dira: %s",
+ "ownCloud %s or higher is required." : "ownCloud %s edo haundiagoa behar da.",
+ "ownCloud with a version lower than %s is required." : "ownCloud %s baino bertsio txikiagoa behar da.",
"Help" : "Laguntza",
"Personal" : "Pertsonala",
- "Settings" : "Ezarpenak",
"Users" : "Erabiltzaileak",
"Admin" : "Admin",
"Recommended" : "Aholkatuta",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "\\\"%s\\\" Aplikazioa ezin da instalatu ownCloud bertsio honekin bateragarria ez delako.",
"No app name specified" : "Ez da aplikazioaren izena zehaztu",
"Unknown filetype" : "Fitxategi mota ezezaguna",
"Invalid image" : "Baliogabeko irudia",
"today" : "gaur",
"yesterday" : "atzo",
- "_%n day ago_::_%n days ago_" : ["",""],
+ "_%n day ago_::_%n days ago_" : ["orain dela egun %n","orain dela %n egun"],
"last month" : "joan den hilabetean",
"_%n month ago_::_%n months ago_" : ["orain dela hilabete %n","orain dela %n hilabete"],
"last year" : "joan den urtean",
- "_%n year ago_::_%n years ago_" : ["",""],
+ "_%n year ago_::_%n years ago_" : ["orain dela urte %n","orain dela %n urte"],
"_%n hour ago_::_%n hours ago_" : ["orain dela ordu %n","orain dela %n ordu"],
"_%n minute ago_::_%n minutes ago_" : ["orain dela minutu %n","orain dela %n minutu"],
"seconds ago" : "segundu",
+ "Database Error" : "Datu basearen errorea",
+ "Please contact your system administrator." : "Mesedez jarri harremetan zure sistemaren kudeatzailearekin.",
"web services under your control" : "web zerbitzuak zure kontrolpean",
"App directory already exists" : "Aplikazioaren karpeta dagoeneko existitzen da",
"Can't create app folder. Please fix permissions. %s" : "Ezin izan da aplikazioaren karpeta sortu. Mesdez konpondu baimenak. %s",
@@ -63,6 +72,7 @@
"Set an admin password." : "Ezarri administraziorako pasahitza.",
"Can't create or write into the data directory %s" : "Ezin da %s datu karpeta sortu edo bertan idatzi ",
"%s shared »%s« with you" : "%s-ek »%s« zurekin partekatu du",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "%s partekatzeak huts egin du, motorrak %i motako partekatzeak baimentzen ez dituelako",
"Sharing %s failed, because the file does not exist" : "%s elkarbanatzeak huts egin du, fitxategia ez delako existitzen",
"You are not allowed to share %s" : "Ez zadue %s elkarbanatzeko baimendua",
"Sharing %s failed, because the user %s is the item owner" : "%s elkarbanatzeak huts egin du, %s erabiltzailea jabea delako",
@@ -73,6 +83,7 @@
"Sharing %s failed, because %s is not a member of the group %s" : "%s elkarbanatzeak huts egin du, %s ez delako %s taldearen partaidea",
"You need to provide a password to create a public link, only protected links are allowed" : "Lotura publiko bat sortzeko pasahitza idatzi behar duzu, bakarrik babestutako loturak baimenduta daude",
"Sharing %s failed, because sharing with links is not allowed" : "%s elkarbanatzeak huts egin du, lotura bidezko elkarbanatzea baimendua ez dagoelako",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "%s partekatzeak huts egin du, ezin da %s aurkitu, agian zerbitzaria orain ez dago eskuragarri.",
"Share type %s is not valid for %s" : "%s elkarbanaketa mota ez da %srentzako egokia",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "%srentzako baimenak ezartzea huts egin du, baimenak %sri emandakoak baino gehiago direlako",
"Setting permissions for %s failed, because the item was not found" : "%srentzako baimenak ezartzea huts egin du, aurkitu ez delako",
@@ -92,17 +103,18 @@
"A valid password must be provided" : "Baliozko pasahitza eman behar da",
"The username is already being used" : "Erabiltzaile izena dagoeneko erabiltzen ari da",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ez dago datubaseen (sqlite, mysql edo postgresql) driverrik instalatuta.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Hau normalean konpondu daiteke %sweb zerbitzarira erro karpetan idazteko baimenak emanez%s.",
"Cannot write into \"config\" directory" : "Ezin da idatzi \"config\" karpetan",
"Cannot write into \"apps\" directory" : "Ezin da idatzi \"apps\" karpetan",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Hau normalean konpondu daiteke %sweb zerbitzarira apps karpetan idazteko baimenak emanez%s edo konfigurazio fitxategian appstorea ez gaituz.",
"Cannot create \"data\" directory (%s)" : "Ezin da \"data\" karpeta sortu (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Hau normalean konpondu daiteke <a href=\"%s\" target=\"_blank\">web zerbitzarira erro karpetan idazteko baimenak emanez</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Hau normalean konpondu daiteke %sweb zerbitzarira erro karpetan idazteko baimenak emanez%s.",
"Setting locale to %s failed" : "Lokala %sra ezartzeak huts egin du",
"Please install one of these locales on your system and restart your webserver." : "Instalatu hauetako lokal bat zure sisteman eta berrabiarazi zure web zerbitzaria.",
"Please ask your server administrator to install the module." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari modulua instala dezan.",
"PHP module %s not installed." : "PHPren %s modulua ez dago instalaturik.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mesedez eskatu zure zerbitzariaren kudeatzaileari PHP azkenengo bertsiora eguneratzea. Zure PHP bertsioa ez dute ez ownCloud eta ez PHP komunitateek mantentzen.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Hau konpontzeko ezarri <code>always_populate_raw_post_data</code> berdin <code>-1</code> zure php.inian",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Badirudi PHP konfiguratuta dagoela lineako dokumentu blokeak aldatzeko. Honek zenbait oinarrizko aplikazio eskuraezin bihurtuko ditu.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Hau ziur aski cache/accelerator batek eragin du, hala nola Zend OPcache edo eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP moduluak instalatu dira, baina oraindik faltan bezala markatuta daude?",
diff --git a/lib/l10n/fa.js b/lib/l10n/fa.js
index e5cacb279d4..33f9633e65f 100644
--- a/lib/l10n/fa.js
+++ b/lib/l10n/fa.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "راه‌نما",
"Personal" : "شخصی",
- "Settings" : "تنظیمات",
"Users" : "کاربران",
"Admin" : "مدیر",
"Unknown filetype" : "نوع فایل ناشناخته",
diff --git a/lib/l10n/fa.json b/lib/l10n/fa.json
index 608d66645da..5f419ccf229 100644
--- a/lib/l10n/fa.json
+++ b/lib/l10n/fa.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "راه‌نما",
"Personal" : "شخصی",
- "Settings" : "تنظیمات",
"Users" : "کاربران",
"Admin" : "مدیر",
"Unknown filetype" : "نوع فایل ناشناخته",
diff --git a/lib/l10n/fi_FI.js b/lib/l10n/fi_FI.js
index 5c37b9c4093..51cc0b0d761 100644
--- a/lib/l10n/fi_FI.js
+++ b/lib/l10n/fi_FI.js
@@ -18,12 +18,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud versiota %s alempi vaaditaan.",
"Help" : "Ohje",
"Personal" : "Henkilökohtainen",
- "Settings" : "Asetukset",
"Users" : "Käyttäjät",
"Admin" : "Ylläpito",
"Recommended" : "Suositeltu",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Sovellusta \\\"%s\\\" ei voi asentaa, koska se ei ole yhteensopiva tämän ownCloud-version kanssa.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Sovellusta \\\"%s\\\" ei voi asentaa, koska seuraavat riippuvuudet eivät täyty: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Sovelluksen \"%s\" asennus ei onnistu, koska se ei ole yhteensopiva tämän ownCloud-version kanssa.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Sovelluksen \"%s\" asennus ei onnistu, koska seuraavia riippuvuuksia ei ole täytetty: %s",
"No app name specified" : "Sovelluksen nimeä ei määritelty",
"Unknown filetype" : "Tuntematon tiedostotyyppi",
"Invalid image" : "Virheellinen kuva",
@@ -103,6 +102,8 @@ OC.L10N.register(
"Please install one of these locales on your system and restart your webserver." : "Asenna ainakin yksi kyseisistä maa-asetuksista järjestelmään ja käynnistä http-palvelin uudelleen.",
"Please ask your server administrator to install the module." : "Pyydä palvelimen ylläpitäjää asentamaan moduulin.",
"PHP module %s not installed." : "PHP-moduulia %s ei ole asennettu.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-asetusta \"%s\" ei ole asetettu arvoon \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Tämän asetuksen muuttaminen php.ini-tiedostossa saattaa ownCloudin jälleen toimintakykyiseksi",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pyydä palvelimen ylläpitäjää päivittämään PHP uusimpaan versioon. Käyttämäsi PHP-versio ei ole enää tuettu ownCloud- ja PHP-yhteisön toimesta.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Korjaa ongelma asettamalla asetuksen <code>always_populate_raw_post_data</code> arvoksi <code>-1</code> php.ini-tiedostossa",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-moduulit on asennettu, mutta ovatko ne vieläkin listattu puuttuviksi?",
diff --git a/lib/l10n/fi_FI.json b/lib/l10n/fi_FI.json
index 38215ca862d..b3450642c4e 100644
--- a/lib/l10n/fi_FI.json
+++ b/lib/l10n/fi_FI.json
@@ -16,12 +16,11 @@
"ownCloud with a version lower than %s is required." : "ownCloud versiota %s alempi vaaditaan.",
"Help" : "Ohje",
"Personal" : "Henkilökohtainen",
- "Settings" : "Asetukset",
"Users" : "Käyttäjät",
"Admin" : "Ylläpito",
"Recommended" : "Suositeltu",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Sovellusta \\\"%s\\\" ei voi asentaa, koska se ei ole yhteensopiva tämän ownCloud-version kanssa.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Sovellusta \\\"%s\\\" ei voi asentaa, koska seuraavat riippuvuudet eivät täyty: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Sovelluksen \"%s\" asennus ei onnistu, koska se ei ole yhteensopiva tämän ownCloud-version kanssa.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Sovelluksen \"%s\" asennus ei onnistu, koska seuraavia riippuvuuksia ei ole täytetty: %s",
"No app name specified" : "Sovelluksen nimeä ei määritelty",
"Unknown filetype" : "Tuntematon tiedostotyyppi",
"Invalid image" : "Virheellinen kuva",
@@ -101,6 +100,8 @@
"Please install one of these locales on your system and restart your webserver." : "Asenna ainakin yksi kyseisistä maa-asetuksista järjestelmään ja käynnistä http-palvelin uudelleen.",
"Please ask your server administrator to install the module." : "Pyydä palvelimen ylläpitäjää asentamaan moduulin.",
"PHP module %s not installed." : "PHP-moduulia %s ei ole asennettu.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP-asetusta \"%s\" ei ole asetettu arvoon \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Tämän asetuksen muuttaminen php.ini-tiedostossa saattaa ownCloudin jälleen toimintakykyiseksi",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pyydä palvelimen ylläpitäjää päivittämään PHP uusimpaan versioon. Käyttämäsi PHP-versio ei ole enää tuettu ownCloud- ja PHP-yhteisön toimesta.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Korjaa ongelma asettamalla asetuksen <code>always_populate_raw_post_data</code> arvoksi <code>-1</code> php.ini-tiedostossa",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-moduulit on asennettu, mutta ovatko ne vieläkin listattu puuttuviksi?",
diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js
index 6e86a0fb4fb..e8031bca581 100644
--- a/lib/l10n/fr.js
+++ b/lib/l10n/fr.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Une version antérieure à %s d'ownCloud est requise.",
"Help" : "Aide",
"Personal" : "Personnel",
- "Settings" : "Paramètres",
"Users" : "Utilisateurs",
"Admin" : "Administration",
"Recommended" : "Recommandée",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'application \\\"%s\\\" ne peut pas être installée car elle n'est pas compatible avec cette version de ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'application \\\"%s\\\" ne peut être installée à cause des dépendances suivantes non satisfaites : %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "L'application \"%s\" ne peut pas être installée car elle n'est pas compatible avec cette version de ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'application \"%s\" ne peut pas être installée à cause des dépendances suivantes non satisfaites : %s",
"No app name specified" : "Aucun nom d'application spécifié",
"Unknown filetype" : "Type de fichier inconnu",
"Invalid image" : "Image non valable",
@@ -93,7 +92,7 @@ OC.L10N.register(
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "Le réglage des permissions pour %s a échoué car les permissions dépassent celles accordées à %s",
"Setting permissions for %s failed, because the item was not found" : "Le réglage des permissions pour %s a échoué car l'objet n'a pas été trouvé",
"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "Impossible de configurer la date d'expiration. Un partage ne peut expirer plus de %s après sa création",
- "Cannot set expiration date. Expiration date is in the past" : "Impossible de configurer la date d'expiration. La date d'expiration est dans le passé.",
+ "Cannot set expiration date. Expiration date is in the past" : "Impossible de configurer la date d'expiration : elle est dans le passé.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" : "Le service de partage %s doit implémenter l'interface OCP\\Share_Backend",
"Sharing backend %s not found" : "Service de partage %s non trouvé",
"Sharing backend for %s not found" : "Le service de partage pour %s est introuvable",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "Un mot de passe valide doit être saisi",
"The username is already being used" : "Ce nom d'utilisateur est déjà utilisé",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Aucun pilote de base de données (sqlite, mysql, ou postgresql) n’est installé.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Les permissions peuvent, généralement, être résolues %sen donnant au serveur web un accès en écriture au répertoire racine%s",
"Cannot write into \"config\" directory" : "Impossible d’écrire dans le répertoire \"config\"",
"Cannot write into \"apps\" directory" : "Impossible d’écrire dans le répertoire \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ce problème est généralement résolu %sen donnant au serveur web un accès en écriture au répertoire apps%s ou en désactivant l'appstore dans le fichier de configuration.",
"Cannot create \"data\" directory (%s)" : "Impossible de créer le répertoire \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ce problème est généralement résolu <a href=\"%s\" target=\"_blank\">en donnant au serveur web un accès en écriture au répertoire racine</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Les permissions peuvent, généralement, être résolues %sen donnant au serveur web un accès en écriture au répertoire racine%s",
"Setting locale to %s failed" : "Le choix de la langue pour %s a échoué",
"Please install one of these locales on your system and restart your webserver." : "Veuillez installer l'un de ces paramètres régionaux sur votre système et redémarrer votre serveur web.",
"Please ask your server administrator to install the module." : "Veuillez demander à votre administrateur d’installer le module.",
"PHP module %s not installed." : "Le module PHP %s n’est pas installé.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Le paramètre PHP \"%s\" n'est pas \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajuster ce paramètre dans php.ini permettra à ownCloud de fonctionner à nouveau",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Veuillez demander à votre administrateur de mettre à jour PHP vers sa dernière version disponible. La vôtre n’est plus prise en charge par ownCloud ni par la communauté PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP est configuré pour remplir des données brutes POST. A partir de PHP 5.6, cela va générer des avis pour du code parfaitement valide.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Pour corriger ce problème, configurez <code>always_populate_raw_post_data</code> à <code>-1</code> dans votre php.ini",
diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json
index 46384b46402..275d3db9ccb 100644
--- a/lib/l10n/fr.json
+++ b/lib/l10n/fr.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Une version antérieure à %s d'ownCloud est requise.",
"Help" : "Aide",
"Personal" : "Personnel",
- "Settings" : "Paramètres",
"Users" : "Utilisateurs",
"Admin" : "Administration",
"Recommended" : "Recommandée",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'application \\\"%s\\\" ne peut pas être installée car elle n'est pas compatible avec cette version de ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'application \\\"%s\\\" ne peut être installée à cause des dépendances suivantes non satisfaites : %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "L'application \"%s\" ne peut pas être installée car elle n'est pas compatible avec cette version de ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'application \"%s\" ne peut pas être installée à cause des dépendances suivantes non satisfaites : %s",
"No app name specified" : "Aucun nom d'application spécifié",
"Unknown filetype" : "Type de fichier inconnu",
"Invalid image" : "Image non valable",
@@ -91,7 +90,7 @@
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "Le réglage des permissions pour %s a échoué car les permissions dépassent celles accordées à %s",
"Setting permissions for %s failed, because the item was not found" : "Le réglage des permissions pour %s a échoué car l'objet n'a pas été trouvé",
"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "Impossible de configurer la date d'expiration. Un partage ne peut expirer plus de %s après sa création",
- "Cannot set expiration date. Expiration date is in the past" : "Impossible de configurer la date d'expiration. La date d'expiration est dans le passé.",
+ "Cannot set expiration date. Expiration date is in the past" : "Impossible de configurer la date d'expiration : elle est dans le passé.",
"Sharing backend %s must implement the interface OCP\\Share_Backend" : "Le service de partage %s doit implémenter l'interface OCP\\Share_Backend",
"Sharing backend %s not found" : "Service de partage %s non trouvé",
"Sharing backend for %s not found" : "Le service de partage pour %s est introuvable",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "Un mot de passe valide doit être saisi",
"The username is already being used" : "Ce nom d'utilisateur est déjà utilisé",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Aucun pilote de base de données (sqlite, mysql, ou postgresql) n’est installé.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Les permissions peuvent, généralement, être résolues %sen donnant au serveur web un accès en écriture au répertoire racine%s",
"Cannot write into \"config\" directory" : "Impossible d’écrire dans le répertoire \"config\"",
"Cannot write into \"apps\" directory" : "Impossible d’écrire dans le répertoire \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ce problème est généralement résolu %sen donnant au serveur web un accès en écriture au répertoire apps%s ou en désactivant l'appstore dans le fichier de configuration.",
"Cannot create \"data\" directory (%s)" : "Impossible de créer le répertoire \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ce problème est généralement résolu <a href=\"%s\" target=\"_blank\">en donnant au serveur web un accès en écriture au répertoire racine</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Les permissions peuvent, généralement, être résolues %sen donnant au serveur web un accès en écriture au répertoire racine%s",
"Setting locale to %s failed" : "Le choix de la langue pour %s a échoué",
"Please install one of these locales on your system and restart your webserver." : "Veuillez installer l'un de ces paramètres régionaux sur votre système et redémarrer votre serveur web.",
"Please ask your server administrator to install the module." : "Veuillez demander à votre administrateur d’installer le module.",
"PHP module %s not installed." : "Le module PHP %s n’est pas installé.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Le paramètre PHP \"%s\" n'est pas \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajuster ce paramètre dans php.ini permettra à ownCloud de fonctionner à nouveau",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Veuillez demander à votre administrateur de mettre à jour PHP vers sa dernière version disponible. La vôtre n’est plus prise en charge par ownCloud ni par la communauté PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP est configuré pour remplir des données brutes POST. A partir de PHP 5.6, cela va générer des avis pour du code parfaitement valide.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Pour corriger ce problème, configurez <code>always_populate_raw_post_data</code> à <code>-1</code> dans votre php.ini",
diff --git a/lib/l10n/gl.js b/lib/l10n/gl.js
index 6a6704799ff..165d42c58b0 100644
--- a/lib/l10n/gl.js
+++ b/lib/l10n/gl.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Requírese ownCloud cunha versión inferior a %s.",
"Help" : "Axuda",
"Personal" : "Persoal",
- "Settings" : "Axustes",
"Users" : "Usuarios",
"Admin" : "Administración",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Non é posíbel instalar a aplicación «%s» por non seren compatíbel con esta versión do ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Non é posíbel instalar a aplicación «%s» por mor de non cumprirse as dependencias: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Non é posíbel instalar a aplicación «%s» por non seren compatíbel con esta versión do ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Non é posíbel instalar a aplicación «%s» por mor de non cumprirse as dependencias: %s",
"No app name specified" : "Non se especificou o nome da aplicación",
"Unknown filetype" : "Tipo de ficheiro descoñecido",
"Invalid image" : "Imaxe incorrecta",
@@ -43,9 +42,9 @@ OC.L10N.register(
"web services under your control" : "servizos web baixo o seu control",
"App directory already exists" : "Xa existe o directorio da aplicación",
"Can't create app folder. Please fix permissions. %s" : "Non é posíbel crear o cartafol de aplicacións. Corrixa os permisos. %s",
- "No source specified when installing app" : "Non foi especificada ningunha orixe ao instalar aplicacións",
- "No href specified when installing app from http" : "Non foi especificada ningunha href ao instalar aplicacións",
- "No path specified when installing app from local file" : "Non foi especificada ningunha ruta ao instalar aplicacións desde un ficheiro local",
+ "No source specified when installing app" : "Non foi especificada ningunha orixe ao instalar a aplicación",
+ "No href specified when installing app from http" : "Non foi especificada ningunha «href» ao instalar a aplicación",
+ "No path specified when installing app from local file" : "Non foi especificada ningunha ruta ao instalar a aplicación desde un ficheiro local",
"Archives of type %s are not supported" : "Os arquivos do tipo %s non están admitidos",
"Failed to open archive when installing app" : "Non foi posíbel abrir o arquivo ao instalar aplicacións",
"App does not provide an info.xml file" : "A aplicación non fornece un ficheiro info.xml",
@@ -108,19 +107,21 @@ OC.L10N.register(
"A valid password must be provided" : "Debe fornecer un contrasinal",
"The username is already being used" : "Este nome de usuario xa está a ser usado",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Non hay controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «root»%s.",
"Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»",
"Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «apps»%s ou a desactivación da «appstore» no ficheiro de configuración.",
"Cannot create \"data\" directory (%s)" : "Non é posíbel crear o directorio «data» (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Polo xeral, isto pode ser fixado para <a href=\"%s\" target=\"_blank\">permitirlle ao servidor web acceso de escritura ao directorio «root»</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «root»%s.",
"Setting locale to %s failed" : "Fallou o axuste da configuración local a %s",
"Please install one of these locales on your system and restart your webserver." : "Instale unha destas configuracións locais no seu sistema e reinicie o servidor web.",
"Please ask your server administrator to install the module." : "Pregúntelle ao administrador do servidor pola instalación do módulo.",
"PHP module %s not installed." : "O módulo PHP %s non está instalado.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "O axuste de PHP «%s» non está estabelecido a «%s».",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Facer este axuste en php.ini fará que ownCloud volva executarse",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pregúntelle ao administrador do servidor pola actualización de PHP á versión máis recente. A súa versión de PHP xa non é asistida polas comunidades de ownCloud e PHP.",
- "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para surtir datos de código en bruto. Desde PHP 5.6 esto levará a que PHP proporcione avisos con código perfectamente válido.",
- "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para solucionar este asunto estableza <code>always_populate_raw_post_data</code> a <code>-1</code> no seu php.ini",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para encher datos de código en bruto. Desde PHP 5.6 isto levará a que PHP forneza avisos con código perfectamente correcto.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para solucionar este problema estabeleza <code>always_populate_raw_post_data</code> a <code>-1</code> no seu php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Parece que PHP foi configuración para substituír bloques de documentos en liña. Isto fará que varias aplicacións sexan inaccesíbeis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto probabelmente se debe unha caché/acelerador como Zend OPcache ou eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "Instaláronse os módulos de PHP, mais aínda aparecen listados como perdidos?",
diff --git a/lib/l10n/gl.json b/lib/l10n/gl.json
index c9feefa2f53..71083dd66e1 100644
--- a/lib/l10n/gl.json
+++ b/lib/l10n/gl.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Requírese ownCloud cunha versión inferior a %s.",
"Help" : "Axuda",
"Personal" : "Persoal",
- "Settings" : "Axustes",
"Users" : "Usuarios",
"Admin" : "Administración",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Non é posíbel instalar a aplicación «%s» por non seren compatíbel con esta versión do ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Non é posíbel instalar a aplicación «%s» por mor de non cumprirse as dependencias: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Non é posíbel instalar a aplicación «%s» por non seren compatíbel con esta versión do ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Non é posíbel instalar a aplicación «%s» por mor de non cumprirse as dependencias: %s",
"No app name specified" : "Non se especificou o nome da aplicación",
"Unknown filetype" : "Tipo de ficheiro descoñecido",
"Invalid image" : "Imaxe incorrecta",
@@ -41,9 +40,9 @@
"web services under your control" : "servizos web baixo o seu control",
"App directory already exists" : "Xa existe o directorio da aplicación",
"Can't create app folder. Please fix permissions. %s" : "Non é posíbel crear o cartafol de aplicacións. Corrixa os permisos. %s",
- "No source specified when installing app" : "Non foi especificada ningunha orixe ao instalar aplicacións",
- "No href specified when installing app from http" : "Non foi especificada ningunha href ao instalar aplicacións",
- "No path specified when installing app from local file" : "Non foi especificada ningunha ruta ao instalar aplicacións desde un ficheiro local",
+ "No source specified when installing app" : "Non foi especificada ningunha orixe ao instalar a aplicación",
+ "No href specified when installing app from http" : "Non foi especificada ningunha «href» ao instalar a aplicación",
+ "No path specified when installing app from local file" : "Non foi especificada ningunha ruta ao instalar a aplicación desde un ficheiro local",
"Archives of type %s are not supported" : "Os arquivos do tipo %s non están admitidos",
"Failed to open archive when installing app" : "Non foi posíbel abrir o arquivo ao instalar aplicacións",
"App does not provide an info.xml file" : "A aplicación non fornece un ficheiro info.xml",
@@ -106,19 +105,21 @@
"A valid password must be provided" : "Debe fornecer un contrasinal",
"The username is already being used" : "Este nome de usuario xa está a ser usado",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Non hay controladores de base de datos (sqlite, mysql, ou postgresql) instalados.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «root»%s.",
"Cannot write into \"config\" directory" : "Non é posíbel escribir no directorio «config»",
"Cannot write into \"apps\" directory" : "Non é posíbel escribir no directorio «apps»",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «apps»%s ou a desactivación da «appstore» no ficheiro de configuración.",
"Cannot create \"data\" directory (%s)" : "Non é posíbel crear o directorio «data» (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Polo xeral, isto pode ser fixado para <a href=\"%s\" target=\"_blank\">permitirlle ao servidor web acceso de escritura ao directorio «root»</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Polo xeral, isto pode ser fixado para %spermitirlle ao servidor web acceso de escritura ao directorio «root»%s.",
"Setting locale to %s failed" : "Fallou o axuste da configuración local a %s",
"Please install one of these locales on your system and restart your webserver." : "Instale unha destas configuracións locais no seu sistema e reinicie o servidor web.",
"Please ask your server administrator to install the module." : "Pregúntelle ao administrador do servidor pola instalación do módulo.",
"PHP module %s not installed." : "O módulo PHP %s non está instalado.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "O axuste de PHP «%s» non está estabelecido a «%s».",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Facer este axuste en php.ini fará que ownCloud volva executarse",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Pregúntelle ao administrador do servidor pola actualización de PHP á versión máis recente. A súa versión de PHP xa non é asistida polas comunidades de ownCloud e PHP.",
- "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para surtir datos de código en bruto. Desde PHP 5.6 esto levará a que PHP proporcione avisos con código perfectamente válido.",
- "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para solucionar este asunto estableza <code>always_populate_raw_post_data</code> a <code>-1</code> no seu php.ini",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para encher datos de código en bruto. Desde PHP 5.6 isto levará a que PHP forneza avisos con código perfectamente correcto.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para solucionar este problema estabeleza <code>always_populate_raw_post_data</code> a <code>-1</code> no seu php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Parece que PHP foi configuración para substituír bloques de documentos en liña. Isto fará que varias aplicacións sexan inaccesíbeis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto probabelmente se debe unha caché/acelerador como Zend OPcache ou eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "Instaláronse os módulos de PHP, mais aínda aparecen listados como perdidos?",
diff --git a/lib/l10n/he.js b/lib/l10n/he.js
index 200d3d7035a..23561a4d3a5 100644
--- a/lib/l10n/he.js
+++ b/lib/l10n/he.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "עזרה",
"Personal" : "אישי",
- "Settings" : "הגדרות",
"Users" : "משתמשים",
"Admin" : "מנהל",
"today" : "היום",
diff --git a/lib/l10n/he.json b/lib/l10n/he.json
index 0cadc7beba2..2e1453c7916 100644
--- a/lib/l10n/he.json
+++ b/lib/l10n/he.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "עזרה",
"Personal" : "אישי",
- "Settings" : "הגדרות",
"Users" : "משתמשים",
"Admin" : "מנהל",
"today" : "היום",
diff --git a/lib/l10n/hi.js b/lib/l10n/hi.js
index fdc0ecac1a2..b4741e9aa06 100644
--- a/lib/l10n/hi.js
+++ b/lib/l10n/hi.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "सहयोग",
"Personal" : "यक्तिगत",
- "Settings" : "सेटिंग्स",
"Users" : "उपयोगकर्ता",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
diff --git a/lib/l10n/hi.json b/lib/l10n/hi.json
index b231ead2917..b7347838a83 100644
--- a/lib/l10n/hi.json
+++ b/lib/l10n/hi.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "सहयोग",
"Personal" : "यक्तिगत",
- "Settings" : "सेटिंग्स",
"Users" : "उपयोगकर्ता",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
diff --git a/lib/l10n/hr.js b/lib/l10n/hr.js
index 3c2df29120a..6c1f5e1eaf2 100644
--- a/lib/l10n/hr.js
+++ b/lib/l10n/hr.js
@@ -16,11 +16,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud sa verzijom manjom od %s je potrebna.",
"Help" : "Pomoć",
"Personal" : "Osobno",
- "Settings" : "Postavke",
"Users" : "Korisnici",
"Admin" : "Admin",
"Recommended" : "Preporuceno",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikacija \\\"%s\\\" se ne može instalirati jer nije kompatibilna s ovom verzijom ownClouda.",
"No app name specified" : "Nikakav naziv aplikacije nije naveden",
"Unknown filetype" : "Vrsta datoteke nepoznata",
"Invalid image" : "Neispravna slika",
@@ -102,12 +100,12 @@ OC.L10N.register(
"A valid password must be provided" : "Nužno je navesti ispravnu lozinku",
"The username is already being used" : "Korisničko ime se već koristi",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Pogonski programi baze podataka (sqlite, mysql, ili postgresql) nisu instalirani.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dozvole se obično mogu popraviti %sdavanjem pristupa web poslužitelju za pisanje u korijenskom direktoriju%s",
"Cannot write into \"config\" directory" : "Nije moguće zapisivati u \"config\" direktorij",
"Cannot write into \"apps\" directory" : "Nije moguće zapisivati u \"apps\" direktorij",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ovo se obično može popraviti %sdavanjem pristupa web poslužitelju za pisanje u apps direktorij%sili isključivanjem appstorea u konfiguracijskoj datoteci.",
"Cannot create \"data\" directory (%s)" : "Kreiranje \"data\" direktorija (%s) nije moguće",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ovo obično može popraviti <a href=\"%s\"target=\"_blank\">davanjem pristupa web poslužiteljuza pisanje u korijenskom direktoriju</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dozvole se obično mogu popraviti %sdavanjem pristupa web poslužitelju za pisanje u korijenskom direktoriju%s",
"Setting locale to %s failed" : "Postavljanje regionalne sheme u %s nije uspjelo",
"Please install one of these locales on your system and restart your webserver." : "Molimo instalirajte jednu od ovih regionalnih shema u svoj sustav i ponovno pokrenite svoj web poslužitelj.",
"Please ask your server administrator to install the module." : "Molimo zamolite svog administratora poslužitelja da instalira modul.",
diff --git a/lib/l10n/hr.json b/lib/l10n/hr.json
index 372d5515966..8b0b82aed62 100644
--- a/lib/l10n/hr.json
+++ b/lib/l10n/hr.json
@@ -14,11 +14,9 @@
"ownCloud with a version lower than %s is required." : "ownCloud sa verzijom manjom od %s je potrebna.",
"Help" : "Pomoć",
"Personal" : "Osobno",
- "Settings" : "Postavke",
"Users" : "Korisnici",
"Admin" : "Admin",
"Recommended" : "Preporuceno",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikacija \\\"%s\\\" se ne može instalirati jer nije kompatibilna s ovom verzijom ownClouda.",
"No app name specified" : "Nikakav naziv aplikacije nije naveden",
"Unknown filetype" : "Vrsta datoteke nepoznata",
"Invalid image" : "Neispravna slika",
@@ -100,12 +98,12 @@
"A valid password must be provided" : "Nužno je navesti ispravnu lozinku",
"The username is already being used" : "Korisničko ime se već koristi",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Pogonski programi baze podataka (sqlite, mysql, ili postgresql) nisu instalirani.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dozvole se obično mogu popraviti %sdavanjem pristupa web poslužitelju za pisanje u korijenskom direktoriju%s",
"Cannot write into \"config\" directory" : "Nije moguće zapisivati u \"config\" direktorij",
"Cannot write into \"apps\" directory" : "Nije moguće zapisivati u \"apps\" direktorij",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ovo se obično može popraviti %sdavanjem pristupa web poslužitelju za pisanje u apps direktorij%sili isključivanjem appstorea u konfiguracijskoj datoteci.",
"Cannot create \"data\" directory (%s)" : "Kreiranje \"data\" direktorija (%s) nije moguće",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ovo obično može popraviti <a href=\"%s\"target=\"_blank\">davanjem pristupa web poslužiteljuza pisanje u korijenskom direktoriju</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dozvole se obično mogu popraviti %sdavanjem pristupa web poslužitelju za pisanje u korijenskom direktoriju%s",
"Setting locale to %s failed" : "Postavljanje regionalne sheme u %s nije uspjelo",
"Please install one of these locales on your system and restart your webserver." : "Molimo instalirajte jednu od ovih regionalnih shema u svoj sustav i ponovno pokrenite svoj web poslužitelj.",
"Please ask your server administrator to install the module." : "Molimo zamolite svog administratora poslužitelja da instalira modul.",
diff --git a/lib/l10n/hu_HU.js b/lib/l10n/hu_HU.js
index f1f645b1616..4eef9ecb5ca 100644
--- a/lib/l10n/hu_HU.js
+++ b/lib/l10n/hu_HU.js
@@ -10,11 +10,9 @@ OC.L10N.register(
"PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.",
"Help" : "Súgó",
"Personal" : "Személyes",
- "Settings" : "Beállítások",
"Users" : "Felhasználók",
"Admin" : "Adminsztráció",
"Recommended" : "Ajánlott",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : " \\\"%s\\\" alkalmazás nem telepíthető, mert nem kompatibilis az ownCloud jelen változatával.",
"No app name specified" : "Nincs az alkalmazás név megadva.",
"Unknown filetype" : "Ismeretlen file tipús",
"Invalid image" : "Hibás kép",
@@ -94,12 +92,12 @@ OC.L10N.register(
"A valid password must be provided" : "Érvényes jelszót kell megadnia",
"The username is already being used" : "Ez a bejelentkezési név már foglalt",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nincs telepítve adatbázis-meghajtóprogram (sqlite, mysql vagy postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Az elérési problémák rendszerint megoldhatók azzal, ha a %swebszervernek írásjogot adunk a gyökérkönyvtárra%s.",
"Cannot write into \"config\" directory" : "Nem írható a \"config\" könyvtár",
"Cannot write into \"apps\" directory" : "Nem írható az \"apps\" könyvtár",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ez rendszerint úgy oldható meg, hogy %sírási jogot adunk a webszervernek az app könyvtárra%s, vagy letiltjuk a config fájlban az appstore használatát.",
"Cannot create \"data\" directory (%s)" : "Nem sikerült létrehozni a \"data\" könyvtárt (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ez rendszerint úgy oldható meg, hogy <a href=\"%s\" target=\"_blank\">írásjogot adunk a webszervernek a gyökérkönyvtárra</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Az elérési problémák rendszerint megoldhatók azzal, ha a %swebszervernek írásjogot adunk a gyökérkönyvtárra%s.",
"Setting locale to %s failed" : "A lokalizáció %s-re való állítása nem sikerült",
"Please install one of these locales on your system and restart your webserver." : "Kérjük állítsa be a következő lokalizációk valamelyikét a rendszeren és indítsa újra a webszervert!",
"Please ask your server administrator to install the module." : "Kérje meg a rendszergazdát, hogy telepítse a modult!",
diff --git a/lib/l10n/hu_HU.json b/lib/l10n/hu_HU.json
index ac09b9d84ef..bf002692f63 100644
--- a/lib/l10n/hu_HU.json
+++ b/lib/l10n/hu_HU.json
@@ -8,11 +8,9 @@
"PHP %s or higher is required." : "PHP %s vagy ennél újabb szükséges.",
"Help" : "Súgó",
"Personal" : "Személyes",
- "Settings" : "Beállítások",
"Users" : "Felhasználók",
"Admin" : "Adminsztráció",
"Recommended" : "Ajánlott",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : " \\\"%s\\\" alkalmazás nem telepíthető, mert nem kompatibilis az ownCloud jelen változatával.",
"No app name specified" : "Nincs az alkalmazás név megadva.",
"Unknown filetype" : "Ismeretlen file tipús",
"Invalid image" : "Hibás kép",
@@ -92,12 +90,12 @@
"A valid password must be provided" : "Érvényes jelszót kell megadnia",
"The username is already being used" : "Ez a bejelentkezési név már foglalt",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nincs telepítve adatbázis-meghajtóprogram (sqlite, mysql vagy postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Az elérési problémák rendszerint megoldhatók azzal, ha a %swebszervernek írásjogot adunk a gyökérkönyvtárra%s.",
"Cannot write into \"config\" directory" : "Nem írható a \"config\" könyvtár",
"Cannot write into \"apps\" directory" : "Nem írható az \"apps\" könyvtár",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ez rendszerint úgy oldható meg, hogy %sírási jogot adunk a webszervernek az app könyvtárra%s, vagy letiltjuk a config fájlban az appstore használatát.",
"Cannot create \"data\" directory (%s)" : "Nem sikerült létrehozni a \"data\" könyvtárt (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ez rendszerint úgy oldható meg, hogy <a href=\"%s\" target=\"_blank\">írásjogot adunk a webszervernek a gyökérkönyvtárra</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Az elérési problémák rendszerint megoldhatók azzal, ha a %swebszervernek írásjogot adunk a gyökérkönyvtárra%s.",
"Setting locale to %s failed" : "A lokalizáció %s-re való állítása nem sikerült",
"Please install one of these locales on your system and restart your webserver." : "Kérjük állítsa be a következő lokalizációk valamelyikét a rendszeren és indítsa újra a webszervert!",
"Please ask your server administrator to install the module." : "Kérje meg a rendszergazdát, hogy telepítse a modult!",
diff --git a/lib/l10n/ia.js b/lib/l10n/ia.js
index 345df54ec33..336aff70234 100644
--- a/lib/l10n/ia.js
+++ b/lib/l10n/ia.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Adjuta",
"Personal" : "Personal",
- "Settings" : "Configurationes",
"Users" : "Usatores",
"Admin" : "Administration",
"Unknown filetype" : "Typo de file incognite",
diff --git a/lib/l10n/ia.json b/lib/l10n/ia.json
index 3f722b77a0d..b768db5aed2 100644
--- a/lib/l10n/ia.json
+++ b/lib/l10n/ia.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Adjuta",
"Personal" : "Personal",
- "Settings" : "Configurationes",
"Users" : "Usatores",
"Admin" : "Administration",
"Unknown filetype" : "Typo de file incognite",
diff --git a/lib/l10n/id.js b/lib/l10n/id.js
index 072380ddf86..58010a7d10d 100644
--- a/lib/l10n/id.js
+++ b/lib/l10n/id.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Diperlukan ownCloud dengan versi yang lebih rendah dari %s.",
"Help" : "Bantuan",
"Personal" : "Pribadi",
- "Settings" : "Pengaturan",
"Users" : "Pengguna",
"Admin" : "Admin",
"Recommended" : "Direkomendasikan",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikasi \\\"%s\\\" tidak dapat diinstal karena tidak kompatibel denga versi ownCloud ini.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikasi \\\"%s\\\" tidak dapat diinstal karena ketergantungan berikut tidak terpenuhi: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Aplikasi \"%s\" tidak dapat diinstal karena tidak kompatibel dengan ownCloud versi ini.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikasi \"%s\" tidak dapat diinstal karena dependensi berikut belum terpenuhi: %s",
"No app name specified" : "Tidak ada nama apl yang ditentukan",
"Unknown filetype" : "Tipe berkas tak dikenal",
"Invalid image" : "Gambar tidak sah",
@@ -103,17 +102,19 @@ OC.L10N.register(
"A valid password must be provided" : "Tuliskan sandi yang valid",
"The username is already being used" : "Nama pengguna ini telah digunakan",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Tidak ada driver (sqlite, mysql, or postgresql) yang terinstal.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Perizinan biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori root.",
"Cannot write into \"config\" directory" : "Tidak dapat menulis kedalam direktori \"config\"",
"Cannot write into \"apps\" directory" : "Tidak dapat menulis kedalam direktori \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Hal ini biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori apps atau menonaktifkan toko aplikasi didalam berkas config.",
"Cannot create \"data\" directory (%s)" : "Tidak dapat membuat direktori (%s) \"data\"",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Hal ini biasanya dapat diperbaiki dengan <a href=\"%s\" target=\"_blank\">memberikan akses tulis bagi situs web ke direktori root</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Perizinan biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori root.",
"Setting locale to %s failed" : "Pengaturan lokal ke %s gagal",
"Please install one of these locales on your system and restart your webserver." : "Mohon instal paling tidak satu lokal pada sistem Anda dan jalankan ulang server web.",
"Please ask your server administrator to install the module." : "Mohon tanyakan administrator Anda untuk menginstal module.",
"PHP module %s not installed." : "Module PHP %s tidak terinstal.",
- "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mohon tanyakan administrator Anda untuk memperbarui PHP ke versi terkini. Versi PHP Anda tidak lagi didukung oleh ownCloud dan komunitas PHP.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Pengaturan PHP \"%s\" tidak diatur ke \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Menyesuaikan pengaturan ini dalam php.ini akan menyebabkan ownCloud berjalan kembali",
+ "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Silakan minta administrator Anda untuk memperbarui PHP ke versi terkini. Versi PHP Anda tidak lagi didukung oleh ownCloud dan komunitas PHP.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Untuk memperbaiki masalah ini, atur <code>always_populate_raw_post_data</code> menjadi <code>-1</code> pada berkas php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Tampaknya pengaturan PHP strip inline doc blocks. Hal ini akan membuat beberapa aplikasi inti tidak dapat diakses.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Hal ini kemungkinan disebabkan oleh cache/akselerator seperti Zend OPcache atau eAccelerator.",
@@ -126,7 +127,7 @@ OC.L10N.register(
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Mohon ubah perizinan menjadi 0770 sehingga direktori tersebut tidak dapat dilihat oleh pengguna lain.",
"Data directory (%s) is readable by other users" : "Direktori data (%s) dapat dibaca oleh pengguna lain",
"Data directory (%s) is invalid" : "Direktori data (%s) tidak sah",
- "Please check that the data directory contains a file \".ocdata\" in its root." : "Mohon periksa apakah direktori data berisi sebuah berkas \".ocdata\".",
+ "Please check that the data directory contains a file \".ocdata\" in its root." : "Mohon periksa apakah direktori data berisi sebuah berkas \".ocdata\" di direktori induknya.",
"Could not obtain lock type %d on \"%s\"." : "Tidak bisa memperoleh jenis kunci %d pada \"%s\"."
},
"nplurals=1; plural=0;");
diff --git a/lib/l10n/id.json b/lib/l10n/id.json
index 6e9271e4ec5..72e20842b49 100644
--- a/lib/l10n/id.json
+++ b/lib/l10n/id.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Diperlukan ownCloud dengan versi yang lebih rendah dari %s.",
"Help" : "Bantuan",
"Personal" : "Pribadi",
- "Settings" : "Pengaturan",
"Users" : "Pengguna",
"Admin" : "Admin",
"Recommended" : "Direkomendasikan",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikasi \\\"%s\\\" tidak dapat diinstal karena tidak kompatibel denga versi ownCloud ini.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikasi \\\"%s\\\" tidak dapat diinstal karena ketergantungan berikut tidak terpenuhi: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Aplikasi \"%s\" tidak dapat diinstal karena tidak kompatibel dengan ownCloud versi ini.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikasi \"%s\" tidak dapat diinstal karena dependensi berikut belum terpenuhi: %s",
"No app name specified" : "Tidak ada nama apl yang ditentukan",
"Unknown filetype" : "Tipe berkas tak dikenal",
"Invalid image" : "Gambar tidak sah",
@@ -101,17 +100,19 @@
"A valid password must be provided" : "Tuliskan sandi yang valid",
"The username is already being used" : "Nama pengguna ini telah digunakan",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Tidak ada driver (sqlite, mysql, or postgresql) yang terinstal.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Perizinan biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori root.",
"Cannot write into \"config\" directory" : "Tidak dapat menulis kedalam direktori \"config\"",
"Cannot write into \"apps\" directory" : "Tidak dapat menulis kedalam direktori \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Hal ini biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori apps atau menonaktifkan toko aplikasi didalam berkas config.",
"Cannot create \"data\" directory (%s)" : "Tidak dapat membuat direktori (%s) \"data\"",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Hal ini biasanya dapat diperbaiki dengan <a href=\"%s\" target=\"_blank\">memberikan akses tulis bagi situs web ke direktori root</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Perizinan biasanya dapat diperbaiki dengan %s memberikan akses tulis bagi situs web ke %s direktori root.",
"Setting locale to %s failed" : "Pengaturan lokal ke %s gagal",
"Please install one of these locales on your system and restart your webserver." : "Mohon instal paling tidak satu lokal pada sistem Anda dan jalankan ulang server web.",
"Please ask your server administrator to install the module." : "Mohon tanyakan administrator Anda untuk menginstal module.",
"PHP module %s not installed." : "Module PHP %s tidak terinstal.",
- "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Mohon tanyakan administrator Anda untuk memperbarui PHP ke versi terkini. Versi PHP Anda tidak lagi didukung oleh ownCloud dan komunitas PHP.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Pengaturan PHP \"%s\" tidak diatur ke \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Menyesuaikan pengaturan ini dalam php.ini akan menyebabkan ownCloud berjalan kembali",
+ "Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Silakan minta administrator Anda untuk memperbarui PHP ke versi terkini. Versi PHP Anda tidak lagi didukung oleh ownCloud dan komunitas PHP.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Untuk memperbaiki masalah ini, atur <code>always_populate_raw_post_data</code> menjadi <code>-1</code> pada berkas php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Tampaknya pengaturan PHP strip inline doc blocks. Hal ini akan membuat beberapa aplikasi inti tidak dapat diakses.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Hal ini kemungkinan disebabkan oleh cache/akselerator seperti Zend OPcache atau eAccelerator.",
@@ -124,7 +125,7 @@
"Please change the permissions to 0770 so that the directory cannot be listed by other users." : "Mohon ubah perizinan menjadi 0770 sehingga direktori tersebut tidak dapat dilihat oleh pengguna lain.",
"Data directory (%s) is readable by other users" : "Direktori data (%s) dapat dibaca oleh pengguna lain",
"Data directory (%s) is invalid" : "Direktori data (%s) tidak sah",
- "Please check that the data directory contains a file \".ocdata\" in its root." : "Mohon periksa apakah direktori data berisi sebuah berkas \".ocdata\".",
+ "Please check that the data directory contains a file \".ocdata\" in its root." : "Mohon periksa apakah direktori data berisi sebuah berkas \".ocdata\" di direktori induknya.",
"Could not obtain lock type %d on \"%s\"." : "Tidak bisa memperoleh jenis kunci %d pada \"%s\"."
},"pluralForm" :"nplurals=1; plural=0;"
} \ No newline at end of file
diff --git a/lib/l10n/is.js b/lib/l10n/is.js
index 712b8bbd10a..25c1b18a47c 100644
--- a/lib/l10n/is.js
+++ b/lib/l10n/is.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Hjálp",
"Personal" : "Um mig",
- "Settings" : "Stillingar",
"Users" : "Notendur",
"Admin" : "Stjórnun",
"today" : "í dag",
diff --git a/lib/l10n/is.json b/lib/l10n/is.json
index fd0291c96c3..8a320228277 100644
--- a/lib/l10n/is.json
+++ b/lib/l10n/is.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Hjálp",
"Personal" : "Um mig",
- "Settings" : "Stillingar",
"Users" : "Notendur",
"Admin" : "Stjórnun",
"today" : "í dag",
diff --git a/lib/l10n/it.js b/lib/l10n/it.js
index 229bb8bd2ec..8903b87ae34 100644
--- a/lib/l10n/it.js
+++ b/lib/l10n/it.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Richiesta una versione di ownCloud minore di %s.",
"Help" : "Aiuto",
"Personal" : "Personale",
- "Settings" : "Impostazioni",
"Users" : "Utenti",
"Admin" : "Admin",
"Recommended" : "Consigliata",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'applicazione \\\"%s\\\" non può essere installata poiché non è compatibile con questa versione di ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'applicazione \\\"%s\\\" non può essere installata poiché le seguenti dipendenze non sono soddisfatte: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "L'applicazione \"%s\" non può essere installata poiché non è compatibile con questa versione di ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'applicazione \"%s\" non può essere installata poiché le seguenti dipendenze non sono soddisfatte: %s",
"No app name specified" : "Il nome dell'applicazione non è specificato",
"Unknown filetype" : "Tipo di file sconosciuto",
"Invalid image" : "Immagine non valida",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "Deve essere fornita una password valida",
"The username is already being used" : "Il nome utente è già utilizzato",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nessun driver di database (sqlite, mysql o postgresql) installato",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "I permessi possono essere normalmente corretti %sfornendo al server web accesso in scrittura alla cartella radice%s.",
"Cannot write into \"config\" directory" : "Impossibile scrivere nella cartella \"config\"",
"Cannot write into \"apps\" directory" : "Impossibile scrivere nella cartella \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ciò può essere normalmente corretto %sfornendo al server web accesso in scrittura alla cartella \"apps\"%s o disabilitando il negozio di applicazioni nel file di configurazione.",
"Cannot create \"data\" directory (%s)" : "Impossibile creare la cartella \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ciò può essere normalmente corretto <a href=\"%s\" target=\"_blank\">fornendo al server web accesso in scrittura alla cartella radice</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "I permessi possono essere normalmente corretti %sfornendo al server web accesso in scrittura alla cartella radice%s.",
"Setting locale to %s failed" : "L'impostazione della localizzazione a %s non è riuscita",
"Please install one of these locales on your system and restart your webserver." : "Installa una delle seguenti localizzazioni sul tuo sistema e riavvia il server web.",
"Please ask your server administrator to install the module." : "Chiedi all'amministratore del tuo server di installare il modulo.",
"PHP module %s not installed." : "Il modulo PHP %s non è installato.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "L'impostazione \"%s\" di PHP non è configurata a \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "La modifica di questa impostazione nel file php.ini permetterà nuovamente l'esecuzione di ownCloud",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Chiedi al tuo amministratore di aggiornare PHP all'ultima versione. La tua versione di PHP non è più supportata da ownCloud e dalla comunità di PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP è configurato per popolare dati grezzi di POST. A partire da PHP 5.6 saranno generati avvisi di PHP relativi a codice completamente valido.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Per correggere questo problema, imposta <code>always_populate_raw_post_data</code> a <code>-1</code> nel tuo php.ini",
diff --git a/lib/l10n/it.json b/lib/l10n/it.json
index 8fca8b4684c..97fd77545f5 100644
--- a/lib/l10n/it.json
+++ b/lib/l10n/it.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Richiesta una versione di ownCloud minore di %s.",
"Help" : "Aiuto",
"Personal" : "Personale",
- "Settings" : "Impostazioni",
"Users" : "Utenti",
"Admin" : "Admin",
"Recommended" : "Consigliata",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "L'applicazione \\\"%s\\\" non può essere installata poiché non è compatibile con questa versione di ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'applicazione \\\"%s\\\" non può essere installata poiché le seguenti dipendenze non sono soddisfatte: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "L'applicazione \"%s\" non può essere installata poiché non è compatibile con questa versione di ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "L'applicazione \"%s\" non può essere installata poiché le seguenti dipendenze non sono soddisfatte: %s",
"No app name specified" : "Il nome dell'applicazione non è specificato",
"Unknown filetype" : "Tipo di file sconosciuto",
"Invalid image" : "Immagine non valida",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "Deve essere fornita una password valida",
"The username is already being used" : "Il nome utente è già utilizzato",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nessun driver di database (sqlite, mysql o postgresql) installato",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "I permessi possono essere normalmente corretti %sfornendo al server web accesso in scrittura alla cartella radice%s.",
"Cannot write into \"config\" directory" : "Impossibile scrivere nella cartella \"config\"",
"Cannot write into \"apps\" directory" : "Impossibile scrivere nella cartella \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Ciò può essere normalmente corretto %sfornendo al server web accesso in scrittura alla cartella \"apps\"%s o disabilitando il negozio di applicazioni nel file di configurazione.",
"Cannot create \"data\" directory (%s)" : "Impossibile creare la cartella \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Ciò può essere normalmente corretto <a href=\"%s\" target=\"_blank\">fornendo al server web accesso in scrittura alla cartella radice</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "I permessi possono essere normalmente corretti %sfornendo al server web accesso in scrittura alla cartella radice%s.",
"Setting locale to %s failed" : "L'impostazione della localizzazione a %s non è riuscita",
"Please install one of these locales on your system and restart your webserver." : "Installa una delle seguenti localizzazioni sul tuo sistema e riavvia il server web.",
"Please ask your server administrator to install the module." : "Chiedi all'amministratore del tuo server di installare il modulo.",
"PHP module %s not installed." : "Il modulo PHP %s non è installato.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "L'impostazione \"%s\" di PHP non è configurata a \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "La modifica di questa impostazione nel file php.ini permetterà nuovamente l'esecuzione di ownCloud",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Chiedi al tuo amministratore di aggiornare PHP all'ultima versione. La tua versione di PHP non è più supportata da ownCloud e dalla comunità di PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP è configurato per popolare dati grezzi di POST. A partire da PHP 5.6 saranno generati avvisi di PHP relativi a codice completamente valido.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Per correggere questo problema, imposta <code>always_populate_raw_post_data</code> a <code>-1</code> nel tuo php.ini",
diff --git a/lib/l10n/ja.js b/lib/l10n/ja.js
index bf0e4f4b4cc..cbba8b1b418 100644
--- a/lib/l10n/ja.js
+++ b/lib/l10n/ja.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud %s 以下が必要です。",
"Help" : "ヘルプ",
"Personal" : "個人",
- "Settings" : "設定",
"Users" : "ユーザー",
"Admin" : "管理",
- "Recommended" : "推奨",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "アプリ \\\"%s\\\" をインストールできません。現在のownCloudのバージョンと互換性がありません。",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "次の依存関係は無いため\\\"%s\\\"のアプリをインストールできません:%s",
+ "Recommended" : "おすすめ",
"No app name specified" : "アプリ名が未指定",
"Unknown filetype" : "不明なファイルタイプ",
"Invalid image" : "無効な画像",
@@ -108,16 +105,18 @@ OC.L10N.register(
"A valid password must be provided" : "有効なパスワードを指定する必要があります",
"The username is already being used" : "ユーザー名はすでに使われています",
"No database drivers (sqlite, mysql, or postgresql) installed." : "データベースドライバー (sqlite, mysql, postgresql) がインストールされていません。",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "多くの場合、パーミッションは %s Webサーバーにルートディレクトリ %s への書き込み権限を与えることで解決できます。",
"Cannot write into \"config\" directory" : "\"config\" ディレクトリに書き込みができません",
"Cannot write into \"apps\" directory" : "\"apps\" ディレクトリに書き込みができません",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "多くの場合、これは %s Webサーバーにappsディレクトリ %s への書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。",
"Cannot create \"data\" directory (%s)" : "\"data\" ディレクトリ (%s) を作成できません",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "多くの場合、これは<a href=\"%s\" target=\"_blank\">Webサーバーにルートディレクトリへの書き込み権限を与える</a>ことで解決できます。",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "多くの場合、パーミッションは %s Webサーバーにルートディレクトリ %s への書き込み権限を与えることで解決できます。",
"Setting locale to %s failed" : "ロケールを %s に設定できませんでした",
"Please install one of these locales on your system and restart your webserver." : "これらのロケールのうちいずれかをシステムにインストールし、Webサーバーを再起動してください。",
"Please ask your server administrator to install the module." : "サーバー管理者にモジュールのインストールを依頼してください。",
"PHP module %s not installed." : "PHP のモジュール %s がインストールされていません。",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP設定の\"%s\"は \"%s\"に設定されていません",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "php.ini 中の設定を調整するとownCloudはもう一度動作するでしょう。 ",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "PHPを最新バージョンに更新するようサーバー管理者に依頼してください。現在のPHPのバージョンは、ownCloudおよびPHPコミュニティでサポートされていません。",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP で、populate raw post data が設定されています。この非推奨コードに対してPHP 5.6 から PHPの警告が表示されるようになりました。",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "この問題を修正するには、php.ini ファイルの<code>always_populate_raw_post_data</code> を <code>-1</code> に設定してください。",
diff --git a/lib/l10n/ja.json b/lib/l10n/ja.json
index 6e3749cd3b7..5eedce26af9 100644
--- a/lib/l10n/ja.json
+++ b/lib/l10n/ja.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "ownCloud %s 以下が必要です。",
"Help" : "ヘルプ",
"Personal" : "個人",
- "Settings" : "設定",
"Users" : "ユーザー",
"Admin" : "管理",
- "Recommended" : "推奨",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "アプリ \\\"%s\\\" をインストールできません。現在のownCloudのバージョンと互換性がありません。",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "次の依存関係は無いため\\\"%s\\\"のアプリをインストールできません:%s",
+ "Recommended" : "おすすめ",
"No app name specified" : "アプリ名が未指定",
"Unknown filetype" : "不明なファイルタイプ",
"Invalid image" : "無効な画像",
@@ -106,16 +103,18 @@
"A valid password must be provided" : "有効なパスワードを指定する必要があります",
"The username is already being used" : "ユーザー名はすでに使われています",
"No database drivers (sqlite, mysql, or postgresql) installed." : "データベースドライバー (sqlite, mysql, postgresql) がインストールされていません。",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "多くの場合、パーミッションは %s Webサーバーにルートディレクトリ %s への書き込み権限を与えることで解決できます。",
"Cannot write into \"config\" directory" : "\"config\" ディレクトリに書き込みができません",
"Cannot write into \"apps\" directory" : "\"apps\" ディレクトリに書き込みができません",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "多くの場合、これは %s Webサーバーにappsディレクトリ %s への書き込み権限を与えるか、設定ファイルでアプリストアを無効化することで解決できます。",
"Cannot create \"data\" directory (%s)" : "\"data\" ディレクトリ (%s) を作成できません",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "多くの場合、これは<a href=\"%s\" target=\"_blank\">Webサーバーにルートディレクトリへの書き込み権限を与える</a>ことで解決できます。",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "多くの場合、パーミッションは %s Webサーバーにルートディレクトリ %s への書き込み権限を与えることで解決できます。",
"Setting locale to %s failed" : "ロケールを %s に設定できませんでした",
"Please install one of these locales on your system and restart your webserver." : "これらのロケールのうちいずれかをシステムにインストールし、Webサーバーを再起動してください。",
"Please ask your server administrator to install the module." : "サーバー管理者にモジュールのインストールを依頼してください。",
"PHP module %s not installed." : "PHP のモジュール %s がインストールされていません。",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP設定の\"%s\"は \"%s\"に設定されていません",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "php.ini 中の設定を調整するとownCloudはもう一度動作するでしょう。 ",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "PHPを最新バージョンに更新するようサーバー管理者に依頼してください。現在のPHPのバージョンは、ownCloudおよびPHPコミュニティでサポートされていません。",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP で、populate raw post data が設定されています。この非推奨コードに対してPHP 5.6 から PHPの警告が表示されるようになりました。",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "この問題を修正するには、php.ini ファイルの<code>always_populate_raw_post_data</code> を <code>-1</code> に設定してください。",
diff --git a/lib/l10n/ka_GE.js b/lib/l10n/ka_GE.js
index 63b886e6ce1..b10774e806c 100644
--- a/lib/l10n/ka_GE.js
+++ b/lib/l10n/ka_GE.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "დახმარება",
"Personal" : "პირადი",
- "Settings" : "პარამეტრები",
"Users" : "მომხმარებელი",
"Admin" : "ადმინისტრატორი",
"today" : "დღეს",
diff --git a/lib/l10n/ka_GE.json b/lib/l10n/ka_GE.json
index 0371cfcfc90..29f7be8e261 100644
--- a/lib/l10n/ka_GE.json
+++ b/lib/l10n/ka_GE.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "დახმარება",
"Personal" : "პირადი",
- "Settings" : "პარამეტრები",
"Users" : "მომხმარებელი",
"Admin" : "ადმინისტრატორი",
"today" : "დღეს",
diff --git a/lib/l10n/km.js b/lib/l10n/km.js
index 4f96e661179..5bdbc74176b 100644
--- a/lib/l10n/km.js
+++ b/lib/l10n/km.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "ជំនួយ",
"Personal" : "ផ្ទាល់​ខ្លួន",
- "Settings" : "ការកំណត់",
"Users" : "អ្នកប្រើ",
"Admin" : "អ្នក​គ្រប់​គ្រង",
"No app name specified" : "មិន​បាន​បញ្ជាក់​ឈ្មោះ​កម្មវិធី",
diff --git a/lib/l10n/km.json b/lib/l10n/km.json
index 9c1010b0020..690d937a11e 100644
--- a/lib/l10n/km.json
+++ b/lib/l10n/km.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "ជំនួយ",
"Personal" : "ផ្ទាល់​ខ្លួន",
- "Settings" : "ការកំណត់",
"Users" : "អ្នកប្រើ",
"Admin" : "អ្នក​គ្រប់​គ្រង",
"No app name specified" : "មិន​បាន​បញ្ជាក់​ឈ្មោះ​កម្មវិធី",
diff --git a/lib/l10n/kn.js b/lib/l10n/kn.js
index 75314b0abea..7bcde5e4d6a 100644
--- a/lib/l10n/kn.js
+++ b/lib/l10n/kn.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "ಸಹಾಯ",
"Personal" : "ವೈಯಕ್ತಿಕ",
- "Settings" : "ಆಯ್ಕೆ",
"Users" : "ಬಳಕೆದಾರರು",
"Admin" : "ನಿರ್ವಹಕ",
"Recommended" : "ಶಿಫಾರಸು ಮಾಡಲಾಗಿದೆ",
diff --git a/lib/l10n/kn.json b/lib/l10n/kn.json
index ae5f3359a13..28b9d581d93 100644
--- a/lib/l10n/kn.json
+++ b/lib/l10n/kn.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "ಸಹಾಯ",
"Personal" : "ವೈಯಕ್ತಿಕ",
- "Settings" : "ಆಯ್ಕೆ",
"Users" : "ಬಳಕೆದಾರರು",
"Admin" : "ನಿರ್ವಹಕ",
"Recommended" : "ಶಿಫಾರಸು ಮಾಡಲಾಗಿದೆ",
diff --git a/lib/l10n/ko.js b/lib/l10n/ko.js
index 41f87248eef..fab21578445 100644
--- a/lib/l10n/ko.js
+++ b/lib/l10n/ko.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud 버전 %s 미만이 필요합니다.",
"Help" : "도움말",
"Personal" : "개인",
- "Settings" : "설정",
"Users" : "사용자",
"Admin" : "관리자",
"Recommended" : "추천",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "현재 ownCloud 버전과 호환되지 않기 때문에 앱 \\\"%s\\\"을(를) 설치할 수 없습니다..",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "다음 의존성을 만족할 수 없기 때문에 앱 \\\"%s\\\"을(를) 설치할 수 없습니다: %s",
"No app name specified" : "앱 이름이 지정되지 않았습니다.",
"Unknown filetype" : "알 수 없는 파일 형식",
"Invalid image" : "잘못된 사진",
@@ -108,12 +105,12 @@ OC.L10N.register(
"A valid password must be provided" : "올바른 암호를 입력해야 합니다",
"The username is already being used" : "사용자 이름이 이미 존재합니다",
"No database drivers (sqlite, mysql, or postgresql) installed." : "데이터베이스 드라이버(sqlite, mysql, postgresql)가 설치되지 않았습니다.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "%s루트 디렉터리에 웹 서버 쓰기 권한%s을 주면 해결됩니다.",
"Cannot write into \"config\" directory" : "\"config\" 디렉터리에 기록할 수 없습니다",
"Cannot write into \"apps\" directory" : "\"apps\" 디렉터리에 기록할 수 없습니다",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "%sapps 디렉터리에 웹 서버 쓰기 권한%s을 주거나 설정 파일에서 앱 스토어를 비활성화하면 해결됩니다.",
"Cannot create \"data\" directory (%s)" : "\"data\" 디렉터리를 만들 수 없음(%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "<a href=\"%s\" target=\"_blank\">루트 디렉터리에 웹 서버 쓰기 권한</a>을 주면 해결됩니다.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "%s루트 디렉터리에 웹 서버 쓰기 권한%s을 주면 해결됩니다.",
"Setting locale to %s failed" : "로캘을 %s(으)로 설정할 수 없음",
"Please install one of these locales on your system and restart your webserver." : "다음 중 하나 이상의 로캘을 시스템에 설치하고 웹 서버를 다시 시작하십시오.",
"Please ask your server administrator to install the module." : "서버 관리자에게 모듈 설치를 요청하십시오.",
diff --git a/lib/l10n/ko.json b/lib/l10n/ko.json
index 768dbeafefe..d174c9f4c28 100644
--- a/lib/l10n/ko.json
+++ b/lib/l10n/ko.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "ownCloud 버전 %s 미만이 필요합니다.",
"Help" : "도움말",
"Personal" : "개인",
- "Settings" : "설정",
"Users" : "사용자",
"Admin" : "관리자",
"Recommended" : "추천",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "현재 ownCloud 버전과 호환되지 않기 때문에 앱 \\\"%s\\\"을(를) 설치할 수 없습니다..",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "다음 의존성을 만족할 수 없기 때문에 앱 \\\"%s\\\"을(를) 설치할 수 없습니다: %s",
"No app name specified" : "앱 이름이 지정되지 않았습니다.",
"Unknown filetype" : "알 수 없는 파일 형식",
"Invalid image" : "잘못된 사진",
@@ -106,12 +103,12 @@
"A valid password must be provided" : "올바른 암호를 입력해야 합니다",
"The username is already being used" : "사용자 이름이 이미 존재합니다",
"No database drivers (sqlite, mysql, or postgresql) installed." : "데이터베이스 드라이버(sqlite, mysql, postgresql)가 설치되지 않았습니다.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "%s루트 디렉터리에 웹 서버 쓰기 권한%s을 주면 해결됩니다.",
"Cannot write into \"config\" directory" : "\"config\" 디렉터리에 기록할 수 없습니다",
"Cannot write into \"apps\" directory" : "\"apps\" 디렉터리에 기록할 수 없습니다",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "%sapps 디렉터리에 웹 서버 쓰기 권한%s을 주거나 설정 파일에서 앱 스토어를 비활성화하면 해결됩니다.",
"Cannot create \"data\" directory (%s)" : "\"data\" 디렉터리를 만들 수 없음(%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "<a href=\"%s\" target=\"_blank\">루트 디렉터리에 웹 서버 쓰기 권한</a>을 주면 해결됩니다.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "%s루트 디렉터리에 웹 서버 쓰기 권한%s을 주면 해결됩니다.",
"Setting locale to %s failed" : "로캘을 %s(으)로 설정할 수 없음",
"Please install one of these locales on your system and restart your webserver." : "다음 중 하나 이상의 로캘을 시스템에 설치하고 웹 서버를 다시 시작하십시오.",
"Please ask your server administrator to install the module." : "서버 관리자에게 모듈 설치를 요청하십시오.",
diff --git a/lib/l10n/ku_IQ.js b/lib/l10n/ku_IQ.js
index eea2d55138e..d618f2f1fa0 100644
--- a/lib/l10n/ku_IQ.js
+++ b/lib/l10n/ku_IQ.js
@@ -2,7 +2,6 @@ OC.L10N.register(
"lib",
{
"Help" : "یارمەتی",
- "Settings" : "ده‌ستكاری",
"Users" : "به‌كارهێنه‌ر",
"Admin" : "به‌ڕێوه‌به‌ری سه‌ره‌كی",
"_%n day ago_::_%n days ago_" : ["",""],
diff --git a/lib/l10n/ku_IQ.json b/lib/l10n/ku_IQ.json
index b2ab2dc219d..08ec5ba660d 100644
--- a/lib/l10n/ku_IQ.json
+++ b/lib/l10n/ku_IQ.json
@@ -1,6 +1,5 @@
{ "translations": {
"Help" : "یارمەتی",
- "Settings" : "ده‌ستكاری",
"Users" : "به‌كارهێنه‌ر",
"Admin" : "به‌ڕێوه‌به‌ری سه‌ره‌كی",
"_%n day ago_::_%n days ago_" : ["",""],
diff --git a/lib/l10n/lb.js b/lib/l10n/lb.js
index 470652f4017..94a3d4639f5 100644
--- a/lib/l10n/lb.js
+++ b/lib/l10n/lb.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Hëllef",
"Personal" : "Perséinlech",
- "Settings" : "Astellungen",
"Users" : "Benotzer",
"Admin" : "Admin",
"Unknown filetype" : "Onbekannten Fichier Typ",
diff --git a/lib/l10n/lb.json b/lib/l10n/lb.json
index 2f63f042538..e83729d0f92 100644
--- a/lib/l10n/lb.json
+++ b/lib/l10n/lb.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Hëllef",
"Personal" : "Perséinlech",
- "Settings" : "Astellungen",
"Users" : "Benotzer",
"Admin" : "Admin",
"Unknown filetype" : "Onbekannten Fichier Typ",
diff --git a/lib/l10n/lt_LT.js b/lib/l10n/lt_LT.js
index 1f05855b77e..a17e3d26ceb 100644
--- a/lib/l10n/lt_LT.js
+++ b/lib/l10n/lt_LT.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Pagalba",
"Personal" : "Asmeniniai",
- "Settings" : "Nustatymai",
"Users" : "Vartotojai",
"Admin" : "Administravimas",
"No app name specified" : "Nenurodytas programos pavadinimas",
diff --git a/lib/l10n/lt_LT.json b/lib/l10n/lt_LT.json
index a3a53baf010..ea389f40c1b 100644
--- a/lib/l10n/lt_LT.json
+++ b/lib/l10n/lt_LT.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Pagalba",
"Personal" : "Asmeniniai",
- "Settings" : "Nustatymai",
"Users" : "Vartotojai",
"Admin" : "Administravimas",
"No app name specified" : "Nenurodytas programos pavadinimas",
diff --git a/lib/l10n/lv.js b/lib/l10n/lv.js
index 1f381ecb9bf..f3ecf0a94fc 100644
--- a/lib/l10n/lv.js
+++ b/lib/l10n/lv.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Palīdzība",
"Personal" : "Personīgi",
- "Settings" : "Iestatījumi",
"Users" : "Lietotāji",
"Admin" : "Administratori",
"Recommended" : "Rekomendēts",
diff --git a/lib/l10n/lv.json b/lib/l10n/lv.json
index a729e3a40b9..c7a556ab665 100644
--- a/lib/l10n/lv.json
+++ b/lib/l10n/lv.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Palīdzība",
"Personal" : "Personīgi",
- "Settings" : "Iestatījumi",
"Users" : "Lietotāji",
"Admin" : "Administratori",
"Recommended" : "Rekomendēts",
diff --git a/lib/l10n/mk.js b/lib/l10n/mk.js
index 5ab596f4c95..760a1286172 100644
--- a/lib/l10n/mk.js
+++ b/lib/l10n/mk.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Помош",
"Personal" : "Лично",
- "Settings" : "Подесувања",
"Users" : "Корисници",
"Admin" : "Админ",
"No app name specified" : "Не е специфицирано име на апликацијата",
diff --git a/lib/l10n/mk.json b/lib/l10n/mk.json
index de9fff6b1a1..d58784f6c1d 100644
--- a/lib/l10n/mk.json
+++ b/lib/l10n/mk.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Помош",
"Personal" : "Лично",
- "Settings" : "Подесувања",
"Users" : "Корисници",
"Admin" : "Админ",
"No app name specified" : "Не е специфицирано име на апликацијата",
diff --git a/lib/l10n/mn.js b/lib/l10n/mn.js
index 3d8b52309d6..d84aa82c14e 100644
--- a/lib/l10n/mn.js
+++ b/lib/l10n/mn.js
@@ -1,7 +1,6 @@
OC.L10N.register(
"lib",
{
- "Settings" : "Тохиргоо",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/mn.json b/lib/l10n/mn.json
index 8b0f4650d50..82cdad16805 100644
--- a/lib/l10n/mn.json
+++ b/lib/l10n/mn.json
@@ -1,5 +1,4 @@
{ "translations": {
- "Settings" : "Тохиргоо",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/mr.js b/lib/l10n/mr.js
new file mode 100644
index 00000000000..a12702211c2
--- /dev/null
+++ b/lib/l10n/mr.js
@@ -0,0 +1,10 @@
+OC.L10N.register(
+ "lib",
+ {
+ "_%n day ago_::_%n days ago_" : ["",""],
+ "_%n month ago_::_%n months ago_" : ["",""],
+ "_%n year ago_::_%n years ago_" : ["",""],
+ "_%n hour ago_::_%n hours ago_" : ["",""],
+ "_%n minute ago_::_%n minutes ago_" : ["",""]
+},
+"nplurals=2; plural=(n != 1);");
diff --git a/lib/l10n/mr.json b/lib/l10n/mr.json
new file mode 100644
index 00000000000..b994fa289eb
--- /dev/null
+++ b/lib/l10n/mr.json
@@ -0,0 +1,8 @@
+{ "translations": {
+ "_%n day ago_::_%n days ago_" : ["",""],
+ "_%n month ago_::_%n months ago_" : ["",""],
+ "_%n year ago_::_%n years ago_" : ["",""],
+ "_%n hour ago_::_%n hours ago_" : ["",""],
+ "_%n minute ago_::_%n minutes ago_" : ["",""]
+},"pluralForm" :"nplurals=2; plural=(n != 1);"
+} \ No newline at end of file
diff --git a/lib/l10n/ms_MY.js b/lib/l10n/ms_MY.js
index a501399af5c..0e4d4becc84 100644
--- a/lib/l10n/ms_MY.js
+++ b/lib/l10n/ms_MY.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Bantuan",
"Personal" : "Peribadi",
- "Settings" : "Tetapan",
"Users" : "Pengguna",
"Admin" : "Admin",
"_%n day ago_::_%n days ago_" : [""],
diff --git a/lib/l10n/ms_MY.json b/lib/l10n/ms_MY.json
index 8c2a83136ee..c4b0b5d0569 100644
--- a/lib/l10n/ms_MY.json
+++ b/lib/l10n/ms_MY.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Bantuan",
"Personal" : "Peribadi",
- "Settings" : "Tetapan",
"Users" : "Pengguna",
"Admin" : "Admin",
"_%n day ago_::_%n days ago_" : [""],
diff --git a/lib/l10n/nb_NO.js b/lib/l10n/nb_NO.js
index 22f50896cf8..2c29e28c819 100644
--- a/lib/l10n/nb_NO.js
+++ b/lib/l10n/nb_NO.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud med en versjon lavere enn %s kreves.",
"Help" : "Hjelp",
"Personal" : "Personlig",
- "Settings" : "Innstillinger",
"Users" : "Brukere",
"Admin" : "Admin",
"Recommended" : "Anbefalt",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" kan ikke installeres fordi den ikke er kompatibel med denne versjoen av ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \\\"%s\\\" kan ikke installeres fordi følgende avhengigheter ikke er tilfredsstilt: %s",
"No app name specified" : "Intet app-navn spesifisert",
"Unknown filetype" : "Ukjent filtype",
"Invalid image" : "Ugyldig bilde",
@@ -108,17 +105,19 @@ OC.L10N.register(
"A valid password must be provided" : "Oppgi et gyldig passord",
"The username is already being used" : "Brukernavnet er allerede i bruk",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ingen databasedrivere (sqlite, mysql, or postgresql) installert.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Tillatelser kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til rotmappen%s.",
"Cannot write into \"config\" directory" : "Kan ikke skrive i \"config\"-mappen",
"Cannot write into \"apps\" directory" : "Kan ikke skrive i \"apps\"-mappen",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dette kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til apps-mappen%s eller ved å deaktivere app-butikken i config-filen.",
"Cannot create \"data\" directory (%s)" : "Kan ikke opprette \"data\"-mappen (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dette kan vanligvis ordnes ved <a href=\"%s\" target=\"_blank\">gi web-serveren skrivetilgang til rotmappen</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Tillatelser kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til rotmappen%s.",
"Setting locale to %s failed" : "Setting av nasjonale innstillinger til %s feilet.",
"Please install one of these locales on your system and restart your webserver." : "Vennligst installer en av disse nasjonale innstillingene på systemet ditt og start webserveren på nytt.",
"Please ask your server administrator to install the module." : "Be server-administratoren om å installere modulen.",
"PHP module %s not installed." : "PHP-modul %s er ikke installert.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Be server-administratoren om å oppdatere PHP til nyeste versjon. PHP-versjonen du bruker støttes ikke lenger av ownCloud og PHP-fellesskapet.",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP er konfigurert til å fylle \"raw post data\". Fra og med PHP 5.6 vil dette føre til at PHP utsteder notiser for fullstendig gyldig kode.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "For å fikse dette problemet, sett <code>always_populate_raw_post_data</code> til <code>-1</code> i php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Det ser ut for at PHP er satt opp til å fjerne innebygde doc blocks. Dette gjør at flere av kjerneapplikasjonene blir utilgjengelige.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dette forårsakes sannsynligvis av en bufrer/akselerator, som f.eks. Zend OPcache eller eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har blitt installert, men de listes fortsatt som fraværende?",
diff --git a/lib/l10n/nb_NO.json b/lib/l10n/nb_NO.json
index 201dfeeea69..cc0f3290cbd 100644
--- a/lib/l10n/nb_NO.json
+++ b/lib/l10n/nb_NO.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "ownCloud med en versjon lavere enn %s kreves.",
"Help" : "Hjelp",
"Personal" : "Personlig",
- "Settings" : "Innstillinger",
"Users" : "Brukere",
"Admin" : "Admin",
"Recommended" : "Anbefalt",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" kan ikke installeres fordi den ikke er kompatibel med denne versjoen av ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \\\"%s\\\" kan ikke installeres fordi følgende avhengigheter ikke er tilfredsstilt: %s",
"No app name specified" : "Intet app-navn spesifisert",
"Unknown filetype" : "Ukjent filtype",
"Invalid image" : "Ugyldig bilde",
@@ -106,17 +103,19 @@
"A valid password must be provided" : "Oppgi et gyldig passord",
"The username is already being used" : "Brukernavnet er allerede i bruk",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ingen databasedrivere (sqlite, mysql, or postgresql) installert.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Tillatelser kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til rotmappen%s.",
"Cannot write into \"config\" directory" : "Kan ikke skrive i \"config\"-mappen",
"Cannot write into \"apps\" directory" : "Kan ikke skrive i \"apps\"-mappen",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dette kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til apps-mappen%s eller ved å deaktivere app-butikken i config-filen.",
"Cannot create \"data\" directory (%s)" : "Kan ikke opprette \"data\"-mappen (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dette kan vanligvis ordnes ved <a href=\"%s\" target=\"_blank\">gi web-serveren skrivetilgang til rotmappen</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Tillatelser kan vanligvis ordnes ved %så gi web-serveren skrivetilgang til rotmappen%s.",
"Setting locale to %s failed" : "Setting av nasjonale innstillinger til %s feilet.",
"Please install one of these locales on your system and restart your webserver." : "Vennligst installer en av disse nasjonale innstillingene på systemet ditt og start webserveren på nytt.",
"Please ask your server administrator to install the module." : "Be server-administratoren om å installere modulen.",
"PHP module %s not installed." : "PHP-modul %s er ikke installert.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Be server-administratoren om å oppdatere PHP til nyeste versjon. PHP-versjonen du bruker støttes ikke lenger av ownCloud og PHP-fellesskapet.",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP er konfigurert til å fylle \"raw post data\". Fra og med PHP 5.6 vil dette føre til at PHP utsteder notiser for fullstendig gyldig kode.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "For å fikse dette problemet, sett <code>always_populate_raw_post_data</code> til <code>-1</code> i php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "Det ser ut for at PHP er satt opp til å fjerne innebygde doc blocks. Dette gjør at flere av kjerneapplikasjonene blir utilgjengelige.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Dette forårsakes sannsynligvis av en bufrer/akselerator, som f.eks. Zend OPcache eller eAccelerator.",
"PHP modules have been installed, but they are still listed as missing?" : "PHP-moduler har blitt installert, men de listes fortsatt som fraværende?",
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js
index b44fd91d594..53114a5582b 100644
--- a/lib/l10n/nl.js
+++ b/lib/l10n/nl.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud met een versie lager dan %s is vereist.",
"Help" : "Help",
"Personal" : "Persoonlijk",
- "Settings" : "Instellingen",
"Users" : "Gebruikers",
"Admin" : "Beheerder",
"Recommended" : "Aanbevolen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de app niet compatible is met deze versie van ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de volgende afhankelijkheden niet zijn ingevuld: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App \"%s\" kan niet worden geïnstalleerd omdat deze niet compatible is met deze versie van ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \"%s\" kan niet worden geïnstalleerd omdat de volgende afhankelijkheden niet zijn ingevuld: %s",
"No app name specified" : "Geen app naam opgegeven.",
"Unknown filetype" : "Onbekend bestandsformaat",
"Invalid image" : "Ongeldige afbeelding",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "Er moet een geldig wachtwoord worden opgegeven",
"The username is already being used" : "De gebruikersnaam bestaat al",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Geen database drivers (sqlite, mysql of postgres) geïnstalleerd.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dit kan hersteld worden door de webserver schrijfrechten te %s geven op de hoofddirectory %s.",
"Cannot write into \"config\" directory" : "Kan niet schrijven naar de \"config\" directory",
"Cannot write into \"apps\" directory" : "Kan niet schrijven naar de \"apps\" directory",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te %s geven op de appsdirectory %s of door de appstore te deactiveren in het configbestand.",
"Cannot create \"data\" directory (%s)" : "Kan de \"data\" directory (%s) niet aanmaken",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dit kan worden hersteld door <a href=\"%s\" target=\"_blank\"> de webserver schrijfrechten te geven tot de hoofddirectory</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dit kan hersteld worden door de webserver schrijfrechten te %s geven op de hoofddirectory %s.",
"Setting locale to %s failed" : "Instellen taal op %s mislukte",
"Please install one of these locales on your system and restart your webserver." : "Installeer één van de talen op uw systeem en herstart uw webserver.",
"Please ask your server administrator to install the module." : "Vraag uw beheerder om de module te installeren.",
"PHP module %s not installed." : "PHP module %s niet geïnstalleerd.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP instelling \"%s\" staat niet op \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Het in php.ini bijstellen hiervan laat ownCloud weer werken",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Vraag uw beheerder om PHP bij te werken tot de laatste versie. Uw PHP versie wordt niet langer ondersteund door ownCloud en de PHP community.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP is geconfigureerd om ruwe data van berichten te vullen. Vanaf PHP 5.6 leidt dit tot PHP meldingen voor echt wel geldige code.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Om dit op te lossen stel de waarde <code>always_populate_raw_post_data</code> in op <code>-1</code> in php.ini",
diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json
index e453aa0f6a0..46bf53ac4fe 100644
--- a/lib/l10n/nl.json
+++ b/lib/l10n/nl.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "ownCloud met een versie lager dan %s is vereist.",
"Help" : "Help",
"Personal" : "Persoonlijk",
- "Settings" : "Instellingen",
"Users" : "Gebruikers",
"Admin" : "Beheerder",
"Recommended" : "Aanbevolen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de app niet compatible is met deze versie van ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de volgende afhankelijkheden niet zijn ingevuld: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App \"%s\" kan niet worden geïnstalleerd omdat deze niet compatible is met deze versie van ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \"%s\" kan niet worden geïnstalleerd omdat de volgende afhankelijkheden niet zijn ingevuld: %s",
"No app name specified" : "Geen app naam opgegeven.",
"Unknown filetype" : "Onbekend bestandsformaat",
"Invalid image" : "Ongeldige afbeelding",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "Er moet een geldig wachtwoord worden opgegeven",
"The username is already being used" : "De gebruikersnaam bestaat al",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Geen database drivers (sqlite, mysql of postgres) geïnstalleerd.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dit kan hersteld worden door de webserver schrijfrechten te %s geven op de hoofddirectory %s.",
"Cannot write into \"config\" directory" : "Kan niet schrijven naar de \"config\" directory",
"Cannot write into \"apps\" directory" : "Kan niet schrijven naar de \"apps\" directory",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Dit kan hersteld worden door de webserver schrijfrechten te %s geven op de appsdirectory %s of door de appstore te deactiveren in het configbestand.",
"Cannot create \"data\" directory (%s)" : "Kan de \"data\" directory (%s) niet aanmaken",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Dit kan worden hersteld door <a href=\"%s\" target=\"_blank\"> de webserver schrijfrechten te geven tot de hoofddirectory</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dit kan hersteld worden door de webserver schrijfrechten te %s geven op de hoofddirectory %s.",
"Setting locale to %s failed" : "Instellen taal op %s mislukte",
"Please install one of these locales on your system and restart your webserver." : "Installeer één van de talen op uw systeem en herstart uw webserver.",
"Please ask your server administrator to install the module." : "Vraag uw beheerder om de module te installeren.",
"PHP module %s not installed." : "PHP module %s niet geïnstalleerd.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP instelling \"%s\" staat niet op \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Het in php.ini bijstellen hiervan laat ownCloud weer werken",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Vraag uw beheerder om PHP bij te werken tot de laatste versie. Uw PHP versie wordt niet langer ondersteund door ownCloud en de PHP community.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP is geconfigureerd om ruwe data van berichten te vullen. Vanaf PHP 5.6 leidt dit tot PHP meldingen voor echt wel geldige code.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Om dit op te lossen stel de waarde <code>always_populate_raw_post_data</code> in op <code>-1</code> in php.ini",
diff --git a/lib/l10n/nn_NO.js b/lib/l10n/nn_NO.js
index b16dd54cc18..79a9c335980 100644
--- a/lib/l10n/nn_NO.js
+++ b/lib/l10n/nn_NO.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Hjelp",
"Personal" : "Personleg",
- "Settings" : "Innstillingar",
"Users" : "Brukarar",
"Admin" : "Administrer",
"Unknown filetype" : "Ukjend filtype",
diff --git a/lib/l10n/nn_NO.json b/lib/l10n/nn_NO.json
index 6dad7797027..a465496723b 100644
--- a/lib/l10n/nn_NO.json
+++ b/lib/l10n/nn_NO.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Hjelp",
"Personal" : "Personleg",
- "Settings" : "Innstillingar",
"Users" : "Brukarar",
"Admin" : "Administrer",
"Unknown filetype" : "Ukjend filtype",
diff --git a/lib/l10n/oc.js b/lib/l10n/oc.js
index 4c16d7ec821..f4cb27ec628 100644
--- a/lib/l10n/oc.js
+++ b/lib/l10n/oc.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Ajuda",
"Personal" : "Personal",
- "Settings" : "Configuracion",
"Users" : "Usancièrs",
"Admin" : "Admin",
"today" : "uèi",
diff --git a/lib/l10n/oc.json b/lib/l10n/oc.json
index 9ebedb6f913..097e5553718 100644
--- a/lib/l10n/oc.json
+++ b/lib/l10n/oc.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Ajuda",
"Personal" : "Personal",
- "Settings" : "Configuracion",
"Users" : "Usancièrs",
"Admin" : "Admin",
"today" : "uèi",
diff --git a/lib/l10n/pa.js b/lib/l10n/pa.js
index 5b3f0a80f6a..13e4ed1fde8 100644
--- a/lib/l10n/pa.js
+++ b/lib/l10n/pa.js
@@ -1,7 +1,6 @@
OC.L10N.register(
"lib",
{
- "Settings" : "ਸੈਟਿੰਗ",
"today" : "ਅੱਜ",
"yesterday" : "ਕੱਲ੍ਹ",
"_%n day ago_::_%n days ago_" : ["",""],
diff --git a/lib/l10n/pa.json b/lib/l10n/pa.json
index 254909bc8b4..d42044e460f 100644
--- a/lib/l10n/pa.json
+++ b/lib/l10n/pa.json
@@ -1,5 +1,4 @@
{ "translations": {
- "Settings" : "ਸੈਟਿੰਗ",
"today" : "ਅੱਜ",
"yesterday" : "ਕੱਲ੍ਹ",
"_%n day ago_::_%n days ago_" : ["",""],
diff --git a/lib/l10n/pl.js b/lib/l10n/pl.js
index 9663e705324..832c78caf29 100644
--- a/lib/l10n/pl.js
+++ b/lib/l10n/pl.js
@@ -13,11 +13,9 @@ OC.L10N.register(
"Following platforms are supported: %s" : "Obsługiwane są następujące platformy: %s",
"Help" : "Pomoc",
"Personal" : "Osobiste",
- "Settings" : "Ustawienia",
"Users" : "Użytkownicy",
"Admin" : "Administrator",
"Recommended" : "Polecane",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikacja \\\"%s\\\" nie może zostać zainstalowana ponieważ nie jest kompatybilna z tą wersją ownCloud.",
"No app name specified" : "Nie określono nazwy aplikacji",
"Unknown filetype" : "Nieznany typ pliku",
"Invalid image" : "Błędne zdjęcie",
@@ -99,12 +97,12 @@ OC.L10N.register(
"A valid password must be provided" : "Należy podać prawidłowe hasło",
"The username is already being used" : "Ta nazwa użytkownika jest już używana",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Brak sterowników bazy danych (sqlite, mysql or postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Problemy z uprawnieniami można zwykle naprawić przez %sdodanie serwerowi www uprawnień zapisu do katalogu głównego%s.",
"Cannot write into \"config\" directory" : "Nie można zapisać do katalogu \"config\"",
"Cannot write into \"apps\" directory" : "Nie można zapisać do katalogu \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Można to zwykle rozwiązać przez %sdodanie serwerowi www uprawnień zapisu do katalogu apps%s lub wyłączenie appstore w pliku konfiguracyjnym.",
"Cannot create \"data\" directory (%s)" : "Nie można utworzyć katalogu \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Można to zwykle rozwiązać przez <a href=\"%s\" target=\"_blank\">dodanie serwerowi www uprawnień zapisu do katalogu głównego</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Problemy z uprawnieniami można zwykle naprawić przez %sdodanie serwerowi www uprawnień zapisu do katalogu głównego%s.",
"Setting locale to %s failed" : "Nie udało się zmienić języka na %s",
"Please install one of these locales on your system and restart your webserver." : "Proszę zainstalować jedno z poniższych locale w Twoim systemie i uruchomić ponownie serwer www.",
"Please ask your server administrator to install the module." : "Proszę poproś administratora serwera aby zainstalował ten moduł.",
diff --git a/lib/l10n/pl.json b/lib/l10n/pl.json
index 575f0fddf31..b8a51c704c4 100644
--- a/lib/l10n/pl.json
+++ b/lib/l10n/pl.json
@@ -11,11 +11,9 @@
"Following platforms are supported: %s" : "Obsługiwane są następujące platformy: %s",
"Help" : "Pomoc",
"Personal" : "Osobiste",
- "Settings" : "Ustawienia",
"Users" : "Użytkownicy",
"Admin" : "Administrator",
"Recommended" : "Polecane",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikacja \\\"%s\\\" nie może zostać zainstalowana ponieważ nie jest kompatybilna z tą wersją ownCloud.",
"No app name specified" : "Nie określono nazwy aplikacji",
"Unknown filetype" : "Nieznany typ pliku",
"Invalid image" : "Błędne zdjęcie",
@@ -97,12 +95,12 @@
"A valid password must be provided" : "Należy podać prawidłowe hasło",
"The username is already being used" : "Ta nazwa użytkownika jest już używana",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Brak sterowników bazy danych (sqlite, mysql or postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Problemy z uprawnieniami można zwykle naprawić przez %sdodanie serwerowi www uprawnień zapisu do katalogu głównego%s.",
"Cannot write into \"config\" directory" : "Nie można zapisać do katalogu \"config\"",
"Cannot write into \"apps\" directory" : "Nie można zapisać do katalogu \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Można to zwykle rozwiązać przez %sdodanie serwerowi www uprawnień zapisu do katalogu apps%s lub wyłączenie appstore w pliku konfiguracyjnym.",
"Cannot create \"data\" directory (%s)" : "Nie można utworzyć katalogu \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Można to zwykle rozwiązać przez <a href=\"%s\" target=\"_blank\">dodanie serwerowi www uprawnień zapisu do katalogu głównego</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Problemy z uprawnieniami można zwykle naprawić przez %sdodanie serwerowi www uprawnień zapisu do katalogu głównego%s.",
"Setting locale to %s failed" : "Nie udało się zmienić języka na %s",
"Please install one of these locales on your system and restart your webserver." : "Proszę zainstalować jedno z poniższych locale w Twoim systemie i uruchomić ponownie serwer www.",
"Please ask your server administrator to install the module." : "Proszę poproś administratora serwera aby zainstalował ten moduł.",
diff --git a/lib/l10n/pt_BR.js b/lib/l10n/pt_BR.js
index f3d765fa0a9..ec1e84a09b7 100644
--- a/lib/l10n/pt_BR.js
+++ b/lib/l10n/pt_BR.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "É necessário um ownCloud com uma versão menor que %s.",
"Help" : "Ajuda",
"Personal" : "Pessoal",
- "Settings" : "Configurações",
"Users" : "Usuários",
"Admin" : "Admin",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplicação \\\"%s\\\" não pode ser instalada porque não é compatível com esta versão do ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "O app \\\"%s\\\" não pode ser instalado porque as seguintes dependências não forão cumpridas: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App \"%s\" não pode ser instalado porque não é compatível com esta versão do ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \"%s\" não pode ser instalado porque as seguintes dependências não foram cumpridas: %s",
"No app name specified" : "O nome do aplicativo não foi especificado.",
"Unknown filetype" : "Tipo de arquivo desconhecido",
"Invalid image" : "Imagem inválida",
@@ -108,17 +107,20 @@ OC.L10N.register(
"A valid password must be provided" : "Forneça uma senha válida",
"The username is already being used" : "Este nome de usuário já está sendo usado",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nenhum driver de banco de dados (sqlite, mysql, or postgresql) instalado.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissões podem ser corrigidas dando permissão de escita %sgiving ao webserver para o diretório raiz directory%s",
"Cannot write into \"config\" directory" : "Não é possível gravar no diretório \"config\"",
"Cannot write into \"apps\" directory" : "Não é possível gravar no diretório \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Isto pode ser corrigido dando ao webserver permissão de escrita %sgiving para o diretório apps directory%s ou desabilitando o appstore no arquivo de configuração.",
"Cannot create \"data\" directory (%s)" : "Não pode ser criado \"dados\" no diretório (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Isto pode ser corrigido por <a href=\"%s\" target=\"_blank\">dando ao webserver permissão de escrita ao diretório raiz</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissões podem ser corrigidas dando permissão de escita %sgiving ao webserver para o diretório raiz directory%s",
"Setting locale to %s failed" : "Falha ao configurar localidade para %s",
"Please install one of these locales on your system and restart your webserver." : "Por favor, defina uma dessas localizações em seu sistema e reinicie o seu servidor web.",
"Please ask your server administrator to install the module." : "Por favor, peça ao seu administrador do servidor para instalar o módulo.",
"PHP module %s not installed." : "Módulo PHP %s não instalado.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Configurações \"%s\" PHP não está configurado para \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajustando esta configuração no php.ini irá fazer o ownCloud rodar novamente",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor, peça ao seu administrador do servidor para atualizar o PHP para a versão mais recente. A sua versão do PHP não é mais suportado pelo ownCloud e a comunidade PHP.",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para preencher os dados pós-dados. Desde o PHP 5.6 isto levará o PHP a enviar avisos para códigos perfeitamente válidos.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para corrigir esse problema configure <code> always_populate_raw_post_data </code> para <code> -1 </code> em seu arquivo de configuração php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP é, aparentemente, a configuração para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por uma cache/acelerador, como Zend OPcache ou eAccelerator.",
diff --git a/lib/l10n/pt_BR.json b/lib/l10n/pt_BR.json
index e2f27123d3f..39aaac7f814 100644
--- a/lib/l10n/pt_BR.json
+++ b/lib/l10n/pt_BR.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "É necessário um ownCloud com uma versão menor que %s.",
"Help" : "Ajuda",
"Personal" : "Pessoal",
- "Settings" : "Configurações",
"Users" : "Usuários",
"Admin" : "Admin",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplicação \\\"%s\\\" não pode ser instalada porque não é compatível com esta versão do ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "O app \\\"%s\\\" não pode ser instalado porque as seguintes dependências não forão cumpridas: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "App \"%s\" não pode ser instalado porque não é compatível com esta versão do ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "App \"%s\" não pode ser instalado porque as seguintes dependências não foram cumpridas: %s",
"No app name specified" : "O nome do aplicativo não foi especificado.",
"Unknown filetype" : "Tipo de arquivo desconhecido",
"Invalid image" : "Imagem inválida",
@@ -106,17 +105,20 @@
"A valid password must be provided" : "Forneça uma senha válida",
"The username is already being used" : "Este nome de usuário já está sendo usado",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nenhum driver de banco de dados (sqlite, mysql, or postgresql) instalado.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissões podem ser corrigidas dando permissão de escita %sgiving ao webserver para o diretório raiz directory%s",
"Cannot write into \"config\" directory" : "Não é possível gravar no diretório \"config\"",
"Cannot write into \"apps\" directory" : "Não é possível gravar no diretório \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Isto pode ser corrigido dando ao webserver permissão de escrita %sgiving para o diretório apps directory%s ou desabilitando o appstore no arquivo de configuração.",
"Cannot create \"data\" directory (%s)" : "Não pode ser criado \"dados\" no diretório (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Isto pode ser corrigido por <a href=\"%s\" target=\"_blank\">dando ao webserver permissão de escrita ao diretório raiz</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Permissões podem ser corrigidas dando permissão de escita %sgiving ao webserver para o diretório raiz directory%s",
"Setting locale to %s failed" : "Falha ao configurar localidade para %s",
"Please install one of these locales on your system and restart your webserver." : "Por favor, defina uma dessas localizações em seu sistema e reinicie o seu servidor web.",
"Please ask your server administrator to install the module." : "Por favor, peça ao seu administrador do servidor para instalar o módulo.",
"PHP module %s not installed." : "Módulo PHP %s não instalado.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Configurações \"%s\" PHP não está configurado para \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajustando esta configuração no php.ini irá fazer o ownCloud rodar novamente",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor, peça ao seu administrador do servidor para atualizar o PHP para a versão mais recente. A sua versão do PHP não é mais suportado pelo ownCloud e a comunidade PHP.",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP está configurado para preencher os dados pós-dados. Desde o PHP 5.6 isto levará o PHP a enviar avisos para códigos perfeitamente válidos.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para corrigir esse problema configure <code> always_populate_raw_post_data </code> para <code> -1 </code> em seu arquivo de configuração php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP é, aparentemente, a configuração para retirar blocos doc inline. Isso fará com que vários aplicativos do núcleo fiquem inacessíveis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isso provavelmente é causado por uma cache/acelerador, como Zend OPcache ou eAccelerator.",
diff --git a/lib/l10n/pt_PT.js b/lib/l10n/pt_PT.js
index 05bda3ed595..3762ea93e2d 100644
--- a/lib/l10n/pt_PT.js
+++ b/lib/l10n/pt_PT.js
@@ -8,23 +8,32 @@ OC.L10N.register(
"Sample configuration detected" : "Exemplo de configuração detectada",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de amostra foi copiada. Isso pode danificar a sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php",
"PHP %s or higher is required." : "Necessário PHP %s ou maior.",
+ "PHP with a version lower than %s is required." : "É necessário um PHP com uma versão inferir a %s.",
+ "Following databases are supported: %s" : "As seguintes bases de dados são suportadas: %s",
+ "The command line tool %s could not be found" : "A ferramenta de linha de comento %s não foi encontrada",
+ "The library %s is not available." : "A biblioteca %s não está disponível.",
+ "Library %s with a version higher than %s is required - available version %s." : "É necessário que a biblioteca %s tenha uma versão superior a %s - versão disponível: %s.",
+ "Library %s with a version lower than %s is required - available version %s." : "É necessário que a biblioteca %s tenha uma versão inferior a %s - versão disponível: %s.",
+ "Following platforms are supported: %s" : "As seguintes plataformas são suportadas: %s",
+ "ownCloud %s or higher is required." : "É necessário ownCloud %s ou superior.",
+ "ownCloud with a version lower than %s is required." : "É necessário uma versão do ownCloud inferior a %s.",
"Help" : "Ajuda",
"Personal" : "Pessoal",
- "Settings" : "Configurações",
"Users" : "Utilizadores",
"Admin" : "Admin",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "A Aplicação \\\"%s\\\" não pode ser instalada porque não é compatível com esta versão do owncloud.",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "A aplicação \"%s\" não pode ser instalada por não ser compatível com esta versão da ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "A aplicação \"%s\" não pode ser instalada porque as seguintes dependências não podem ser realizadas: %s",
"No app name specified" : "O nome da aplicação não foi especificado",
"Unknown filetype" : "Ficheiro desconhecido",
"Invalid image" : "Imagem inválida",
"today" : "hoje",
"yesterday" : "ontem",
- "_%n day ago_::_%n days ago_" : ["",""],
+ "_%n day ago_::_%n days ago_" : ["%n dia atrás","%n dias atrás"],
"last month" : "ultímo mês",
"_%n month ago_::_%n months ago_" : ["","%n meses atrás"],
"last year" : "ano passado",
- "_%n year ago_::_%n years ago_" : ["",""],
+ "_%n year ago_::_%n years ago_" : ["%n ano atrás","%n anos atrás"],
"_%n hour ago_::_%n hours ago_" : ["","%n horas atrás"],
"_%n minute ago_::_%n minutes ago_" : ["","%n minutos atrás"],
"seconds ago" : "Minutos atrás",
@@ -67,6 +76,7 @@ OC.L10N.register(
"Set an admin password." : "Definiar uma password de administrador",
"Can't create or write into the data directory %s" : "Não é possível criar ou escrever a directoria data %s",
"%s shared »%s« with you" : "%s partilhado »%s« consigo",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "A partilha de %s falhou porque a interface não permite as partilhas do tipo %i",
"Sharing %s failed, because the file does not exist" : "A partilha de %s falhou, porque o ficheiro não existe",
"You are not allowed to share %s" : "Não está autorizado a partilhar %s",
"Sharing %s failed, because the user %s is the item owner" : "A partilha %s falhou, porque o utilizador %s é o proprietário",
@@ -77,18 +87,19 @@ OC.L10N.register(
"Sharing %s failed, because %s is not a member of the group %s" : "A partilha %s falhou, porque o utilizador %s não é membro do grupo %s",
"You need to provide a password to create a public link, only protected links are allowed" : "Necessita de fornecer a senha para criar um link publico, só são permitidos links protegidos",
"Sharing %s failed, because sharing with links is not allowed" : "A partilha de %s falhou, porque partilhar com links não é permitido",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "A partilha de %s falhou, não foi possível encontrar %s. É possível que o servidor esteja inacessível.",
"Share type %s is not valid for %s" : "O tipo de partilha %s não é válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Setting permissions for %s failed, because the item was not found" : "Definir permissões para %s falhou, porque o item não foi encontrado",
"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "Não é possível definir data de expiração. As partilhas não podem expirar mais de %s depois de terem sido partilhadas",
"Cannot set expiration date. Expiration date is in the past" : "Não é possivel definir data de expiração. A data de expiração está no passado",
- "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Partilhar backend %s tem de implementar o interface OCP\\Share_Backend",
- "Sharing backend %s not found" : "Partilha backend %s não foi encontrado",
- "Sharing backend for %s not found" : "Partilha backend para %s não foi encontrado",
+ "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Ao partilhar a interface %s deve implementar a interface OCP\\Share_Backend",
+ "Sharing backend %s not found" : "Não foi encontrada a partilha da interface %s",
+ "Sharing backend for %s not found" : "Não foi encontrada a partilha da interface para %s",
"Sharing %s failed, because the user %s is the original sharer" : "A partilha %s falhou, porque o utilizador %s é o proprietário original",
"Sharing %s failed, because the permissions exceed permissions granted to %s" : "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Sharing %s failed, because resharing is not allowed" : "A partilha %s falhou, porque repartilhar não é permitido",
- "Sharing %s failed, because the sharing backend for %s could not find its source" : "A partilha %s falhou, devido a partilha em segundo plano para %s não conseguir encontrar a sua fonte",
+ "Sharing %s failed, because the sharing backend for %s could not find its source" : "A partilha %s falhou porque a partilha da interface para %s não conseguiu encontrar a sua fonte",
"Sharing %s failed, because the file could not be found in the file cache" : "A partilha %s falhou, devido ao ficheiro não poder ser encontrado na cache de ficheiros",
"Could not find category \"%s\"" : "Não foi encontrado a categoria \"%s\"",
"Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Apenas os seguintes caracteres são permitidos no nome de utilizador: \"a-z\", \"A-Z\", \"0-9\", e \"_.@-\"",
@@ -96,17 +107,21 @@ OC.L10N.register(
"A valid password must be provided" : "Uma password válida deve ser fornecida",
"The username is already being used" : "O nome de utilizador já está a ser usado",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nenhuma base de dados de drivers (sqlite, mysql, or postgresql) instaladas.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "As autorizações podem ser resolvidas normalmente %sdando ao servidor web direito de escrita para o directório root%s.",
"Cannot write into \"config\" directory" : "Não é possível escrever na directoria \"configurar\"",
"Cannot write into \"apps\" directory" : "Não é possivel escrever na directoria \"aplicações\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Isto pode ser normalmente resolvido %sdando ao servidor web direito de escrita para o directório de aplicação%s ou desactivando a loja de aplicações no ficheiro de configuração.",
"Cannot create \"data\" directory (%s)" : "Não é possivel criar a directoria \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Isto pode ser normalmente resolvido <a href=\"%s\" target=\"_blank\">dando ao servidor web direito de escrita para o directório do root</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "As autorizações podem ser resolvidas normalmente %sdando ao servidor web direito de escrita para o directório root%s.",
"Setting locale to %s failed" : "Definindo local para %s falhado",
"Please install one of these locales on your system and restart your webserver." : "Por favor instale um destes locais no seu sistema e reinicie o seu servidor web.",
"Please ask your server administrator to install the module." : "Por favor pergunte ao seu administrador do servidor para instalar o modulo.",
"PHP module %s not installed." : "O modulo %s PHP não está instalado.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Configuração PHP \"%s\" não está definida para \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajustar esta configuração no php.ini fará com que o ownCloud funcione de novo",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor pessa ao seu administrador de servidor para actualizar o PHP para a ultima versão. A sua versão de PHP não é mais suportada pelo owncloud e a comunidade PHP.",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "O PHP está configurado para popular dados raw post. Desde o PHP 5.6 isto levará a que o PHP mostre avisos sobre código perfeitamente válido.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para corrigir este problema altere <code>always_populate_raw_post_data</code> para <code>-1</code> no seu php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está aparentemente configurado a remover blocos doc em linha. Isto vai fazer algumas aplicações basicas inacessíveis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto é provavelmente causado por uma cache/acelerador como o Zend OPcache or eAcelerador.",
"PHP modules have been installed, but they are still listed as missing?" : "Os módulos PHP foram instalados, mas eles ainda estão listados como desaparecidos?",
diff --git a/lib/l10n/pt_PT.json b/lib/l10n/pt_PT.json
index e61ca5e06fa..a95a308a6e3 100644
--- a/lib/l10n/pt_PT.json
+++ b/lib/l10n/pt_PT.json
@@ -6,23 +6,32 @@
"Sample configuration detected" : "Exemplo de configuração detectada",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Foi detectado que a configuração de amostra foi copiada. Isso pode danificar a sua instalação e não é suportado. Por favor, leia a documentação antes de realizar mudanças no config.php",
"PHP %s or higher is required." : "Necessário PHP %s ou maior.",
+ "PHP with a version lower than %s is required." : "É necessário um PHP com uma versão inferir a %s.",
+ "Following databases are supported: %s" : "As seguintes bases de dados são suportadas: %s",
+ "The command line tool %s could not be found" : "A ferramenta de linha de comento %s não foi encontrada",
+ "The library %s is not available." : "A biblioteca %s não está disponível.",
+ "Library %s with a version higher than %s is required - available version %s." : "É necessário que a biblioteca %s tenha uma versão superior a %s - versão disponível: %s.",
+ "Library %s with a version lower than %s is required - available version %s." : "É necessário que a biblioteca %s tenha uma versão inferior a %s - versão disponível: %s.",
+ "Following platforms are supported: %s" : "As seguintes plataformas são suportadas: %s",
+ "ownCloud %s or higher is required." : "É necessário ownCloud %s ou superior.",
+ "ownCloud with a version lower than %s is required." : "É necessário uma versão do ownCloud inferior a %s.",
"Help" : "Ajuda",
"Personal" : "Pessoal",
- "Settings" : "Configurações",
"Users" : "Utilizadores",
"Admin" : "Admin",
"Recommended" : "Recomendado",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "A Aplicação \\\"%s\\\" não pode ser instalada porque não é compatível com esta versão do owncloud.",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "A aplicação \"%s\" não pode ser instalada por não ser compatível com esta versão da ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "A aplicação \"%s\" não pode ser instalada porque as seguintes dependências não podem ser realizadas: %s",
"No app name specified" : "O nome da aplicação não foi especificado",
"Unknown filetype" : "Ficheiro desconhecido",
"Invalid image" : "Imagem inválida",
"today" : "hoje",
"yesterday" : "ontem",
- "_%n day ago_::_%n days ago_" : ["",""],
+ "_%n day ago_::_%n days ago_" : ["%n dia atrás","%n dias atrás"],
"last month" : "ultímo mês",
"_%n month ago_::_%n months ago_" : ["","%n meses atrás"],
"last year" : "ano passado",
- "_%n year ago_::_%n years ago_" : ["",""],
+ "_%n year ago_::_%n years ago_" : ["%n ano atrás","%n anos atrás"],
"_%n hour ago_::_%n hours ago_" : ["","%n horas atrás"],
"_%n minute ago_::_%n minutes ago_" : ["","%n minutos atrás"],
"seconds ago" : "Minutos atrás",
@@ -65,6 +74,7 @@
"Set an admin password." : "Definiar uma password de administrador",
"Can't create or write into the data directory %s" : "Não é possível criar ou escrever a directoria data %s",
"%s shared »%s« with you" : "%s partilhado »%s« consigo",
+ "Sharing %s failed, because the backend does not allow shares from type %i" : "A partilha de %s falhou porque a interface não permite as partilhas do tipo %i",
"Sharing %s failed, because the file does not exist" : "A partilha de %s falhou, porque o ficheiro não existe",
"You are not allowed to share %s" : "Não está autorizado a partilhar %s",
"Sharing %s failed, because the user %s is the item owner" : "A partilha %s falhou, porque o utilizador %s é o proprietário",
@@ -75,18 +85,19 @@
"Sharing %s failed, because %s is not a member of the group %s" : "A partilha %s falhou, porque o utilizador %s não é membro do grupo %s",
"You need to provide a password to create a public link, only protected links are allowed" : "Necessita de fornecer a senha para criar um link publico, só são permitidos links protegidos",
"Sharing %s failed, because sharing with links is not allowed" : "A partilha de %s falhou, porque partilhar com links não é permitido",
+ "Sharing %s failed, could not find %s, maybe the server is currently unreachable." : "A partilha de %s falhou, não foi possível encontrar %s. É possível que o servidor esteja inacessível.",
"Share type %s is not valid for %s" : "O tipo de partilha %s não é válido para %s",
"Setting permissions for %s failed, because the permissions exceed permissions granted to %s" : "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Setting permissions for %s failed, because the item was not found" : "Definir permissões para %s falhou, porque o item não foi encontrado",
"Cannot set expiration date. Shares cannot expire later than %s after they have been shared" : "Não é possível definir data de expiração. As partilhas não podem expirar mais de %s depois de terem sido partilhadas",
"Cannot set expiration date. Expiration date is in the past" : "Não é possivel definir data de expiração. A data de expiração está no passado",
- "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Partilhar backend %s tem de implementar o interface OCP\\Share_Backend",
- "Sharing backend %s not found" : "Partilha backend %s não foi encontrado",
- "Sharing backend for %s not found" : "Partilha backend para %s não foi encontrado",
+ "Sharing backend %s must implement the interface OCP\\Share_Backend" : "Ao partilhar a interface %s deve implementar a interface OCP\\Share_Backend",
+ "Sharing backend %s not found" : "Não foi encontrada a partilha da interface %s",
+ "Sharing backend for %s not found" : "Não foi encontrada a partilha da interface para %s",
"Sharing %s failed, because the user %s is the original sharer" : "A partilha %s falhou, porque o utilizador %s é o proprietário original",
"Sharing %s failed, because the permissions exceed permissions granted to %s" : "Definir permissões para %s falhou, porque as permissões excedem as permissões concedidas a %s",
"Sharing %s failed, because resharing is not allowed" : "A partilha %s falhou, porque repartilhar não é permitido",
- "Sharing %s failed, because the sharing backend for %s could not find its source" : "A partilha %s falhou, devido a partilha em segundo plano para %s não conseguir encontrar a sua fonte",
+ "Sharing %s failed, because the sharing backend for %s could not find its source" : "A partilha %s falhou porque a partilha da interface para %s não conseguiu encontrar a sua fonte",
"Sharing %s failed, because the file could not be found in the file cache" : "A partilha %s falhou, devido ao ficheiro não poder ser encontrado na cache de ficheiros",
"Could not find category \"%s\"" : "Não foi encontrado a categoria \"%s\"",
"Only the following characters are allowed in a username: \"a-z\", \"A-Z\", \"0-9\", and \"_.@-\"" : "Apenas os seguintes caracteres são permitidos no nome de utilizador: \"a-z\", \"A-Z\", \"0-9\", e \"_.@-\"",
@@ -94,17 +105,21 @@
"A valid password must be provided" : "Uma password válida deve ser fornecida",
"The username is already being used" : "O nome de utilizador já está a ser usado",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Nenhuma base de dados de drivers (sqlite, mysql, or postgresql) instaladas.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "As autorizações podem ser resolvidas normalmente %sdando ao servidor web direito de escrita para o directório root%s.",
"Cannot write into \"config\" directory" : "Não é possível escrever na directoria \"configurar\"",
"Cannot write into \"apps\" directory" : "Não é possivel escrever na directoria \"aplicações\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Isto pode ser normalmente resolvido %sdando ao servidor web direito de escrita para o directório de aplicação%s ou desactivando a loja de aplicações no ficheiro de configuração.",
"Cannot create \"data\" directory (%s)" : "Não é possivel criar a directoria \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Isto pode ser normalmente resolvido <a href=\"%s\" target=\"_blank\">dando ao servidor web direito de escrita para o directório do root</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "As autorizações podem ser resolvidas normalmente %sdando ao servidor web direito de escrita para o directório root%s.",
"Setting locale to %s failed" : "Definindo local para %s falhado",
"Please install one of these locales on your system and restart your webserver." : "Por favor instale um destes locais no seu sistema e reinicie o seu servidor web.",
"Please ask your server administrator to install the module." : "Por favor pergunte ao seu administrador do servidor para instalar o modulo.",
"PHP module %s not installed." : "O modulo %s PHP não está instalado.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Configuração PHP \"%s\" não está definida para \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Ajustar esta configuração no php.ini fará com que o ownCloud funcione de novo",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Por favor pessa ao seu administrador de servidor para actualizar o PHP para a ultima versão. A sua versão de PHP não é mais suportada pelo owncloud e a comunidade PHP.",
+ "PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "O PHP está configurado para popular dados raw post. Desde o PHP 5.6 isto levará a que o PHP mostre avisos sobre código perfeitamente válido.",
+ "To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Para corrigir este problema altere <code>always_populate_raw_post_data</code> para <code>-1</code> no seu php.ini",
"PHP is apparently setup to strip inline doc blocks. This will make several core apps inaccessible." : "PHP está aparentemente configurado a remover blocos doc em linha. Isto vai fazer algumas aplicações basicas inacessíveis.",
"This is probably caused by a cache/accelerator such as Zend OPcache or eAccelerator." : "Isto é provavelmente causado por uma cache/acelerador como o Zend OPcache or eAcelerador.",
"PHP modules have been installed, but they are still listed as missing?" : "Os módulos PHP foram instalados, mas eles ainda estão listados como desaparecidos?",
diff --git a/lib/l10n/ro.js b/lib/l10n/ro.js
index 08d5d9bb5b4..b06836c7fc3 100644
--- a/lib/l10n/ro.js
+++ b/lib/l10n/ro.js
@@ -6,7 +6,6 @@ OC.L10N.register(
"PHP %s or higher is required." : "Versiunea PHP %s sau mai mare este necesară.",
"Help" : "Ajutor",
"Personal" : "Personal",
- "Settings" : "Setări",
"Users" : "Utilizatori",
"Admin" : "Admin",
"Recommended" : "Recomandat",
diff --git a/lib/l10n/ro.json b/lib/l10n/ro.json
index 9a0a316a57d..20b71834e23 100644
--- a/lib/l10n/ro.json
+++ b/lib/l10n/ro.json
@@ -4,7 +4,6 @@
"PHP %s or higher is required." : "Versiunea PHP %s sau mai mare este necesară.",
"Help" : "Ajutor",
"Personal" : "Personal",
- "Settings" : "Setări",
"Users" : "Utilizatori",
"Admin" : "Admin",
"Recommended" : "Recomandat",
diff --git a/lib/l10n/ru.js b/lib/l10n/ru.js
index 79a53ab3302..648a17e1fcf 100644
--- a/lib/l10n/ru.js
+++ b/lib/l10n/ru.js
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Требуется версия ownCloud ниже %s.",
"Help" : "Помощь",
"Personal" : "Личное",
- "Settings" : "Настройки",
"Users" : "Пользователи",
"Admin" : "Администрирование",
"Recommended" : "Рекомендовано",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Невозможно установить приложение \\\"%s\\\", т.к. оно несовместимо с этой версией ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Следующие зависимости не удовлетворены: %s, без них приложение \\\"%s\\\" не может быть установлено",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Приложение \"%s\" не может быть установлено, так как оно не совместимо с этой версией ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Приложение \"%s\" не может быть установлено, так как следующие зависимости не выполнены: %s",
"No app name specified" : "Не указано имя приложения",
"Unknown filetype" : "Неизвестный тип файла",
"Invalid image" : "Изображение повреждено",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "Укажите правильный пароль",
"The username is already being used" : "Имя пользователя уже используется",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Не установлены драйвера баз данных (sqlite, mysql или postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в корневой каталог%s.",
"Cannot write into \"config\" directory" : "Запись в каталог \"config\" невозможна",
"Cannot write into \"apps\" directory" : "Запись в каталог \"app\" невозможна",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в каталог приложений%s или отключив хранилище программ в файле конфигурации.",
"Cannot create \"data\" directory (%s)" : "Невозможно создать каталог \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Обычно это можно исправить, <a href=\"%s\" target=\"_blank\">предоставив веб-серверу права на запись в корневом каталоге.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в корневой каталог%s.",
"Setting locale to %s failed" : "Установка локали %s не удалась",
"Please install one of these locales on your system and restart your webserver." : "Установите один из этих языковых пакетов на вашу систему и перезапустите веб-сервер.",
"Please ask your server administrator to install the module." : "Пожалуйста, попростите администратора сервера установить модуль.",
"PHP module %s not installed." : "Не установлен PHP-модуль %s.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Параметр PHP \"%s\" не установлен в \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Установка этого параметра в php.ini позволит запуститься ownCloud снова.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Пожалуйста, обратитесь к администратору сервера, чтобы обновить PHP до последней версии. Установленная версия PHP больше не поддерживается ownCloud и сообществом PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "В PHP включена директива \"always_populate_raw_post_data\". PHP версии 5.6 и выше, при включенной директиве, добавляет уведомления в журнал даже для абсолютно рабочего кода.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Что-бы исправить эту ошибку, укажите значение <code>-1</code> в качестве значения параметра <code>always_populate_raw_post_data</code> в вашем php.ini",
diff --git a/lib/l10n/ru.json b/lib/l10n/ru.json
index 8863fe4c0a9..9e28c7115ce 100644
--- a/lib/l10n/ru.json
+++ b/lib/l10n/ru.json
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "Требуется версия ownCloud ниже %s.",
"Help" : "Помощь",
"Personal" : "Личное",
- "Settings" : "Настройки",
"Users" : "Пользователи",
"Admin" : "Администрирование",
"Recommended" : "Рекомендовано",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Невозможно установить приложение \\\"%s\\\", т.к. оно несовместимо с этой версией ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Следующие зависимости не удовлетворены: %s, без них приложение \\\"%s\\\" не может быть установлено",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "Приложение \"%s\" не может быть установлено, так как оно не совместимо с этой версией ownCloud.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "Приложение \"%s\" не может быть установлено, так как следующие зависимости не выполнены: %s",
"No app name specified" : "Не указано имя приложения",
"Unknown filetype" : "Неизвестный тип файла",
"Invalid image" : "Изображение повреждено",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "Укажите правильный пароль",
"The username is already being used" : "Имя пользователя уже используется",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Не установлены драйвера баз данных (sqlite, mysql или postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в корневой каталог%s.",
"Cannot write into \"config\" directory" : "Запись в каталог \"config\" невозможна",
"Cannot write into \"apps\" directory" : "Запись в каталог \"app\" невозможна",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в каталог приложений%s или отключив хранилище программ в файле конфигурации.",
"Cannot create \"data\" directory (%s)" : "Невозможно создать каталог \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Обычно это можно исправить, <a href=\"%s\" target=\"_blank\">предоставив веб-серверу права на запись в корневом каталоге.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Обычно это можно исправить, %sпредоставив веб-серверу права на запись в корневой каталог%s.",
"Setting locale to %s failed" : "Установка локали %s не удалась",
"Please install one of these locales on your system and restart your webserver." : "Установите один из этих языковых пакетов на вашу систему и перезапустите веб-сервер.",
"Please ask your server administrator to install the module." : "Пожалуйста, попростите администратора сервера установить модуль.",
"PHP module %s not installed." : "Не установлен PHP-модуль %s.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Параметр PHP \"%s\" не установлен в \"%s\".",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Установка этого параметра в php.ini позволит запуститься ownCloud снова.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Пожалуйста, обратитесь к администратору сервера, чтобы обновить PHP до последней версии. Установленная версия PHP больше не поддерживается ownCloud и сообществом PHP.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "В PHP включена директива \"always_populate_raw_post_data\". PHP версии 5.6 и выше, при включенной директиве, добавляет уведомления в журнал даже для абсолютно рабочего кода.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Что-бы исправить эту ошибку, укажите значение <code>-1</code> в качестве значения параметра <code>always_populate_raw_post_data</code> в вашем php.ini",
diff --git a/lib/l10n/si_LK.js b/lib/l10n/si_LK.js
index 09d5d0c84da..e3eea5e0b9b 100644
--- a/lib/l10n/si_LK.js
+++ b/lib/l10n/si_LK.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "උදව්",
"Personal" : "පෞද්ගලික",
- "Settings" : "සිටුවම්",
"Users" : "පරිශීලකයන්",
"Admin" : "පරිපාලක",
"today" : "අද",
diff --git a/lib/l10n/si_LK.json b/lib/l10n/si_LK.json
index 6c65802af2e..f1ac256a740 100644
--- a/lib/l10n/si_LK.json
+++ b/lib/l10n/si_LK.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "උදව්",
"Personal" : "පෞද්ගලික",
- "Settings" : "සිටුවම්",
"Users" : "පරිශීලකයන්",
"Admin" : "පරිපාලක",
"today" : "අද",
diff --git a/lib/l10n/sk_SK.js b/lib/l10n/sk_SK.js
index 47b404ff4a1..dc3ca3ec284 100644
--- a/lib/l10n/sk_SK.js
+++ b/lib/l10n/sk_SK.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud je vyžadovaný v nižšej verzii ako %s.",
"Help" : "Pomoc",
"Personal" : "Osobné",
- "Settings" : "Nastavenia",
"Users" : "Používatelia",
"Admin" : "Administrátor",
"Recommended" : "Odporúčané",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikáciu \\\"%s\\\" nemožno nainštalovať, pretože nie je kompatibilná s touto verziou systému ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikáciu \\\"%s\\\" nemožno nainštalovať, pretože nie sú splnené nasledovné závislosti: %s",
"No app name specified" : "Nešpecifikované meno aplikácie",
"Unknown filetype" : "Neznámy typ súboru",
"Invalid image" : "Chybný obrázok",
@@ -108,16 +105,18 @@ OC.L10N.register(
"A valid password must be provided" : "Musíte zadať platné heslo",
"The username is already being used" : "Meno používateľa je už použité",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ovládače databázy (sqlite, mysql, alebo postgresql) nie sú nainštalované.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnenia je zvyčajne možné opraviť tým, že %sudelíte webovému serveru oprávnenie na zápis do koreňového priečinka%s.",
"Cannot write into \"config\" directory" : "Nie je možné zapisovať do priečinka \"config\"",
"Cannot write into \"apps\" directory" : "Nie je možné zapisovať do priečinka \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Toto je zvyčajne možné opraviť tým, že %s udelíte webovému serveru oprávnenie na zápis do priečinka aplikácií %s alebo vypnete obchod s aplikáciami v konfiguračnom súbore.",
"Cannot create \"data\" directory (%s)" : "Nie je možné vytvoriť priečinok \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Toto je zvyčajne možné opraviť tým, že <a href=\"%s\" target=\"_blank\">udelíte webovému serveru oprávnenie na zápis do koreňového adresára</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnenia je zvyčajne možné opraviť tým, že %sudelíte webovému serveru oprávnenie na zápis do koreňového priečinka%s.",
"Setting locale to %s failed" : "Nastavenie locale na %s zlyhalo",
"Please install one of these locales on your system and restart your webserver." : "Prosím, nainštalujte si aspoň jeden z týchto jazykov so svojho systému a reštartujte webserver.",
"Please ask your server administrator to install the module." : "Prosím, požiadajte administrátora vášho servera o inštaláciu modulu.",
"PHP module %s not installed." : "PHP modul %s nie je nainštalovaný.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Voľba PHP „%s“ nie je nastavená na „%s“.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Zmenou tejto voľby v php.ini znovu uvediete váš ownCloud do prevádzky",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Prosím, požiadajte administrátora vášho servera o aktualizáciu PHP na najnovšiu verziu. Vaša verzia PHP už nie je podporovaná ownCloud-om a PHP komunitou.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP je nakonfigurovaný tak, aby vytváralo raw post dáta. Od verzie 5.6 to nastavenie bude PHP vypisovať oznámenia aj pre dokonale platný kód.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Ak chcete tento problém vyriešiť, nastavte <code>always_populate_raw_post_data</code> na <code>-1</code> vo vašom php.ini",
diff --git a/lib/l10n/sk_SK.json b/lib/l10n/sk_SK.json
index 6d9768f569a..eebc75c53ee 100644
--- a/lib/l10n/sk_SK.json
+++ b/lib/l10n/sk_SK.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "ownCloud je vyžadovaný v nižšej verzii ako %s.",
"Help" : "Pomoc",
"Personal" : "Osobné",
- "Settings" : "Nastavenia",
"Users" : "Používatelia",
"Admin" : "Administrátor",
"Recommended" : "Odporúčané",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Aplikáciu \\\"%s\\\" nemožno nainštalovať, pretože nie je kompatibilná s touto verziou systému ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Aplikáciu \\\"%s\\\" nemožno nainštalovať, pretože nie sú splnené nasledovné závislosti: %s",
"No app name specified" : "Nešpecifikované meno aplikácie",
"Unknown filetype" : "Neznámy typ súboru",
"Invalid image" : "Chybný obrázok",
@@ -106,16 +103,18 @@
"A valid password must be provided" : "Musíte zadať platné heslo",
"The username is already being used" : "Meno používateľa je už použité",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ovládače databázy (sqlite, mysql, alebo postgresql) nie sú nainštalované.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnenia je zvyčajne možné opraviť tým, že %sudelíte webovému serveru oprávnenie na zápis do koreňového priečinka%s.",
"Cannot write into \"config\" directory" : "Nie je možné zapisovať do priečinka \"config\"",
"Cannot write into \"apps\" directory" : "Nie je možné zapisovať do priečinka \"apps\"",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Toto je zvyčajne možné opraviť tým, že %s udelíte webovému serveru oprávnenie na zápis do priečinka aplikácií %s alebo vypnete obchod s aplikáciami v konfiguračnom súbore.",
"Cannot create \"data\" directory (%s)" : "Nie je možné vytvoriť priečinok \"data\" (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Toto je zvyčajne možné opraviť tým, že <a href=\"%s\" target=\"_blank\">udelíte webovému serveru oprávnenie na zápis do koreňového adresára</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Oprávnenia je zvyčajne možné opraviť tým, že %sudelíte webovému serveru oprávnenie na zápis do koreňového priečinka%s.",
"Setting locale to %s failed" : "Nastavenie locale na %s zlyhalo",
"Please install one of these locales on your system and restart your webserver." : "Prosím, nainštalujte si aspoň jeden z týchto jazykov so svojho systému a reštartujte webserver.",
"Please ask your server administrator to install the module." : "Prosím, požiadajte administrátora vášho servera o inštaláciu modulu.",
"PHP module %s not installed." : "PHP modul %s nie je nainštalovaný.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Voľba PHP „%s“ nie je nastavená na „%s“.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Zmenou tejto voľby v php.ini znovu uvediete váš ownCloud do prevádzky",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Prosím, požiadajte administrátora vášho servera o aktualizáciu PHP na najnovšiu verziu. Vaša verzia PHP už nie je podporovaná ownCloud-om a PHP komunitou.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP je nakonfigurovaný tak, aby vytváralo raw post dáta. Od verzie 5.6 to nastavenie bude PHP vypisovať oznámenia aj pre dokonale platný kód.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Ak chcete tento problém vyriešiť, nastavte <code>always_populate_raw_post_data</code> na <code>-1</code> vo vašom php.ini",
diff --git a/lib/l10n/sl.js b/lib/l10n/sl.js
index 91efdf6d6eb..d934e56df4f 100644
--- a/lib/l10n/sl.js
+++ b/lib/l10n/sl.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "Zahtevana je različica ownCloud %s ali nižja.",
"Help" : "Pomoč",
"Personal" : "Osebno",
- "Settings" : "Nastavitve",
"Users" : "Uporabniki",
"Admin" : "Skrbništvo",
"Recommended" : "Priporočljivo",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Programnika \\\"%s\\\" ni mogoče namestiti, ker različica programa ni skladna z različico okolja ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Programa \\\"%s\\\" ni mogoče namestiti zaradi nerešenih odvisnosti: %s",
"No app name specified" : "Ni podanega imena programa",
"Unknown filetype" : "Neznana vrsta datoteke",
"Invalid image" : "Neveljavna slika",
@@ -108,16 +105,17 @@ OC.L10N.register(
"A valid password must be provided" : "Navedeno mora biti veljavno geslo",
"The username is already being used" : "Vpisano uporabniško ime je že v uporabi",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ni nameščenih programnikov podatkovnih zbirk (sqlite, mysql, ali postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dovoljenja je mogoče odpraviti z %sdodelitvijo dovoljenja spletnemu strežniku za pisanje korensko mapo%s.",
"Cannot write into \"config\" directory" : "Mapa 'config' nima nastavljenih ustreznih dovoljenj za pisanje!",
"Cannot write into \"apps\" directory" : "Mapa \"apps\" nima nastavljenih ustreznih dovoljenj za pisanje!",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku %s za pisanje v mapo programov %s, ali pa z onemogočanjem nameščanja programov v nastavitveni datoteki.",
"Cannot create \"data\" directory (%s)" : "Ni mogoče ustvariti\"podatkovne\" mape (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Napako je mogoče odpraviti z <a href=\"%s\" target=\"_blank\">dodelitvijo dovoljenja spletnemu strežniku za pisanje v korensko mapo</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dovoljenja je mogoče odpraviti z %sdodelitvijo dovoljenja spletnemu strežniku za pisanje korensko mapo%s.",
"Setting locale to %s failed" : "Nastavljanje jezikovnih določil na %s je spodletelo.",
"Please install one of these locales on your system and restart your webserver." : "Namestiti je treba podporo za vsaj eno od navedenih jezikovnih določil v sistemu in nato ponovno zagnati spletni strežnik.",
"Please ask your server administrator to install the module." : "Obvestite skrbnika strežnika, da je treba namestiti manjkajoč modul.",
"PHP module %s not installed." : "Modul PHP %s ni nameščen.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Nastavitev PHP \"%s\" ni nastavljena na \"%s\".",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Obvestite skrbnika strežnika, da je treba posodobiti okolje PHP na najnovejšo različico. Trenutno nameščene različice skupnost PHP in ownCloud ne podpira več.",
"PHP modules have been installed, but they are still listed as missing?" : "Ali so bili moduli PHP nameščeni, pa so še vedno označeni kot manjkajoči?",
"Please ask your server administrator to restart the web server." : "Obvestite skrbnika strežnika, da je treba ponovno zagnati spletni strežnik.",
diff --git a/lib/l10n/sl.json b/lib/l10n/sl.json
index 3c70d01bc66..714b2770fb5 100644
--- a/lib/l10n/sl.json
+++ b/lib/l10n/sl.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "Zahtevana je različica ownCloud %s ali nižja.",
"Help" : "Pomoč",
"Personal" : "Osebno",
- "Settings" : "Nastavitve",
"Users" : "Uporabniki",
"Admin" : "Skrbništvo",
"Recommended" : "Priporočljivo",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Programnika \\\"%s\\\" ni mogoče namestiti, ker različica programa ni skladna z različico okolja ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Programa \\\"%s\\\" ni mogoče namestiti zaradi nerešenih odvisnosti: %s",
"No app name specified" : "Ni podanega imena programa",
"Unknown filetype" : "Neznana vrsta datoteke",
"Invalid image" : "Neveljavna slika",
@@ -106,16 +103,17 @@
"A valid password must be provided" : "Navedeno mora biti veljavno geslo",
"The username is already being used" : "Vpisano uporabniško ime je že v uporabi",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Ni nameščenih programnikov podatkovnih zbirk (sqlite, mysql, ali postgresql).",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dovoljenja je mogoče odpraviti z %sdodelitvijo dovoljenja spletnemu strežniku za pisanje korensko mapo%s.",
"Cannot write into \"config\" directory" : "Mapa 'config' nima nastavljenih ustreznih dovoljenj za pisanje!",
"Cannot write into \"apps\" directory" : "Mapa \"apps\" nima nastavljenih ustreznih dovoljenj za pisanje!",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Napako je mogoče odpraviti z dodelitvijo dovoljenja spletnemu strežniku %s za pisanje v mapo programov %s, ali pa z onemogočanjem nameščanja programov v nastavitveni datoteki.",
"Cannot create \"data\" directory (%s)" : "Ni mogoče ustvariti\"podatkovne\" mape (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Napako je mogoče odpraviti z <a href=\"%s\" target=\"_blank\">dodelitvijo dovoljenja spletnemu strežniku za pisanje v korensko mapo</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Dovoljenja je mogoče odpraviti z %sdodelitvijo dovoljenja spletnemu strežniku za pisanje korensko mapo%s.",
"Setting locale to %s failed" : "Nastavljanje jezikovnih določil na %s je spodletelo.",
"Please install one of these locales on your system and restart your webserver." : "Namestiti je treba podporo za vsaj eno od navedenih jezikovnih določil v sistemu in nato ponovno zagnati spletni strežnik.",
"Please ask your server administrator to install the module." : "Obvestite skrbnika strežnika, da je treba namestiti manjkajoč modul.",
"PHP module %s not installed." : "Modul PHP %s ni nameščen.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "Nastavitev PHP \"%s\" ni nastavljena na \"%s\".",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Obvestite skrbnika strežnika, da je treba posodobiti okolje PHP na najnovejšo različico. Trenutno nameščene različice skupnost PHP in ownCloud ne podpira več.",
"PHP modules have been installed, but they are still listed as missing?" : "Ali so bili moduli PHP nameščeni, pa so še vedno označeni kot manjkajoči?",
"Please ask your server administrator to restart the web server." : "Obvestite skrbnika strežnika, da je treba ponovno zagnati spletni strežnik.",
diff --git a/lib/l10n/sq.js b/lib/l10n/sq.js
index a92d868f116..3c89e0cbbad 100644
--- a/lib/l10n/sq.js
+++ b/lib/l10n/sq.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Ndihmë",
"Personal" : "Personale",
- "Settings" : "Parametra",
"Users" : "Përdoruesit",
"Admin" : "Admin",
"Recommended" : "E rekomanduar",
diff --git a/lib/l10n/sq.json b/lib/l10n/sq.json
index 4903e1be195..1af0e50c65b 100644
--- a/lib/l10n/sq.json
+++ b/lib/l10n/sq.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Ndihmë",
"Personal" : "Personale",
- "Settings" : "Parametra",
"Users" : "Përdoruesit",
"Admin" : "Admin",
"Recommended" : "E rekomanduar",
diff --git a/lib/l10n/sr.js b/lib/l10n/sr.js
index 4b2b401c127..8c2fa582be5 100644
--- a/lib/l10n/sr.js
+++ b/lib/l10n/sr.js
@@ -3,14 +3,16 @@ OC.L10N.register(
{
"Help" : "Помоћ",
"Personal" : "Лично",
- "Settings" : "Поставке",
"Users" : "Корисници",
"Admin" : "Администратор",
+ "Recommended" : "Препоручено",
+ "Unknown filetype" : "Непознат тип фајла",
+ "Invalid image" : "Неисправна слика",
"today" : "данас",
"yesterday" : "јуче",
- "_%n day ago_::_%n days ago_" : ["","",""],
+ "_%n day ago_::_%n days ago_" : ["пре %n дан","пре %n дана","пре %n дана"],
"last month" : "прошлог месеца",
- "_%n month ago_::_%n months ago_" : ["","",""],
+ "_%n month ago_::_%n months ago_" : ["пре %n месец","пре %n месеца","пре %n месеци"],
"last year" : "прошле године",
"_%n year ago_::_%n years ago_" : ["","",""],
"_%n hour ago_::_%n hours ago_" : ["","",""],
diff --git a/lib/l10n/sr.json b/lib/l10n/sr.json
index a9d28c1ea5a..d30ac876df4 100644
--- a/lib/l10n/sr.json
+++ b/lib/l10n/sr.json
@@ -1,14 +1,16 @@
{ "translations": {
"Help" : "Помоћ",
"Personal" : "Лично",
- "Settings" : "Поставке",
"Users" : "Корисници",
"Admin" : "Администратор",
+ "Recommended" : "Препоручено",
+ "Unknown filetype" : "Непознат тип фајла",
+ "Invalid image" : "Неисправна слика",
"today" : "данас",
"yesterday" : "јуче",
- "_%n day ago_::_%n days ago_" : ["","",""],
+ "_%n day ago_::_%n days ago_" : ["пре %n дан","пре %n дана","пре %n дана"],
"last month" : "прошлог месеца",
- "_%n month ago_::_%n months ago_" : ["","",""],
+ "_%n month ago_::_%n months ago_" : ["пре %n месец","пре %n месеца","пре %n месеци"],
"last year" : "прошле године",
"_%n year ago_::_%n years ago_" : ["","",""],
"_%n hour ago_::_%n hours ago_" : ["","",""],
diff --git a/lib/l10n/sr@latin.js b/lib/l10n/sr@latin.js
index be1a41c85ff..263365f9e35 100644
--- a/lib/l10n/sr@latin.js
+++ b/lib/l10n/sr@latin.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Pomoć",
"Personal" : "Lično",
- "Settings" : "Podešavanja",
"Users" : "Korisnici",
"Admin" : "Adninistracija",
"Unknown filetype" : "Nepoznat tip fajla",
diff --git a/lib/l10n/sr@latin.json b/lib/l10n/sr@latin.json
index b6aeff717c0..753466c538d 100644
--- a/lib/l10n/sr@latin.json
+++ b/lib/l10n/sr@latin.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Pomoć",
"Personal" : "Lično",
- "Settings" : "Podešavanja",
"Users" : "Korisnici",
"Admin" : "Adninistracija",
"Unknown filetype" : "Nepoznat tip fajla",
diff --git a/lib/l10n/sv.js b/lib/l10n/sv.js
index b4c471592b5..d4bbd1a3c28 100644
--- a/lib/l10n/sv.js
+++ b/lib/l10n/sv.js
@@ -19,12 +19,9 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud med version lägre än %s krävs.",
"Help" : "Hjälp",
"Personal" : "Personligt",
- "Settings" : "Inställningar",
"Users" : "Användare",
"Admin" : "Admin",
"Recommended" : "Rekomenderad",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Applikationen \\\"%s\\\" kan inte installeras då en inte är kompatibel med denna version utav ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Appen \\\"%s\\\" kan inte installerad då följande beroenden inte är uppfyllda: %s",
"No app name specified" : "Inget appnamn angivet",
"Unknown filetype" : "Okänd filtyp",
"Invalid image" : "Ogiltig bild",
@@ -108,12 +105,12 @@ OC.L10N.register(
"A valid password must be provided" : "Ett giltigt lösenord måste anges",
"The username is already being used" : "Användarnamnet används redan",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Inga databasdrivrutiner (sqlite, mysql, eller postgresql) installerade.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rättigheterna kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till rootkatalogen %s.",
"Cannot write into \"config\" directory" : "Kan inte skriva till \"config\" katalogen",
"Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till applikationskatalogen %s eller stänga av app-butik i konfigurationsfilen.",
"Cannot create \"data\" directory (%s)" : "Kan inte skapa \"data\" katalog (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Detta kan vanligtvis åtgärdas genom att ge <a href=\"%s\" target=\"_blank\">webservern skrivrättigheter till rootkatalogen</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rättigheterna kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till rootkatalogen %s.",
"Setting locale to %s failed" : "Sätta locale till %s misslyckades",
"Please install one of these locales on your system and restart your webserver." : "Vänligen installera en av dessa locale på din server och starta om dinn webbserver,",
"Please ask your server administrator to install the module." : "Vänligen be din administratör att installera modulen.",
diff --git a/lib/l10n/sv.json b/lib/l10n/sv.json
index c9af123467b..61381b16d48 100644
--- a/lib/l10n/sv.json
+++ b/lib/l10n/sv.json
@@ -17,12 +17,9 @@
"ownCloud with a version lower than %s is required." : "ownCloud med version lägre än %s krävs.",
"Help" : "Hjälp",
"Personal" : "Personligt",
- "Settings" : "Inställningar",
"Users" : "Användare",
"Admin" : "Admin",
"Recommended" : "Rekomenderad",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Applikationen \\\"%s\\\" kan inte installeras då en inte är kompatibel med denna version utav ownCloud.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "Appen \\\"%s\\\" kan inte installerad då följande beroenden inte är uppfyllda: %s",
"No app name specified" : "Inget appnamn angivet",
"Unknown filetype" : "Okänd filtyp",
"Invalid image" : "Ogiltig bild",
@@ -106,12 +103,12 @@
"A valid password must be provided" : "Ett giltigt lösenord måste anges",
"The username is already being used" : "Användarnamnet används redan",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Inga databasdrivrutiner (sqlite, mysql, eller postgresql) installerade.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rättigheterna kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till rootkatalogen %s.",
"Cannot write into \"config\" directory" : "Kan inte skriva till \"config\" katalogen",
"Cannot write into \"apps\" directory" : "Kan inte skriva till \"apps\" katalogen!",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Detta kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till applikationskatalogen %s eller stänga av app-butik i konfigurationsfilen.",
"Cannot create \"data\" directory (%s)" : "Kan inte skapa \"data\" katalog (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "Detta kan vanligtvis åtgärdas genom att ge <a href=\"%s\" target=\"_blank\">webservern skrivrättigheter till rootkatalogen</a>.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "Rättigheterna kan vanligtvis åtgärdas genom att %s ger webbservern skrivrättigheter till rootkatalogen %s.",
"Setting locale to %s failed" : "Sätta locale till %s misslyckades",
"Please install one of these locales on your system and restart your webserver." : "Vänligen installera en av dessa locale på din server och starta om dinn webbserver,",
"Please ask your server administrator to install the module." : "Vänligen be din administratör att installera modulen.",
diff --git a/lib/l10n/ta_IN.js b/lib/l10n/ta_IN.js
index 27a3f155da1..a12702211c2 100644
--- a/lib/l10n/ta_IN.js
+++ b/lib/l10n/ta_IN.js
@@ -1,7 +1,6 @@
OC.L10N.register(
"lib",
{
- "Settings" : "அமைப்புகள்",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/ta_IN.json b/lib/l10n/ta_IN.json
index 937923e8068..b994fa289eb 100644
--- a/lib/l10n/ta_IN.json
+++ b/lib/l10n/ta_IN.json
@@ -1,5 +1,4 @@
{ "translations": {
- "Settings" : "அமைப்புகள்",
"_%n day ago_::_%n days ago_" : ["",""],
"_%n month ago_::_%n months ago_" : ["",""],
"_%n year ago_::_%n years ago_" : ["",""],
diff --git a/lib/l10n/ta_LK.js b/lib/l10n/ta_LK.js
index 758ad47a78d..fbf1b5c9e70 100644
--- a/lib/l10n/ta_LK.js
+++ b/lib/l10n/ta_LK.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "உதவி",
"Personal" : "தனிப்பட்ட",
- "Settings" : "அமைப்புகள்",
"Users" : "பயனாளர்",
"Admin" : "நிர்வாகம்",
"today" : "இன்று",
diff --git a/lib/l10n/ta_LK.json b/lib/l10n/ta_LK.json
index 378f926337e..89928821e59 100644
--- a/lib/l10n/ta_LK.json
+++ b/lib/l10n/ta_LK.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "உதவி",
"Personal" : "தனிப்பட்ட",
- "Settings" : "அமைப்புகள்",
"Users" : "பயனாளர்",
"Admin" : "நிர்வாகம்",
"today" : "இன்று",
diff --git a/lib/l10n/te.js b/lib/l10n/te.js
index 615c6bd68ca..2a3f206338a 100644
--- a/lib/l10n/te.js
+++ b/lib/l10n/te.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "సహాయం",
"Personal" : "వ్యక్తిగతం",
- "Settings" : "అమరికలు",
"Users" : "వాడుకరులు",
"today" : "ఈరోజు",
"yesterday" : "నిన్న",
diff --git a/lib/l10n/te.json b/lib/l10n/te.json
index 4b243366da1..1f9d621fdc0 100644
--- a/lib/l10n/te.json
+++ b/lib/l10n/te.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "సహాయం",
"Personal" : "వ్యక్తిగతం",
- "Settings" : "అమరికలు",
"Users" : "వాడుకరులు",
"today" : "ఈరోజు",
"yesterday" : "నిన్న",
diff --git a/lib/l10n/th_TH.js b/lib/l10n/th_TH.js
index 9ab8b29e5a0..536b6f52ce2 100644
--- a/lib/l10n/th_TH.js
+++ b/lib/l10n/th_TH.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "ช่วยเหลือ",
"Personal" : "ส่วนตัว",
- "Settings" : "ตั้งค่า",
"Users" : "ผู้ใช้งาน",
"Admin" : "ผู้ดูแล",
"today" : "วันนี้",
diff --git a/lib/l10n/th_TH.json b/lib/l10n/th_TH.json
index 13452ec720a..21b2cf74d6a 100644
--- a/lib/l10n/th_TH.json
+++ b/lib/l10n/th_TH.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "ช่วยเหลือ",
"Personal" : "ส่วนตัว",
- "Settings" : "ตั้งค่า",
"Users" : "ผู้ใช้งาน",
"Admin" : "ผู้ดูแล",
"today" : "วันนี้",
diff --git a/lib/l10n/tr.js b/lib/l10n/tr.js
index 0819c2b40f6..748b6c19e9b 100644
--- a/lib/l10n/tr.js
+++ b/lib/l10n/tr.js
@@ -11,7 +11,7 @@ OC.L10N.register(
"PHP with a version lower than %s is required." : "PHP'nin %s sürümü öncesi gerekli.",
"Following databases are supported: %s" : "Şu veritabanları desteklenmekte: %s",
"The command line tool %s could not be found" : "Komut satırı aracı %s bulunamadı",
- "The library %s is not available." : "%s kütüphanesi kullanılamıyor.",
+ "The library %s is not available." : "%s kütüphanesi mevcut değil.",
"Library %s with a version higher than %s is required - available version %s." : "%s kütüphanesinin %s sürümünden daha yüksek sürümü gerekli - kullanılabilir sürüm %s.",
"Library %s with a version lower than %s is required - available version %s." : "%s kütüphanesinin %s sürümünden daha düşük sürümü gerekli - kullanılabilir sürüm %s.",
"Following platforms are supported: %s" : "Aşağıdaki platformlar destekleniyor: %s",
@@ -19,12 +19,11 @@ OC.L10N.register(
"ownCloud with a version lower than %s is required." : "ownCloud %s sürümünden daha öncesi gerekli.",
"Help" : "Yardım",
"Personal" : "Kişisel",
- "Settings" : "Ayarlar",
"Users" : "Kullanıcılar",
"Admin" : "Yönetici",
"Recommended" : "Önerilen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "ownCloud yazılımının bu sürümü ile uyumlu olmadığı için \\\"%s\\\" uygulaması kurulamaz.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "\\\"%s\\\" uygulaması, şu bağımlılıklar sağlanmadığı için yüklenemiyor: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "ownCloud yazılımının bu sürümü ile uyumlu olmadığı için \"%s\" uygulaması kurulamaz.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "\"%s\" uygulaması, şu bağımlılıklar sağlanmadığı için yüklenemiyor: %s",
"No app name specified" : "Uygulama adı belirtilmedi",
"Unknown filetype" : "Bilinmeyen dosya türü",
"Invalid image" : "Geçersiz resim",
@@ -108,16 +107,18 @@ OC.L10N.register(
"A valid password must be provided" : "Geçerli bir parola mutlaka sağlanmalı",
"The username is already being used" : "Bu kullanıcı adı zaten kullanımda",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Yüklü veritabanı sürücüsü (sqlite, mysql veya postgresql) yok.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "İzinler genellikle, %sweb sunucusuna kök dizinine yazma erişimi verilerek%s çözülebilir",
"Cannot write into \"config\" directory" : "\"config\" dizinine yazılamıyor",
"Cannot write into \"apps\" directory" : "\"apps\" dizinine yazılamıyor",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Bu genellikle, %sweb sunucusuna apps dizinine yazma erişimi verilerek%s veya yapılandırma dosyasında appstore (uygulama mağazası) devre dışı bırakılarak çözülebilir.",
"Cannot create \"data\" directory (%s)" : "\"Veri\" dizini oluşturulamıyor (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "İzinler genellikle, <a href=\"%s\" target=\"_blank\">web sunucusuna kök dizinine yazma erişimi verilerek</a> çözülebilir.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "İzinler genellikle, %sweb sunucusuna kök dizinine yazma erişimi verilerek%s çözülebilir",
"Setting locale to %s failed" : "Dili %s olarak ayarlama başarısız",
"Please install one of these locales on your system and restart your webserver." : "Lütfen bu yerellerden birini sisteminize yükleyin ve web sunucunuzu yeniden başlatın.",
"Please ask your server administrator to install the module." : "Lütfen modülün kurulması için sunucu yöneticinize danışın.",
"PHP module %s not installed." : "PHP modülü %s yüklü değil.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP ayarı \"%s\", \"%s\" olarak ayarlanmamış.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Bu ayarı php.ini içerisinde ayarlamak ownCloud'ı tekrar çalıştıracak.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Lütfen PHP'yi en son sürüme güncellemesi için sunucu yönetinize danışın. PHP sürümünüz ownCloud ve PHP topluluğu tarafından artık desteklenmemektedir.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP, ham gönderi verisini yerleştirmek üzere ayarlanmış. PHP 5.6'dan itibaren tamamen geçerli kod olmasına rağmen PHP bilgi mesajları gösterecektir.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Bu hatayı düzeltmek için php.ini içerisindeki <code>always_populate_raw_post_data</code> ayarını <code>-1</code> olarak ayarlayın",
diff --git a/lib/l10n/tr.json b/lib/l10n/tr.json
index adbf8b1b94f..b62d07f3ac0 100644
--- a/lib/l10n/tr.json
+++ b/lib/l10n/tr.json
@@ -9,7 +9,7 @@
"PHP with a version lower than %s is required." : "PHP'nin %s sürümü öncesi gerekli.",
"Following databases are supported: %s" : "Şu veritabanları desteklenmekte: %s",
"The command line tool %s could not be found" : "Komut satırı aracı %s bulunamadı",
- "The library %s is not available." : "%s kütüphanesi kullanılamıyor.",
+ "The library %s is not available." : "%s kütüphanesi mevcut değil.",
"Library %s with a version higher than %s is required - available version %s." : "%s kütüphanesinin %s sürümünden daha yüksek sürümü gerekli - kullanılabilir sürüm %s.",
"Library %s with a version lower than %s is required - available version %s." : "%s kütüphanesinin %s sürümünden daha düşük sürümü gerekli - kullanılabilir sürüm %s.",
"Following platforms are supported: %s" : "Aşağıdaki platformlar destekleniyor: %s",
@@ -17,12 +17,11 @@
"ownCloud with a version lower than %s is required." : "ownCloud %s sürümünden daha öncesi gerekli.",
"Help" : "Yardım",
"Personal" : "Kişisel",
- "Settings" : "Ayarlar",
"Users" : "Kullanıcılar",
"Admin" : "Yönetici",
"Recommended" : "Önerilen",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "ownCloud yazılımının bu sürümü ile uyumlu olmadığı için \\\"%s\\\" uygulaması kurulamaz.",
- "App \\\"%s\\\" cannot be installed because the following dependencies are not fulfilled: %s" : "\\\"%s\\\" uygulaması, şu bağımlılıklar sağlanmadığı için yüklenemiyor: %s",
+ "App \"%s\" cannot be installed because it is not compatible with this version of ownCloud." : "ownCloud yazılımının bu sürümü ile uyumlu olmadığı için \"%s\" uygulaması kurulamaz.",
+ "App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s" : "\"%s\" uygulaması, şu bağımlılıklar sağlanmadığı için yüklenemiyor: %s",
"No app name specified" : "Uygulama adı belirtilmedi",
"Unknown filetype" : "Bilinmeyen dosya türü",
"Invalid image" : "Geçersiz resim",
@@ -106,16 +105,18 @@
"A valid password must be provided" : "Geçerli bir parola mutlaka sağlanmalı",
"The username is already being used" : "Bu kullanıcı adı zaten kullanımda",
"No database drivers (sqlite, mysql, or postgresql) installed." : "Yüklü veritabanı sürücüsü (sqlite, mysql veya postgresql) yok.",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "İzinler genellikle, %sweb sunucusuna kök dizinine yazma erişimi verilerek%s çözülebilir",
"Cannot write into \"config\" directory" : "\"config\" dizinine yazılamıyor",
"Cannot write into \"apps\" directory" : "\"apps\" dizinine yazılamıyor",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "Bu genellikle, %sweb sunucusuna apps dizinine yazma erişimi verilerek%s veya yapılandırma dosyasında appstore (uygulama mağazası) devre dışı bırakılarak çözülebilir.",
"Cannot create \"data\" directory (%s)" : "\"Veri\" dizini oluşturulamıyor (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "İzinler genellikle, <a href=\"%s\" target=\"_blank\">web sunucusuna kök dizinine yazma erişimi verilerek</a> çözülebilir.",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "İzinler genellikle, %sweb sunucusuna kök dizinine yazma erişimi verilerek%s çözülebilir",
"Setting locale to %s failed" : "Dili %s olarak ayarlama başarısız",
"Please install one of these locales on your system and restart your webserver." : "Lütfen bu yerellerden birini sisteminize yükleyin ve web sunucunuzu yeniden başlatın.",
"Please ask your server administrator to install the module." : "Lütfen modülün kurulması için sunucu yöneticinize danışın.",
"PHP module %s not installed." : "PHP modülü %s yüklü değil.",
+ "PHP setting \"%s\" is not set to \"%s\"." : "PHP ayarı \"%s\", \"%s\" olarak ayarlanmamış.",
+ "Adjusting this setting in php.ini will make ownCloud run again" : "Bu ayarı php.ini içerisinde ayarlamak ownCloud'ı tekrar çalıştıracak.",
"Please ask your server administrator to update PHP to the latest version. Your PHP version is no longer supported by ownCloud and the PHP community." : "Lütfen PHP'yi en son sürüme güncellemesi için sunucu yönetinize danışın. PHP sürümünüz ownCloud ve PHP topluluğu tarafından artık desteklenmemektedir.",
"PHP is configured to populate raw post data. Since PHP 5.6 this will lead to PHP throwing notices for perfectly valid code." : "PHP, ham gönderi verisini yerleştirmek üzere ayarlanmış. PHP 5.6'dan itibaren tamamen geçerli kod olmasına rağmen PHP bilgi mesajları gösterecektir.",
"To fix this issue set <code>always_populate_raw_post_data</code> to <code>-1</code> in your php.ini" : "Bu hatayı düzeltmek için php.ini içerisindeki <code>always_populate_raw_post_data</code> ayarını <code>-1</code> olarak ayarlayın",
diff --git a/lib/l10n/ug.js b/lib/l10n/ug.js
index 5ee6ccadd82..03369e132d3 100644
--- a/lib/l10n/ug.js
+++ b/lib/l10n/ug.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "ياردەم",
"Personal" : "شەخسىي",
- "Settings" : "تەڭشەكلەر",
"Users" : "ئىشلەتكۈچىلەر",
"today" : "بۈگۈن",
"yesterday" : "تۈنۈگۈن",
diff --git a/lib/l10n/ug.json b/lib/l10n/ug.json
index b73fb7e1b35..824bb116a40 100644
--- a/lib/l10n/ug.json
+++ b/lib/l10n/ug.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "ياردەم",
"Personal" : "شەخسىي",
- "Settings" : "تەڭشەكلەر",
"Users" : "ئىشلەتكۈچىلەر",
"today" : "بۈگۈن",
"yesterday" : "تۈنۈگۈن",
diff --git a/lib/l10n/uk.js b/lib/l10n/uk.js
index b2cd33fed40..469f1f55310 100644
--- a/lib/l10n/uk.js
+++ b/lib/l10n/uk.js
@@ -7,13 +7,12 @@ OC.L10N.register(
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Зазвичай це можна виправити, %sнадавши веб-серверу права на запис в теці конфігурації%s.",
"Sample configuration detected" : "Виявлено приклад конфігурації",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Була виявлена конфігурація з прикладу. Це може нашкодити вашій системі та не підтримується. Будь ласка, зверніться до документації перед внесенням змін в файл config.php",
+ "PHP %s or higher is required." : "Необхідно PHP %s або вище",
"Help" : "Допомога",
"Personal" : "Особисте",
- "Settings" : "Налаштування",
"Users" : "Користувачі",
"Admin" : "Адмін",
"Recommended" : "Рекомендуємо",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Додаток \\\"%s\\\" не встановлено через несумісність з даною версією ownCloud.",
"No app name specified" : "Не вказано ім'я додатку",
"Unknown filetype" : "Невідомий тип файлу",
"Invalid image" : "Невірне зображення",
diff --git a/lib/l10n/uk.json b/lib/l10n/uk.json
index 1a9c42d7d4e..bcc2d3f4d13 100644
--- a/lib/l10n/uk.json
+++ b/lib/l10n/uk.json
@@ -5,13 +5,12 @@
"This can usually be fixed by %sgiving the webserver write access to the config directory%s." : "Зазвичай це можна виправити, %sнадавши веб-серверу права на запис в теці конфігурації%s.",
"Sample configuration detected" : "Виявлено приклад конфігурації",
"It has been detected that the sample configuration has been copied. This can break your installation and is unsupported. Please read the documentation before performing changes on config.php" : "Була виявлена конфігурація з прикладу. Це може нашкодити вашій системі та не підтримується. Будь ласка, зверніться до документації перед внесенням змін в файл config.php",
+ "PHP %s or higher is required." : "Необхідно PHP %s або вище",
"Help" : "Допомога",
"Personal" : "Особисте",
- "Settings" : "Налаштування",
"Users" : "Користувачі",
"Admin" : "Адмін",
"Recommended" : "Рекомендуємо",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "Додаток \\\"%s\\\" не встановлено через несумісність з даною версією ownCloud.",
"No app name specified" : "Не вказано ім'я додатку",
"Unknown filetype" : "Невідомий тип файлу",
"Invalid image" : "Невірне зображення",
diff --git a/lib/l10n/ur_PK.js b/lib/l10n/ur_PK.js
index d02b480fd13..e4fcea7f162 100644
--- a/lib/l10n/ur_PK.js
+++ b/lib/l10n/ur_PK.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "مدد",
"Personal" : "ذاتی",
- "Settings" : "سیٹینگز",
"Users" : "یوزرز",
"Admin" : "ایڈمن",
"Unknown filetype" : "غیر معرروف قسم کی فائل",
diff --git a/lib/l10n/ur_PK.json b/lib/l10n/ur_PK.json
index bbe6e221b2a..605653eddcf 100644
--- a/lib/l10n/ur_PK.json
+++ b/lib/l10n/ur_PK.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "مدد",
"Personal" : "ذاتی",
- "Settings" : "سیٹینگز",
"Users" : "یوزرز",
"Admin" : "ایڈمن",
"Unknown filetype" : "غیر معرروف قسم کی فائل",
diff --git a/lib/l10n/vi.js b/lib/l10n/vi.js
index a7e68528166..bab0698ef76 100644
--- a/lib/l10n/vi.js
+++ b/lib/l10n/vi.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "Giúp đỡ",
"Personal" : "Cá nhân",
- "Settings" : "Cài đặt",
"Users" : "Người dùng",
"Admin" : "Quản trị",
"Unknown filetype" : "Không biết kiểu tập tin",
diff --git a/lib/l10n/vi.json b/lib/l10n/vi.json
index a7a29de350a..6f6aa42f7c9 100644
--- a/lib/l10n/vi.json
+++ b/lib/l10n/vi.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "Giúp đỡ",
"Personal" : "Cá nhân",
- "Settings" : "Cài đặt",
"Users" : "Người dùng",
"Admin" : "Quản trị",
"Unknown filetype" : "Không biết kiểu tập tin",
diff --git a/lib/l10n/zh_CN.js b/lib/l10n/zh_CN.js
index 75f97fc6879..6079f2a42e8 100644
--- a/lib/l10n/zh_CN.js
+++ b/lib/l10n/zh_CN.js
@@ -6,7 +6,6 @@ OC.L10N.register(
"PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。",
"Help" : "帮助",
"Personal" : "个人",
- "Settings" : "设置",
"Users" : "用户",
"Admin" : "管理",
"No app name specified" : "没有指定的 App 名称",
diff --git a/lib/l10n/zh_CN.json b/lib/l10n/zh_CN.json
index 46e10f91993..a26f75ee226 100644
--- a/lib/l10n/zh_CN.json
+++ b/lib/l10n/zh_CN.json
@@ -4,7 +4,6 @@
"PHP %s or higher is required." : "要求 PHP 版本 %s 或者更高。",
"Help" : "帮助",
"Personal" : "个人",
- "Settings" : "设置",
"Users" : "用户",
"Admin" : "管理",
"No app name specified" : "没有指定的 App 名称",
diff --git a/lib/l10n/zh_HK.js b/lib/l10n/zh_HK.js
index 1fa04277511..734c1679fac 100644
--- a/lib/l10n/zh_HK.js
+++ b/lib/l10n/zh_HK.js
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Help" : "幫助",
"Personal" : "個人",
- "Settings" : "設定",
"Users" : "用戶",
"Admin" : "管理",
"Recommended" : "建議",
diff --git a/lib/l10n/zh_HK.json b/lib/l10n/zh_HK.json
index 3ad83045700..e8226d3936b 100644
--- a/lib/l10n/zh_HK.json
+++ b/lib/l10n/zh_HK.json
@@ -1,7 +1,6 @@
{ "translations": {
"Help" : "幫助",
"Personal" : "個人",
- "Settings" : "設定",
"Users" : "用戶",
"Admin" : "管理",
"Recommended" : "建議",
diff --git a/lib/l10n/zh_TW.js b/lib/l10n/zh_TW.js
index 477fa6bda3a..f979264a1ac 100644
--- a/lib/l10n/zh_TW.js
+++ b/lib/l10n/zh_TW.js
@@ -10,11 +10,9 @@ OC.L10N.register(
"PHP %s or higher is required." : "需要 PHP %s 或更高版本",
"Help" : "說明",
"Personal" : "個人",
- "Settings" : "設定",
"Users" : "使用者",
"Admin" : "管理",
"Recommended" : "建議",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "無法安裝應用程式 %s 因為它和此版本的 ownCloud 不相容。",
"No app name specified" : "沒有指定應用程式名稱",
"Unknown filetype" : "未知的檔案類型",
"Invalid image" : "無效的圖片",
@@ -94,12 +92,12 @@ OC.L10N.register(
"A valid password must be provided" : "一定要提供一個有效的密碼",
"The username is already being used" : "這個使用者名稱已經有人使用了",
"No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝資料庫驅動程式 (sqlite, mysql, 或 postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "通常藉由%s開放網頁伺服器對根目錄的權限%s就可以修正權限問題",
"Cannot write into \"config\" directory" : "無法寫入 config 目錄",
"Cannot write into \"apps\" directory" : "無法寫入 apps 目錄",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "通常藉由%s開放網頁伺服器對 apps 目錄的權限%s或是在設定檔中關閉 appstore 就可以修正這個問題",
"Cannot create \"data\" directory (%s)" : "無法建立 data 目錄 (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "通常藉由<a href=\"%s\" target=\"_blank\">開放網頁伺服器對根目錄的權限</a>就可以修正權限問題",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "通常藉由%s開放網頁伺服器對根目錄的權限%s就可以修正權限問題",
"Setting locale to %s failed" : "設定語系為 %s 失敗",
"Please install one of these locales on your system and restart your webserver." : "請在系統中安裝這些語系的其中一個,然後重啓網頁伺服器",
"Please ask your server administrator to install the module." : "請詢問系統管理員來安裝這些模組",
diff --git a/lib/l10n/zh_TW.json b/lib/l10n/zh_TW.json
index 685214cbc06..ed0c7ab3899 100644
--- a/lib/l10n/zh_TW.json
+++ b/lib/l10n/zh_TW.json
@@ -8,11 +8,9 @@
"PHP %s or higher is required." : "需要 PHP %s 或更高版本",
"Help" : "說明",
"Personal" : "個人",
- "Settings" : "設定",
"Users" : "使用者",
"Admin" : "管理",
"Recommended" : "建議",
- "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "無法安裝應用程式 %s 因為它和此版本的 ownCloud 不相容。",
"No app name specified" : "沒有指定應用程式名稱",
"Unknown filetype" : "未知的檔案類型",
"Invalid image" : "無效的圖片",
@@ -92,12 +90,12 @@
"A valid password must be provided" : "一定要提供一個有效的密碼",
"The username is already being used" : "這個使用者名稱已經有人使用了",
"No database drivers (sqlite, mysql, or postgresql) installed." : "沒有安裝資料庫驅動程式 (sqlite, mysql, 或 postgresql)",
- "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "通常藉由%s開放網頁伺服器對根目錄的權限%s就可以修正權限問題",
"Cannot write into \"config\" directory" : "無法寫入 config 目錄",
"Cannot write into \"apps\" directory" : "無法寫入 apps 目錄",
"This can usually be fixed by %sgiving the webserver write access to the apps directory%s or disabling the appstore in the config file." : "通常藉由%s開放網頁伺服器對 apps 目錄的權限%s或是在設定檔中關閉 appstore 就可以修正這個問題",
"Cannot create \"data\" directory (%s)" : "無法建立 data 目錄 (%s)",
"This can usually be fixed by <a href=\"%s\" target=\"_blank\">giving the webserver write access to the root directory</a>." : "通常藉由<a href=\"%s\" target=\"_blank\">開放網頁伺服器對根目錄的權限</a>就可以修正權限問題",
+ "Permissions can usually be fixed by %sgiving the webserver write access to the root directory%s." : "通常藉由%s開放網頁伺服器對根目錄的權限%s就可以修正權限問題",
"Setting locale to %s failed" : "設定語系為 %s 失敗",
"Please install one of these locales on your system and restart your webserver." : "請在系統中安裝這些語系的其中一個,然後重啓網頁伺服器",
"Please ask your server administrator to install the module." : "請詢問系統管理員來安裝這些模組",
diff --git a/lib/private/activitymanager.php b/lib/private/activitymanager.php
index 70bd227b417..24acb5d5f69 100644
--- a/lib/private/activitymanager.php
+++ b/lib/private/activitymanager.php
@@ -25,6 +25,19 @@ class ActivityManager implements IManager {
*/
private $extensions = array();
+ /** @var array list of filters "name" => "is valid" */
+ protected $validFilters = array(
+ 'all' => true,
+ 'by' => true,
+ 'self' => true,
+ );
+
+ /** @var array list of type icons "type" => "css class" */
+ protected $typeIcons = array();
+
+ /** @var array list of special parameters "app" => ["text" => ["parameter" => "type"]] */
+ protected $specialParameters = array();
+
/**
* @param $app
* @param $subject
@@ -109,39 +122,45 @@ class ActivityManager implements IManager {
}
/**
- * @param array $types
- * @param string $filter
+ * @param string $method
* @return array
*/
- function filterNotificationTypes($types, $filter) {
+ function getDefaultTypes($method) {
+ $defaultTypes = array();
foreach($this->extensions as $extension) {
$c = $extension();
if ($c instanceof IExtension) {
- $result = $c->filterNotificationTypes($types, $filter);
- if (is_array($result)) {
- $types = $result;
+ $types = $c->getDefaultTypes($method);
+ if (is_array($types)) {
+ $defaultTypes = array_merge($types, $defaultTypes);
}
}
}
- return $types;
+ return $defaultTypes;
}
/**
- * @param string $method
- * @return array
+ * @param string $type
+ * @return string
*/
- function getDefaultTypes($method) {
- $defaultTypes = array();
+ function getTypeIcon($type) {
+ if (isset($this->typeIcons[$type])) {
+ return $this->typeIcons[$type];
+ }
+
foreach($this->extensions as $extension) {
$c = $extension();
if ($c instanceof IExtension) {
- $types = $c->getDefaultTypes($method);
- if (is_array($types)) {
- $defaultTypes = array_merge($types, $defaultTypes);
+ $icon = $c->getTypeIcon($type);
+ if (is_string($icon)) {
+ $this->typeIcons[$type] = $icon;
+ return $icon;
}
}
}
- return $defaultTypes;
+
+ $this->typeIcons[$type] = '';
+ return '';
}
/**
@@ -173,38 +192,30 @@ class ActivityManager implements IManager {
* @return array|false
*/
function getSpecialParameterList($app, $text) {
+ if (isset($this->specialParameters[$app][$text])) {
+ return $this->specialParameters[$app][$text];
+ }
+
+ if (!isset($this->specialParameters[$app])) {
+ $this->specialParameters[$app] = array();
+ }
+
foreach($this->extensions as $extension) {
$c = $extension();
if ($c instanceof IExtension) {
$specialParameter = $c->getSpecialParameterList($app, $text);
if (is_array($specialParameter)) {
+ $this->specialParameters[$app][$text] = $specialParameter;
return $specialParameter;
}
}
}
+ $this->specialParameters[$app][$text] = false;
return false;
}
/**
- * @param string $type
- * @return string
- */
- function getTypeIcon($type) {
- foreach($this->extensions as $extension) {
- $c = $extension();
- if ($c instanceof IExtension) {
- $icon = $c->getTypeIcon($type);
- if (is_string($icon)) {
- return $icon;
- }
- }
- }
-
- return '';
- }
-
- /**
* @param array $activity
* @return integer|false
*/
@@ -249,23 +260,54 @@ class ActivityManager implements IManager {
* @return boolean
*/
function isFilterValid($filterValue) {
+ if (isset($this->validFilters[$filterValue])) {
+ return $this->validFilters[$filterValue];
+ }
+
foreach($this->extensions as $extension) {
$c = $extension();
if ($c instanceof IExtension) {
if ($c->isFilterValid($filterValue) === true) {
+ $this->validFilters[$filterValue] = true;
return true;
}
}
}
+ $this->validFilters[$filterValue] = false;
return false;
}
/**
+ * @param array $types
+ * @param string $filter
+ * @return array
+ */
+ function filterNotificationTypes($types, $filter) {
+ if (!$this->isFilterValid($filter)) {
+ return $types;
+ }
+
+ foreach($this->extensions as $extension) {
+ $c = $extension();
+ if ($c instanceof IExtension) {
+ $result = $c->filterNotificationTypes($types, $filter);
+ if (is_array($result)) {
+ $types = $result;
+ }
+ }
+ }
+ return $types;
+ }
+
+ /**
* @param string $filter
* @return array
*/
function getQueryForFilter($filter) {
+ if (!$this->isFilterValid($filter)) {
+ return [null, null];
+ }
$conditions = array();
$parameters = array();
diff --git a/lib/private/api.php b/lib/private/api.php
index c58d2620684..23924c518bb 100644
--- a/lib/private/api.php
+++ b/lib/private/api.php
@@ -84,11 +84,14 @@ class OC_API {
* @param array $parameters
*/
public static function call($parameters) {
+ $request = \OC::$server->getRequest();
+ $method = $request->getMethod();
+
// Prepare the request variables
- if($_SERVER['REQUEST_METHOD'] == 'PUT') {
- parse_str(file_get_contents("php://input"), $parameters['_put']);
- } else if($_SERVER['REQUEST_METHOD'] == 'DELETE') {
- parse_str(file_get_contents("php://input"), $parameters['_delete']);
+ if($method === 'PUT') {
+ $parameters['_put'] = $request->getParams();
+ } else if($method === 'DELETE') {
+ $parameters['_delete'] = $request->getParams();
}
$name = $parameters['_route'];
// Foreach registered action
diff --git a/lib/private/app.php b/lib/private/app.php
index 60b644e58e2..9ae4ae30d74 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -27,6 +27,7 @@
*/
use OC\App\DependencyAnalyzer;
use OC\App\Platform;
+use OC\OCSClient;
/**
* This class manages the apps. It allows them to register and integrate in the
@@ -34,17 +35,17 @@ use OC\App\Platform;
* upgrading and removing apps.
*/
class OC_App {
- static private $settingsForms = array();
+ static private $appVersion = [];
static private $adminForms = array();
static private $personalForms = array();
static private $appInfo = array();
static private $appTypes = array();
static private $loadedApps = array();
- static private $checkedApps = array();
static private $altLogin = array();
/**
* clean the appId
+ *
* @param string|boolean $app AppId that needs to be cleaned
* @return string
*/
@@ -54,6 +55,7 @@ class OC_App {
/**
* loads all apps
+ *
* @param array $types
* @return bool
*
@@ -199,7 +201,7 @@ class OC_App {
* @param bool $forceRefresh whether to refresh the cache
* @param bool $all whether to return apps for all users, not only the
* currently logged in one
- * @return array
+ * @return string[]
*/
public static function getEnabledApps($forceRefresh = false, $all = false) {
if (!OC_Config::getValue('installed', false)) {
@@ -207,52 +209,29 @@ class OC_App {
}
// in incognito mode or when logged out, $user will be false,
// which is also the case during an upgrade
- $user = null;
- if (!$all) {
- $user = \OC_User::getUser();
- }
- if (is_string($user) && !$forceRefresh && !empty(self::$enabledAppsCache)) {
- return self::$enabledAppsCache;
+ $appManager = \OC::$server->getAppManager();
+ if ($all) {
+ $user = null;
+ } else {
+ $user = \OC::$server->getUserSession()->getUser();
}
- $apps = array();
- $appConfig = \OC::$server->getAppConfig();
- $appStatus = $appConfig->getValues(false, 'enabled');
- foreach ($appStatus as $app => $enabled) {
- if ($app === 'files') {
- continue;
- }
- if ($enabled === 'yes') {
- $apps[] = $app;
- } else if ($enabled !== 'no') {
- $groups = json_decode($enabled);
- if (is_array($groups)) {
- if (is_string($user)) {
- foreach ($groups as $group) {
- if (\OC_Group::inGroup($user, $group)) {
- $apps[] = $app;
- break;
- }
- }
- } else {
- // global, consider app as enabled
- $apps[] = $app;
- }
- }
- }
+
+ if (is_null($user)) {
+ $apps = $appManager->getInstalledApps();
+ } else {
+ $apps = $appManager->getEnabledAppsForUser($user);
}
+ $apps = array_filter($apps, function ($app) {
+ return $app !== 'files';//we add this manually
+ });
sort($apps);
array_unshift($apps, 'files');
- // Only cache the app list, when the user is logged in.
- // Otherwise we cache the list with disabled apps, although
- // the apps are enabled for the user after he logged in.
- if ($user) {
- self::$enabledAppsCache = $apps;
- }
return $apps;
}
/**
* checks whether or not an app is enabled
+ *
* @param string $app app
* @return bool
*
@@ -262,12 +241,12 @@ class OC_App {
if ('files' == $app) {
return true;
}
- $enabledApps = self::getEnabledApps();
- return in_array($app, $enabledApps);
+ return \OC::$server->getAppManager()->isEnabledForUser($app);
}
/**
* enables an app
+ *
* @param mixed $app app
* @param array $groups (optional) when set, only these groups will have access to the app
* @throws \Exception
@@ -281,10 +260,11 @@ class OC_App {
$app = self::installApp($app);
}
+ $appManager = \OC::$server->getAppManager();
if (!is_null($groups)) {
- OC_Appconfig::setValue($app, 'enabled', json_encode($groups));
- }else{
- OC_Appconfig::setValue($app, 'enabled', 'yes');
+ $appManager->enableAppForGroups($app, $groups);
+ } else {
+ $appManager->enableApp($app);
}
}
@@ -293,13 +273,13 @@ class OC_App {
* @return int
*/
public static function downloadApp($app) {
- $appData=OC_OCSClient::getApplication($app);
- $download=OC_OCSClient::getApplicationDownload($app, 1);
+ $appData= OCSClient::getApplication($app);
+ $download= OCSClient::getApplicationDownload($app, 1);
if(isset($download['downloadlink']) and $download['downloadlink']!='') {
// Replace spaces in download link without encoding entire URL
$download['downloadlink'] = str_replace(' ', '%20', $download['downloadlink']);
- $info = array('source'=>'http', 'href'=>$download['downloadlink'], 'appdata'=>$appData);
- $app=OC_Installer::installApp($info);
+ $info = array('source' => 'http', 'href' => $download['downloadlink'], 'appdata' => $appData);
+ $app = OC_Installer::installApp($info);
}
return $app;
}
@@ -318,20 +298,29 @@ class OC_App {
/**
* This function set an app as disabled in appconfig.
+ *
* @param string $app app
+ * @throws Exception
*/
public static function disable($app) {
+ // Convert OCS ID to regular application identifier
+ if(self::getInternalAppIdByOcs($app) !== false) {
+ $app = self::getInternalAppIdByOcs($app);
+ }
+
if($app === 'files') {
throw new \Exception("files can't be disabled.");
}
self::$enabledAppsCache = array(); // flush
// check if app is a shipped app or not. if not delete
\OC_Hook::emit('OC_App', 'pre_disable', array('app' => $app));
- OC_Appconfig::setValue($app, 'enabled', 'no' );
+ $appManager = \OC::$server->getAppManager();
+ $appManager->disableApp($app);
}
/**
* adds an entry to the navigation
+ *
* @param array $data array containing the data
* @return bool
*
@@ -354,6 +343,7 @@ class OC_App {
/**
* marks a navigation entry as active
+ *
* @param string $id id of the entry
* @return bool
*
@@ -368,6 +358,7 @@ class OC_App {
/**
* Get the navigation entries for the $app
+ *
* @param string $app app
* @return array an array of the $data added with addNavigationEntry
*
@@ -384,6 +375,7 @@ class OC_App {
/**
* gets the active Menu entry
+ *
* @return string id or empty string
*
* This function returns the id of the active navigation entry (set by
@@ -395,6 +387,7 @@ class OC_App {
/**
* Returns the Settings Navigation
+ *
* @return string
*
* This function returns an array containing all settings pages added. The
@@ -430,18 +423,6 @@ class OC_App {
"icon" => OC_Helper::imagePath("settings", "personal.svg")
);
- // if there are some settings forms
- if (!empty(self::$settingsForms)) {
- // settings menu
- $settings[] = array(
- "id" => "settings",
- "order" => 1000,
- "href" => OC_Helper::linkToRoute("settings_settings"),
- "name" => $l->t("Settings"),
- "icon" => OC_Helper::imagePath("settings", "settings.svg")
- );
- }
-
//SubAdmins are also allowed to access user management
if (OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
// admin users menu
@@ -454,7 +435,6 @@ class OC_App {
);
}
-
// if the user is an admin
if (OC_User::isAdminUser(OC_User::getUser())) {
// admin settings
@@ -492,7 +472,7 @@ class OC_App {
/**
* Get the path where to install apps
*
- * @return string
+ * @return string|false
*/
public static function getInstallPath() {
if (OC_Config::getValue('appstoreenabled', true) == false) {
@@ -512,6 +492,7 @@ class OC_App {
/**
* search for an app in all app-directories
+ *
* @param $appId
* @return mixed (bool|string)
*/
@@ -523,21 +504,21 @@ class OC_App {
}
$possibleApps = array();
- foreach(OC::$APPSROOTS as $dir) {
- if(file_exists($dir['path'] . '/' . $appId)) {
+ foreach (OC::$APPSROOTS as $dir) {
+ if (file_exists($dir['path'] . '/' . $appId)) {
$possibleApps[] = $dir;
}
}
if (empty($possibleApps)) {
return false;
- } elseif(count($possibleApps) === 1) {
+ } elseif (count($possibleApps) === 1) {
$dir = array_shift($possibleApps);
$app_dir[$appId] = $dir;
return $dir;
} else {
$versionToLoad = array();
- foreach($possibleApps as $possibleApp) {
+ foreach ($possibleApps as $possibleApp) {
$version = self::getAppVersionByPath($possibleApp['path']);
if (empty($versionToLoad) || version_compare($version, $versionToLoad['version'], '>')) {
$versionToLoad = array(
@@ -603,21 +584,25 @@ class OC_App {
* @return string
*/
public static function getAppVersion($appId) {
- $file = self::getAppPath($appId);
- return ($file !== false) ? self::getAppVersionByPath($file) : '0';
+ if (!isset(self::$appVersion[$appId])) {
+ $file = self::getAppPath($appId);
+ self::$appVersion[$appId] = ($file !== false) ? self::getAppVersionByPath($file) : '0';
+ }
+ return self::$appVersion[$appId];
}
/**
* get app's version based on it's path
+ *
* @param string $path
* @return string
*/
public static function getAppVersionByPath($path) {
$versionFile = $path . '/appinfo/version';
$infoFile = $path . '/appinfo/info.xml';
- if(is_file($versionFile)) {
+ if (is_file($versionFile)) {
return trim(file_get_contents($versionFile));
- }else{
+ } else {
$appData = self::getAppInfo($infoFile, true);
return isset($appData['version']) ? $appData['version'] : '';
}
@@ -645,7 +630,7 @@ class OC_App {
$parser = new \OC\App\InfoParser(\OC::$server->getHTTPHelper(), \OC::$server->getURLGenerator());
$data = $parser->parse($file);
- if(is_array($data)) {
+ if (is_array($data)) {
$data = OC_App::parseAppInfo($data);
}
@@ -656,6 +641,7 @@ class OC_App {
/**
* Returns the navigation
+ *
* @return array
*
* This function returns an array containing all entries added. The
@@ -675,10 +661,11 @@ class OC_App {
* @return string
*/
public static function getCurrentApp() {
- $script = substr(OC_Request::scriptName(), strlen(OC::$WEBROOT) + 1);
+ $request = \OC::$server->getRequest();
+ $script = substr($request->getScriptName(), strlen(OC::$WEBROOT) + 1);
$topFolder = substr($script, 0, strpos($script, '/'));
if (empty($topFolder)) {
- $path_info = OC_Request::getPathInfo();
+ $path_info = $request->getPathInfo();
if ($path_info) {
$topFolder = substr($path_info, 1, strpos($path_info, '/', 1) - 1);
}
@@ -692,14 +679,12 @@ class OC_App {
}
/**
- * get the forms for either settings, admin or personal
+ * @param string $type
+ * @return array
*/
public static function getForms($type) {
$forms = array();
switch ($type) {
- case 'settings':
- $source = self::$settingsForms;
- break;
case 'admin':
$source = self::$adminForms;
break;
@@ -716,13 +701,6 @@ class OC_App {
}
/**
- * register a settings form to be shown
- */
- public static function registerSettings($app, $page) {
- self::$settingsForms[] = $app . '/' . $page . '.php';
- }
-
- /**
* register an admin form to be shown
*
* @param string $app
@@ -739,16 +717,23 @@ class OC_App {
self::$personalForms[] = $app . '/' . $page . '.php';
}
- public static function registerLogIn($entry) {
+ /**
+ * @param array $entry
+ */
+ public static function registerLogIn(array $entry) {
self::$altLogin[] = $entry;
}
+ /**
+ * @return array
+ */
public static function getAlternativeLogIns() {
return self::$altLogin;
}
/**
* get a list of all apps in the apps folder
+ *
* @return array an array of app names (string IDs)
* @todo: change the name of this method to getInstalledApps, which is more accurate
*/
@@ -782,6 +767,7 @@ class OC_App {
/**
* Lists all apps, this is used in apps.php
+ *
* @return array
*/
public static function listAllApps($onlyLocal = false) {
@@ -808,7 +794,7 @@ class OC_App {
$info['groups'] = null;
if ($enabled === 'yes') {
$active = true;
- } else if($enabled === 'no') {
+ } else if ($enabled === 'no') {
$active = false;
} else {
$active = true;
@@ -817,7 +803,7 @@ class OC_App {
$info['active'] = $active;
- if(isset($info['shipped']) and ($info['shipped'] == 'true')) {
+ if (isset($info['shipped']) and ($info['shipped'] == 'true')) {
$info['internal'] = true;
$info['internallabel'] = (string)$l->t('Recommended');
$info['internalclass'] = 'recommendedapp';
@@ -829,9 +815,9 @@ class OC_App {
$info['update'] = OC_Installer::isUpdateAvailable($app);
- $appIcon = self::getAppPath($app) . '/img/' . $app.'.svg';
+ $appIcon = self::getAppPath($app) . '/img/' . $app . '.svg';
if (file_exists($appIcon)) {
- $info['preview'] = OC_Helper::imagePath($app, $app.'.svg');
+ $info['preview'] = OC_Helper::imagePath($app, $app . '.svg');
$info['previewAsIcon'] = true;
} else {
$appIcon = self::getAppPath($app) . '/img/app.svg';
@@ -855,7 +841,8 @@ class OC_App {
foreach ($remoteApps AS $key => $remote) {
if ($app['name'] === $remote['name'] ||
(isset($app['ocsid']) &&
- $app['ocsid'] === $remote['id'])) {
+ $app['ocsid'] === $remote['id'])
+ ) {
unset($remoteApps[$key]);
}
}
@@ -897,14 +884,30 @@ class OC_App {
}
/**
+ * Returns the internal app ID or false
+ * @param string $ocsID
+ * @return string|false
+ */
+ protected static function getInternalAppIdByOcs($ocsID) {
+ if(is_numeric($ocsID)) {
+ $idArray = \OC::$server->getAppConfig()->getValues(false, 'ocsid');
+ if(array_search($ocsID, $idArray)) {
+ return array_search($ocsID, $idArray);
+ }
+ }
+ return false;
+ }
+
+ /**
* get a list of all apps on apps.owncloud.com
- * @return array, multi-dimensional array of apps.
+ *
+ * @return array|false multi-dimensional array of apps.
* Keys: id, name, type, typename, personid, license, detailpage, preview, changed, description
*/
public static function getAppstoreApps($filter = 'approved', $category = null) {
$categories = array($category);
if (is_null($category)) {
- $categoryNames = OC_OCSClient::getCategories();
+ $categoryNames = OCSClient::getCategories();
if (is_array($categoryNames)) {
// Check that categories of apps were retrieved correctly
if (!$categories = array_keys($categoryNames)) {
@@ -916,16 +919,18 @@ class OC_App {
}
$page = 0;
- $remoteApps = OC_OCSClient::getApplications($categories, $page, $filter);
+ $remoteApps = OCSClient::getApplications($categories, $page, $filter);
$app1 = array();
$i = 0;
$l = \OC::$server->getL10N('core');
foreach ($remoteApps as $app) {
+ $potentialCleanId = self::getInternalAppIdByOcs($app['id']);
// enhance app info (for example the description)
$app1[$i] = OC_App::parseAppInfo($app);
$app1[$i]['author'] = $app['personid'];
$app1[$i]['ocs_id'] = $app['id'];
- $app1[$i]['internal'] = $app1[$i]['active'] = 0;
+ $app1[$i]['internal'] = 0;
+ $app1[$i]['active'] = ($potentialCleanId !== false) ? self::isEnabled($potentialCleanId) : false;
$app1[$i]['update'] = false;
$app1[$i]['groups'] = false;
$app1[$i]['score'] = $app['score'];
@@ -958,39 +963,6 @@ class OC_App {
}
/**
- * check if the current enabled apps are compatible with the current
- * ownCloud version. disable them if not.
- * This is important if you upgrade ownCloud and have non ported 3rd
- * party apps installed.
- *
- * @param array $apps optional app id list to check, uses all enabled apps
- * when not specified
- *
- * @return array containing the list of ids of the disabled apps
- */
- public static function checkAppsRequirements($apps = array()) {
- $disabledApps = array();
- if (empty($apps)) {
- $apps = OC_App::getEnabledApps();
- }
- $version = OC_Util::getVersion();
- foreach ($apps as $app) {
- // check if the app is compatible with this version of ownCloud
- $info = OC_App::getAppInfo($app);
- if(!self::isAppCompatible($version, $info)) {
- OC_Log::write('core',
- 'App "' . $info['name'] . '" (' . $app . ') can\'t be used because it is'
- . ' not compatible with this version of ownCloud',
- OC_Log::ERROR);
- OC_App::disable($app);
- OC_Hook::emit('update', 'success', 'Disabled ' . $info['name'] . ' app because it is not compatible');
- $disabledApps[] = $app;
- }
- }
- return $disabledApps;
- }
-
- /**
* Adjust the number of version parts of $version1 to match
* the number of version parts of $version2.
*
@@ -1024,11 +996,11 @@ class OC_App {
* and "requiremax" => 6 and it will still match ownCloud 6.0.3.
*
* @param string $ocVersion ownCloud version to check against
- * @param array $appInfo app info (from xml)
+ * @param array $appInfo app info (from xml)
*
* @return boolean true if compatible, otherwise false
*/
- public static function isAppCompatible($ocVersion, $appInfo){
+ public static function isAppCompatible($ocVersion, $appInfo) {
$requireMin = '';
$requireMax = '';
if (isset($appInfo['dependencies']['owncloud']['@attributes']['min-version'])) {
@@ -1098,27 +1070,40 @@ class OC_App {
public static function installApp($app) {
$l = \OC::$server->getL10N('core');
$config = \OC::$server->getConfig();
- $appData=OC_OCSClient::getApplication($app);
+ $appData=OCSClient::getApplication($app);
// check if app is a shipped app or not. OCS apps have an integer as id, shipped apps use a string
- if(!is_numeric($app)) {
- $shippedVersion=self::getAppVersion($app);
- if($appData && version_compare($shippedVersion, $appData['version'], '<')) {
+ if (!is_numeric($app)) {
+ $shippedVersion = self::getAppVersion($app);
+ if ($appData && version_compare($shippedVersion, $appData['version'], '<')) {
$app = self::downloadApp($app);
} else {
$app = OC_Installer::installShippedApp($app);
}
- }else{
- $app = self::downloadApp($app);
+ } else {
+ // Maybe the app is already installed - compare the version in this
+ // case and use the local already installed one.
+ // FIXME: This is a horrible hack. I feel sad. The god of code cleanness may forgive me.
+ $internalAppId = self::getInternalAppIdByOcs($app);
+ if($internalAppId !== false) {
+ if($appData && version_compare(\OC_App::getAppVersion($internalAppId), $appData['version'], '<')) {
+ $app = self::downloadApp($app);
+ } else {
+ self::enable($internalAppId);
+ $app = $internalAppId;
+ }
+ } else {
+ $app = self::downloadApp($app);
+ }
}
- if($app!==false) {
+ if ($app !== false) {
// check if the app is compatible with this version of ownCloud
$info = self::getAppInfo($app);
- $version=OC_Util::getVersion();
- if(!self::isAppCompatible($version, $info)) {
+ $version = OC_Util::getVersion();
+ if (!self::isAppCompatible($version, $info)) {
throw new \Exception(
- $l->t('App \"%s\" can\'t be installed because it is not compatible with this version of ownCloud.',
+ $l->t('App "%s" cannot be installed because it is not compatible with this version of ownCloud.',
array($info['name'])
)
);
@@ -1127,21 +1112,21 @@ class OC_App {
// check for required dependencies
$dependencyAnalyzer = new DependencyAnalyzer(new Platform($config), $l);
$missing = $dependencyAnalyzer->analyze($app);
- if(!empty($missing)) {
+ if (!empty($missing)) {
$missingMsg = join(PHP_EOL, $missing);
throw new \Exception(
- $l->t('App \"%s\" cannot be installed because the following dependencies are not fulfilled: %s',
+ $l->t('App "%s" cannot be installed because the following dependencies are not fulfilled: %s',
array($info['name'], $missingMsg)
)
);
}
$config->setAppValue($app, 'enabled', 'yes');
- if(isset($appData['id'])) {
- $config->setAppValue($app, 'ocsid', $appData['id'] );
+ if (isset($appData['id'])) {
+ $config->setAppValue($app, 'ocsid', $appData['id']);
}
\OC_Hook::emit('OC_App', 'post_enable', array('app' => $app));
- }else{
+ } else {
throw new \Exception($l->t("No app name specified"));
}
@@ -1158,6 +1143,7 @@ class OC_App {
if (file_exists(self::getAppPath($appId) . '/appinfo/database.xml')) {
OC_DB::updateDbFromStructure(self::getAppPath($appId) . '/appinfo/database.xml');
}
+ unset(self::$appVersion[$appId]);
if (!self::isEnabled($appId)) {
return false;
}
@@ -1188,7 +1174,7 @@ class OC_App {
/**
* @param string $appId
- * @return \OC\Files\View
+ * @return \OC\Files\View|false
*/
public static function getStorage($appId) {
if (OC_App::isEnabled($appId)) { //sanity check
@@ -1218,7 +1204,7 @@ class OC_App {
// just modify the description if it is available
// otherwise this will create a $data element with an empty 'description'
- if(isset($data['description'])) {
+ if (isset($data['description'])) {
// sometimes the description contains line breaks and they are then also
// shown in this way in the app management which isn't wanted as HTML
// manages line breaks itself
diff --git a/lib/private/app/appmanager.php b/lib/private/app/appmanager.php
index 20a765e3434..860d9e70a45 100644
--- a/lib/private/app/appmanager.php
+++ b/lib/private/app/appmanager.php
@@ -12,6 +12,7 @@ namespace OC\App;
use OCP\App\IAppManager;
use OCP\IAppConfig;
use OCP\IGroupManager;
+use OCP\IUser;
use OCP\IUserSession;
class AppManager implements IAppManager {
@@ -49,7 +50,7 @@ class AppManager implements IAppManager {
/**
* @return string[] $appId => $enabled
*/
- private function getInstalledApps() {
+ private function getInstalledAppsValues() {
if (!$this->installedAppsCache) {
$values = $this->appConfig->getValues(false, 'enabled');
$this->installedAppsCache = array_filter($values, function ($value) {
@@ -61,6 +62,29 @@ class AppManager implements IAppManager {
}
/**
+ * List all installed apps
+ *
+ * @return string[]
+ */
+ public function getInstalledApps() {
+ return array_keys($this->getInstalledAppsValues());
+ }
+
+ /**
+ * List all apps enabled for a user
+ *
+ * @param \OCP\IUser $user
+ * @return string[]
+ */
+ public function getEnabledAppsForUser(IUser $user) {
+ $apps = $this->getInstalledAppsValues();
+ $appsForUser = array_filter($apps, function ($enabled) use ($user) {
+ return $this->checkAppForUser($enabled, $user);
+ });
+ return array_keys($appsForUser);
+ }
+
+ /**
* Check if an app is enabled for user
*
* @param string $appId
@@ -71,24 +95,32 @@ class AppManager implements IAppManager {
if (is_null($user)) {
$user = $this->userSession->getUser();
}
- $installedApps = $this->getInstalledApps();
+ $installedApps = $this->getInstalledAppsValues();
if (isset($installedApps[$appId])) {
- $enabled = $installedApps[$appId];
- if ($enabled === 'yes') {
- return true;
- } elseif (is_null($user)) {
- return false;
- } else {
- $groupIds = json_decode($enabled);
- $userGroups = $this->groupManager->getUserGroupIds($user);
- foreach ($userGroups as $groupId) {
- if (array_search($groupId, $groupIds) !== false) {
- return true;
- }
+ return $this->checkAppForUser($installedApps[$appId], $user);
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * @param string $enabled
+ * @param IUser $user
+ * @return bool
+ */
+ private function checkAppForUser($enabled, $user) {
+ if ($enabled === 'yes') {
+ return true;
+ } elseif (is_null($user)) {
+ return false;
+ } else {
+ $groupIds = json_decode($enabled);
+ $userGroups = $this->groupManager->getUserGroupIds($user);
+ foreach ($userGroups as $groupId) {
+ if (array_search($groupId, $groupIds) !== false) {
+ return true;
}
- return false;
}
- } else {
return false;
}
}
@@ -100,7 +132,7 @@ class AppManager implements IAppManager {
* @return bool
*/
public function isInstalled($appId) {
- $installedApps = $this->getInstalledApps();
+ $installedApps = $this->getInstalledAppsValues();
return isset($installedApps[$appId]);
}
@@ -110,6 +142,7 @@ class AppManager implements IAppManager {
* @param string $appId
*/
public function enableApp($appId) {
+ $this->installedAppsCache[$appId] = 'yes';
$this->appConfig->setValue($appId, 'enabled', 'yes');
}
@@ -124,6 +157,7 @@ class AppManager implements IAppManager {
/** @var \OCP\IGroup $group */
return $group->getGID();
}, $groups);
+ $this->installedAppsCache[$appId] = json_encode($groupIds);
$this->appConfig->setValue($appId, 'enabled', json_encode($groupIds));
}
@@ -134,9 +168,10 @@ class AppManager implements IAppManager {
* @throws \Exception if app can't be disabled
*/
public function disableApp($appId) {
- if($appId === 'files') {
+ if ($appId === 'files') {
throw new \Exception("files can't be disabled.");
}
+ unset($this->installedAppsCache[$appId]);
$this->appConfig->setValue($appId, 'enabled', 'no');
}
}
diff --git a/lib/private/app/codechecker.php b/lib/private/app/codechecker.php
new file mode 100644
index 00000000000..dbec53579a8
--- /dev/null
+++ b/lib/private/app/codechecker.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * Copyright (c) 2015 Thomas Müller <deepdiver@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\App;
+
+use OC\Hooks\BasicEmitter;
+use PhpParser\Lexer;
+use PhpParser\Node;
+use PhpParser\Node\Name;
+use PhpParser\NodeTraverser;
+use PhpParser\NodeVisitorAbstract;
+use PhpParser\Parser;
+use RecursiveCallbackFilterIterator;
+use RecursiveDirectoryIterator;
+use RecursiveIteratorIterator;
+use RegexIterator;
+use SplFileInfo;
+
+class CodeChecker extends BasicEmitter {
+
+ const CLASS_EXTENDS_NOT_ALLOWED = 1000;
+ const CLASS_IMPLEMENTS_NOT_ALLOWED = 1001;
+ const STATIC_CALL_NOT_ALLOWED = 1002;
+ const CLASS_CONST_FETCH_NOT_ALLOWED = 1003;
+ const CLASS_NEW_FETCH_NOT_ALLOWED = 1004;
+
+ /** @var Parser */
+ private $parser;
+
+ /** @var string[] */
+ private $blackListedClassNames;
+
+ public function __construct() {
+ $this->parser = new Parser(new Lexer);
+ $this->blackListedClassNames = [
+ // classes replaced by the public api
+ 'OC_API',
+ 'OC_App',
+ 'OC_AppConfig',
+ 'OC_Avatar',
+ 'OC_BackgroundJob',
+ 'OC_Config',
+ 'OC_DB',
+ 'OC_Files',
+ 'OC_Helper',
+ 'OC_Hook',
+ 'OC_Image',
+ 'OC_JSON',
+ 'OC_L10N',
+ 'OC_Log',
+ 'OC_Mail',
+ 'OC_Preferences',
+ 'OC_Request',
+ 'OC_Response',
+ 'OC_Template',
+ 'OC_User',
+ 'OC_Util',
+ ];
+ }
+
+ /**
+ * @param string $appId
+ * @return array
+ */
+ public function analyse($appId) {
+ $appPath = \OC_App::getAppPath($appId);
+ if ($appPath === false) {
+ throw new \RuntimeException("No app with given id <$appId> known.");
+ }
+
+ return $this->analyseFolder($appPath);
+ }
+
+ /**
+ * @param string $folder
+ * @return array
+ */
+ public function analyseFolder($folder) {
+ $errors = [];
+
+ $excludes = array_map(function($item) use ($folder) {
+ return $folder . '/' . $item;
+ }, ['vendor', '3rdparty', '.git', 'l10n']);
+
+ $iterator = new RecursiveDirectoryIterator($folder, RecursiveDirectoryIterator::SKIP_DOTS);
+ $iterator = new RecursiveCallbackFilterIterator($iterator, function($item) use ($folder, $excludes){
+ /** @var SplFileInfo $item */
+ foreach($excludes as $exclude) {
+ if (substr($item->getPath(), 0, strlen($exclude)) === $exclude) {
+ return false;
+ }
+ }
+ return true;
+ });
+ $iterator = new RecursiveIteratorIterator($iterator);
+ $iterator = new RegexIterator($iterator, '/^.+\.php$/i');
+
+ foreach ($iterator as $file) {
+ /** @var SplFileInfo $file */
+ $this->emit('CodeChecker', 'analyseFileBegin', [$file->getPathname()]);
+ $errors = array_merge($this->analyseFile($file), $errors);
+ $this->emit('CodeChecker', 'analyseFileFinished', [$errors]);
+ }
+
+ return $errors;
+ }
+
+
+ /**
+ * @param string $file
+ * @return array
+ */
+ public function analyseFile($file) {
+ $code = file_get_contents($file);
+ $statements = $this->parser->parse($code);
+
+ $visitor = new CodeCheckVisitor($this->blackListedClassNames);
+ $traverser = new NodeTraverser;
+ $traverser->addVisitor($visitor);
+
+ $traverser->traverse($statements);
+
+ return $visitor->errors;
+ }
+}
diff --git a/lib/private/app/codecheckvisitor.php b/lib/private/app/codecheckvisitor.php
new file mode 100644
index 00000000000..939c905bcf6
--- /dev/null
+++ b/lib/private/app/codecheckvisitor.php
@@ -0,0 +1,111 @@
+<?php
+/**
+ * Copyright (c) 2015 Thomas Müller <deepdiver@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\App;
+
+use OC\Hooks\BasicEmitter;
+use PhpParser\Lexer;
+use PhpParser\Node;
+use PhpParser\Node\Name;
+use PhpParser\NodeTraverser;
+use PhpParser\NodeVisitorAbstract;
+use PhpParser\Parser;
+use RecursiveCallbackFilterIterator;
+use RecursiveDirectoryIterator;
+use RecursiveIteratorIterator;
+use RegexIterator;
+use SplFileInfo;
+
+class CodeCheckVisitor extends NodeVisitorAbstract {
+
+ public function __construct($blackListedClassNames) {
+ $this->blackListedClassNames = array_map('strtolower', $blackListedClassNames);
+ }
+
+ public $errors = [];
+
+ public function enterNode(Node $node) {
+ if ($node instanceof Node\Stmt\Class_) {
+ if (!is_null($node->extends)) {
+ $this->checkBlackList($node->extends->toString(), CodeChecker::CLASS_EXTENDS_NOT_ALLOWED, $node);
+ }
+ foreach ($node->implements as $implements) {
+ $this->checkBlackList($implements->toString(), CodeChecker::CLASS_IMPLEMENTS_NOT_ALLOWED, $node);
+ }
+ }
+ if ($node instanceof Node\Expr\StaticCall) {
+ if (!is_null($node->class)) {
+ if ($node->class instanceof Name) {
+ $this->checkBlackList($node->class->toString(), CodeChecker::STATIC_CALL_NOT_ALLOWED, $node);
+ }
+ if ($node->class instanceof Node\Expr\Variable) {
+ /**
+ * TODO: find a way to detect something like this:
+ * $c = "OC_API";
+ * $n = $i::call();
+ */
+ }
+ }
+ }
+ if ($node instanceof Node\Expr\ClassConstFetch) {
+ if (!is_null($node->class)) {
+ if ($node->class instanceof Name) {
+ $this->checkBlackList($node->class->toString(), CodeChecker::CLASS_CONST_FETCH_NOT_ALLOWED, $node);
+ }
+ if ($node->class instanceof Node\Expr\Variable) {
+ /**
+ * TODO: find a way to detect something like this:
+ * $c = "OC_API";
+ * $n = $i::ADMIN_AUTH;
+ */
+ }
+ }
+ }
+ if ($node instanceof Node\Expr\New_) {
+ if (!is_null($node->class)) {
+ if ($node->class instanceof Name) {
+ $this->checkBlackList($node->class->toString(), CodeChecker::CLASS_NEW_FETCH_NOT_ALLOWED, $node);
+ }
+ if ($node->class instanceof Node\Expr\Variable) {
+ /**
+ * TODO: find a way to detect something like this:
+ * $c = "OC_API";
+ * $n = new $i;
+ */
+ }
+ }
+ }
+ }
+
+ private function checkBlackList($name, $errorCode, Node $node) {
+ if (in_array(strtolower($name), $this->blackListedClassNames)) {
+ $this->errors[]= [
+ 'disallowedToken' => $name,
+ 'errorCode' => $errorCode,
+ 'line' => $node->getLine(),
+ 'reason' => $this->buildReason($name, $errorCode)
+ ];
+ }
+ }
+
+ private function buildReason($name, $errorCode) {
+ static $errorMessages= [
+ CodeChecker::CLASS_EXTENDS_NOT_ALLOWED => "used as base class",
+ CodeChecker::CLASS_IMPLEMENTS_NOT_ALLOWED => "used as interface",
+ CodeChecker::STATIC_CALL_NOT_ALLOWED => "static method call on private class",
+ CodeChecker::CLASS_CONST_FETCH_NOT_ALLOWED => "used to fetch a const from",
+ CodeChecker::CLASS_NEW_FETCH_NOT_ALLOWED => "is instanciated",
+ ];
+
+ if (isset($errorMessages[$errorCode])) {
+ return $errorMessages[$errorCode];
+ }
+
+ return "$name usage not allowed - error: $errorCode";
+ }
+}
diff --git a/lib/private/app/dependencyanalyzer.php b/lib/private/app/dependencyanalyzer.php
index e4564c4e036..c2706364b3b 100644
--- a/lib/private/app/dependencyanalyzer.php
+++ b/lib/private/app/dependencyanalyzer.php
@@ -50,17 +50,77 @@ class DependencyAnalyzer {
$this->analyzeOC($dependencies, $app));
}
+ /**
+ * Truncates both verions to the lowest common version, e.g.
+ * 5.1.2.3 and 5.1 will be turned into 5.1 and 5.1,
+ * 5.2.6.5 and 5.1 will be turned into 5.2 and 5.1
+ * @param string $first
+ * @param string $second
+ * @return array first element is the first version, second element is the
+ * second version
+ */
+ private function normalizeVersions($first, $second) {
+ $first = explode('.', $first);
+ $second = explode('.', $second);
+
+ // get both arrays to the same minimum size
+ $length = min(count($second), count($first));
+ $first = array_slice($first, 0, $length);
+ $second = array_slice($second, 0, $length);
+
+ return [implode('.', $first), implode('.', $second)];
+ }
+
+ /**
+ * Parameters will be normalized and then passed into version_compare
+ * in the same order they are specified in the method header
+ * @param string $first
+ * @param string $second
+ * @param string $operator
+ * @return bool result similar to version_compare
+ */
+ private function compare($first, $second, $operator) {
+ // we cant normalize versions if one of the given parameters is not a
+ // version string but null. In case one parameter is null normalization
+ // will therefore be skipped
+ if ($first !== null && $second !== null) {
+ list($first, $second) = $this->normalizeVersions($first, $second);
+ }
+
+ return version_compare($first, $second, $operator);
+ }
+
+ /**
+ * Checks if a version is bigger than another version
+ * @param string $first
+ * @param string $second
+ * @return bool true if the first version is bigger than the second
+ */
+ private function compareBigger($first, $second) {
+ return $this->compare($first, $second, '>');
+ }
+
+ /**
+ * Checks if a version is smaller than another version
+ * @param string $first
+ * @param string $second
+ * @return bool true if the first version is smaller than the second
+ */
+ private function compareSmaller($first, $second) {
+ return $this->compare($first, $second, '<');
+ }
+
private function analyzePhpVersion($dependencies) {
$missing = [];
if (isset($dependencies['php']['@attributes']['min-version'])) {
$minVersion = $dependencies['php']['@attributes']['min-version'];
- if (version_compare($this->platform->getPhpVersion(), $minVersion, '<')) {
+ if ($this->compareSmaller($this->platform->getPhpVersion(), $minVersion)) {
$missing[] = (string)$this->l->t('PHP %s or higher is required.', $minVersion);
}
}
if (isset($dependencies['php']['@attributes']['max-version'])) {
$maxVersion = $dependencies['php']['@attributes']['max-version'];
- if (version_compare($this->platform->getPhpVersion(), $maxVersion, '>')) {
+ if ($this->compareBigger($this->platform->getPhpVersion(), $maxVersion)) {
$missing[] = (string)$this->l->t('PHP with a version lower than %s is required.', $maxVersion);
}
}
@@ -134,14 +194,14 @@ class DependencyAnalyzer {
if (is_array($lib)) {
if (isset($lib['@attributes']['min-version'])) {
$minVersion = $lib['@attributes']['min-version'];
- if (version_compare($libVersion, $minVersion, '<')) {
+ if ($this->compareSmaller($libVersion, $minVersion)) {
$missing[] = (string)$this->l->t('Library %s with a version higher than %s is required - available version %s.',
array($libName, $minVersion, $libVersion));
}
}
if (isset($lib['@attributes']['max-version'])) {
$maxVersion = $lib['@attributes']['max-version'];
- if (version_compare($libVersion, $maxVersion, '>')) {
+ if ($this->compareBigger($libVersion, $maxVersion)) {
$missing[] = (string)$this->l->t('Library %s with a version lower than %s is required - available version %s.',
array($libName, $maxVersion, $libVersion));
}
@@ -193,12 +253,12 @@ class DependencyAnalyzer {
}
if (!is_null($minVersion)) {
- if (version_compare($this->platform->getOcVersion(), $minVersion, '<')) {
+ if ($this->compareSmaller($this->platform->getOcVersion(), $minVersion)) {
$missing[] = (string)$this->l->t('ownCloud %s or higher is required.', $minVersion);
}
}
if (!is_null($maxVersion)) {
- if (version_compare($this->platform->getOcVersion(), $maxVersion, '>')) {
+ if ($this->compareBigger($this->platform->getOcVersion(), $maxVersion)) {
$missing[] = (string)$this->l->t('ownCloud with a version lower than %s is required.', $maxVersion);
}
}
diff --git a/lib/private/appconfig.php b/lib/private/appconfig.php
index 1874d9f2b19..cd27f91bf01 100644
--- a/lib/private/appconfig.php
+++ b/lib/private/appconfig.php
@@ -245,7 +245,7 @@ class AppConfig implements \OCP\IAppConfig {
*
* @param string|false $app
* @param string|false $key
- * @return array
+ * @return array|false
*/
public function getValues($app, $key) {
if (($app !== false) == ($key !== false)) {
diff --git a/lib/private/appframework/app.php b/lib/private/appframework/app.php
index 537f10255a3..1e1915c85d8 100644
--- a/lib/private/appframework/app.php
+++ b/lib/private/appframework/app.php
@@ -24,9 +24,10 @@
namespace OC\AppFramework;
-use \OC_App;
-use \OC\AppFramework\DependencyInjection\DIContainer;
-use \OCP\AppFramework\QueryException;
+use OC_App;
+use OC\AppFramework\DependencyInjection\DIContainer;
+use OCP\AppFramework\QueryException;
+use OCP\AppFramework\Http\ICallbackResponse;
/**
* Entry point for every request in your app. You can consider this as your
@@ -93,15 +94,22 @@ class App {
// initialize the dispatcher and run all the middleware before the controller
$dispatcher = $container['Dispatcher'];
- list($httpHeaders, $responseHeaders, $responseCookies, $output) =
- $dispatcher->dispatch($controller, $methodName);
+ list(
+ $httpHeaders,
+ $responseHeaders,
+ $responseCookies,
+ $output,
+ $response
+ ) = $dispatcher->dispatch($controller, $methodName);
+
+ $io = $container['OCP\\AppFramework\\Http\\IOutput'];
if(!is_null($httpHeaders)) {
- header($httpHeaders);
+ $io->setHeader($httpHeaders);
}
foreach($responseHeaders as $name => $value) {
- header($name . ': ' . $value);
+ $io->setHeader($name . ': ' . $value);
}
foreach($responseCookies as $name => $value) {
@@ -109,12 +117,22 @@ class App {
if($value['expireDate'] instanceof \DateTime) {
$expireDate = $value['expireDate']->getTimestamp();
}
- setcookie($name, $value['value'], $expireDate, $container->getServer()->getWebRoot(), null, $container->getServer()->getConfig()->getSystemValue('forcessl', false), true);
+ $io->setCookie(
+ $name,
+ $value['value'],
+ $expireDate,
+ $container->getServer()->getWebRoot(),
+ null,
+ $container->getServer()->getRequest()->getServerProtocol() === 'https',
+ true
+ );
}
- if(!is_null($output)) {
- header('Content-Length: ' . strlen($output));
- print($output);
+ if ($response instanceof ICallbackResponse) {
+ $response->callback($io);
+ } else if(!is_null($output)) {
+ $io->setHeader('Content-Length: ' . strlen($output));
+ $io->setOutput($output);
}
}
diff --git a/lib/private/appframework/core/api.php b/lib/private/appframework/core/api.php
index 2f01015bb15..ab66c54c921 100644
--- a/lib/private/appframework/core/api.php
+++ b/lib/private/appframework/core/api.php
@@ -136,7 +136,7 @@ class API implements IApi{
* @param string $slotName name of slot, in another word, this is the
* name of the method that will be called when registered
* signal is emitted.
- * @return bool, always true
+ * @return bool always true
*/
public function connectHook($signalClass, $signalName, $slotClass, $slotName) {
return \OCP\Util::connectHook($signalClass, $signalName, $slotClass, $slotName);
@@ -148,7 +148,7 @@ class API implements IApi{
* @param string $signalClass class name of emitter
* @param string $signalName name of signal
* @param array $params default: array() array with additional data
- * @return bool, true if slots exists or false if not
+ * @return bool true if slots exists or false if not
*/
public function emitHook($signalClass, $signalName, $params = array()) {
return \OCP\Util::emitHook($signalClass, $signalName, $params);
diff --git a/lib/private/appframework/db/db.php b/lib/private/appframework/db/db.php
index fb30505d05a..5387e36d627 100644
--- a/lib/private/appframework/db/db.php
+++ b/lib/private/appframework/db/db.php
@@ -23,31 +23,33 @@
namespace OC\AppFramework\Db;
-use \OCP\IDb;
-
+use OCP\IDb;
+use OCP\IDBConnection;
/**
+ * @deprecated use IDBConnection directly, will be removed in ownCloud 10
* Small Facade for being able to inject the database connection for tests
*/
class Db implements IDb {
/**
- * @var \OCP\IDBConnection
+ * @var IDBConnection
*/
protected $connection;
/**
- * @param \OCP\IDBConnection $connection
+ * @param IDBConnection $connection
*/
- public function __construct($connection) {
+ public function __construct(IDBConnection $connection) {
$this->connection = $connection;
}
/**
- * Used to abstract the owncloud database access away
+ * Used to abstract the ownCloud database access away
*
* @param string $sql the sql query with ? placeholder for params
* @param int $limit the maximum number of rows
* @param int $offset from which row we want to start
+ * @deprecated use prepare instead, will be removed in ownCloud 10
* @return \OC_DB_StatementWrapper prepared SQL query
*/
public function prepareQuery($sql, $limit = null, $offset = null) {
@@ -60,6 +62,7 @@ class Db implements IDb {
/**
* Used to get the id of the just inserted element
*
+ * @deprecated use lastInsertId instead, will be removed in ownCloud 10
* @param string $tableName the name of the table where we inserted the item
* @return int the id of the inserted element
*/
@@ -67,5 +70,179 @@ class Db implements IDb {
return $this->connection->lastInsertId($tableName);
}
+ /**
+ * Used to abstract the ownCloud database access away
+ * @param string $sql the sql query with ? placeholder for params
+ * @param int $limit the maximum number of rows
+ * @param int $offset from which row we want to start
+ * @return \Doctrine\DBAL\Driver\Statement The prepared statement.
+ */
+ public function prepare($sql, $limit=null, $offset=null) {
+ return $this->connection->prepare($sql, $limit, $offset);
+ }
+
+ /**
+ * Executes an, optionally parameterized, SQL query.
+ *
+ * If the query is parameterized, a prepared statement is used.
+ * If an SQLLogger is configured, the execution is logged.
+ *
+ * @param string $query The SQL query to execute.
+ * @param string[] $params The parameters to bind to the query, if any.
+ * @param array $types The types the previous parameters are in.
+ * @return \Doctrine\DBAL\Driver\Statement The executed statement.
+ */
+ public function executeQuery($query, array $params = array(), $types = array()) {
+ return $this->connection->executeQuery($query, $params, $types);
+ }
+
+ /**
+ * Executes an SQL INSERT/UPDATE/DELETE query with the given parameters
+ * and returns the number of affected rows.
+ *
+ * This method supports PDO binding types as well as DBAL mapping types.
+ *
+ * @param string $query The SQL query.
+ * @param array $params The query parameters.
+ * @param array $types The parameter types.
+ * @return integer The number of affected rows.
+ */
+ public function executeUpdate($query, array $params = array(), array $types = array()) {
+ return $this->connection->executeUpdate($query, $params, $types);
+ }
+
+ /**
+ * Used to get the id of the just inserted element
+ * @param string $table the name of the table where we inserted the item
+ * @return int the id of the inserted element
+ */
+ public function lastInsertId($table = null) {
+ return $this->connection->lastInsertId($table);
+ }
+
+ /**
+ * Insert a row if a matching row doesn't exists.
+ * @param string $table The table name (will replace *PREFIX*) to perform the replace on.
+ * @param array $input
+ * @throws \OC\HintException
+ *
+ * The input array if in the form:
+ *
+ * array ( 'id' => array ( 'value' => 6,
+ * 'key' => true
+ * ),
+ * 'name' => array ('value' => 'Stoyan'),
+ * 'family' => array ('value' => 'Stefanov'),
+ * 'birth_date' => array ('value' => '1975-06-20')
+ * );
+ * @return bool
+ *
+ */
+ public function insertIfNotExist($table, $input) {
+ return $this->connection->insertIfNotExist($table, $input);
+ }
+
+ /**
+ * Start a transaction
+ */
+ public function beginTransaction() {
+ $this->connection->beginTransaction();
+ }
+
+ /**
+ * Commit the database changes done during a transaction that is in progress
+ */
+ public function commit() {
+ $this->connection->commit();
+ }
+
+ /**
+ * Rollback the database changes done during a transaction that is in progress
+ */
+ public function rollBack() {
+ $this->connection->rollBack();
+ }
+
+ /**
+ * Gets the error code and message as a string for logging
+ * @return string
+ */
+ public function getError() {
+ return $this->connection->getError();
+ }
+
+ /**
+ * Fetch the SQLSTATE associated with the last database operation.
+ *
+ * @return integer The last error code.
+ */
+ public function errorCode() {
+ return $this->connection->errorCode();
+ }
+
+ /**
+ * Fetch extended error information associated with the last database operation.
+ *
+ * @return array The last error information.
+ */
+ public function errorInfo() {
+ return $this->connection->errorInfo();
+ }
+
+ /**
+ * Establishes the connection with the database.
+ *
+ * @return bool
+ */
+ public function connect() {
+ return $this->connection->connect();
+ }
+
+ /**
+ * Close the database connection
+ */
+ public function close() {
+ $this->connection->close();
+ }
+
+ /**
+ * Quotes a given input parameter.
+ *
+ * @param mixed $input Parameter to be quoted.
+ * @param int $type Type of the parameter.
+ * @return string The quoted parameter.
+ */
+ public function quote($input, $type = \PDO::PARAM_STR) {
+ return $this->connection->quote($input, $type);
+ }
+
+ /**
+ * Gets the DatabasePlatform instance that provides all the metadata about
+ * the platform this driver connects to.
+ *
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform The database platform.
+ */
+ public function getDatabasePlatform() {
+ return $this->connection->getDatabasePlatform();
+ }
+
+ /**
+ * Drop a table from the database if it exists
+ *
+ * @param string $table table name without the prefix
+ */
+ public function dropTable($table) {
+ $this->connection->dropTable($table);
+ }
+
+ /**
+ * Check if a table exists
+ *
+ * @param string $table table name without the prefix
+ * @return bool
+ */
+ public function tableExists($table) {
+ return $this->connection->tableExists($table);
+ }
}
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index 4229b251e29..e88177c6398 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -28,6 +28,7 @@ use OC;
use OC\AppFramework\Http;
use OC\AppFramework\Http\Request;
use OC\AppFramework\Http\Dispatcher;
+use OC\AppFramework\Http\Output;
use OC\AppFramework\Core\API;
use OC\AppFramework\Middleware\MiddlewareDispatcher;
use OC\AppFramework\Middleware\Security\SecurityMiddleware;
@@ -69,6 +70,10 @@ class DIContainer extends SimpleContainer implements IAppContainer {
return $this->getServer()->getAppManager();
});
+ $this->registerService('OCP\\AppFramework\\Http\\IOutput', function($c){
+ return new Output();
+ });
+
$this->registerService('OCP\\IAvatarManager', function($c) {
return $this->getServer()->getAvatarManager();
});
diff --git a/lib/private/appframework/http/dispatcher.php b/lib/private/appframework/http/dispatcher.php
index 24540ef3c94..910e9c32ed4 100644
--- a/lib/private/appframework/http/dispatcher.php
+++ b/lib/private/appframework/http/dispatcher.php
@@ -100,17 +100,15 @@ class Dispatcher {
$response = $this->middlewareDispatcher->afterController(
$controller, $methodName, $response);
- // get the output which should be printed and run the after output
- // middleware to modify the response
- $output = $response->render();
- $out[3] = $this->middlewareDispatcher->beforeOutput(
- $controller, $methodName, $output);
-
// depending on the cache object the headers need to be changed
$out[0] = $this->protocol->getStatusHeader($response->getStatus(),
$response->getLastModified(), $response->getETag());
$out[1] = array_merge($response->getHeaders());
$out[2] = $response->getCookies();
+ $out[3] = $this->middlewareDispatcher->beforeOutput(
+ $controller, $methodName, $response->render()
+ );
+ $out[4] = $response;
return $out;
}
diff --git a/lib/private/appframework/http/output.php b/lib/private/appframework/http/output.php
new file mode 100644
index 00000000000..808f1ec6dfd
--- /dev/null
+++ b/lib/private/appframework/http/output.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * @author Bernhard Posselt
+ * @copyright 2015 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\AppFramework\Http;
+
+use OCP\AppFramework\Http\IOutput;
+
+/**
+ * Very thin wrapper class to make output testable
+ */
+class Output implements IOutput {
+
+ /**
+ * @param string $out
+ */
+ public function setOutput($out) {
+ print($out);
+ }
+
+ /**
+ * @param string $path
+ *
+ * @return bool false if an error occured
+ */
+ public function setReadfile($path) {
+ return @readfile($path);
+ }
+
+ /**
+ * @param string $header
+ */
+ public function setHeader($header) {
+ header($header);
+ }
+
+ /**
+ * @param int $code sets the http status code
+ */
+ public function setHttpResponseCode($code) {
+ http_response_code($code);
+ }
+
+ /**
+ * @return int returns the current http response code
+ */
+ public function getHttpResponseCode() {
+ return http_response_code();
+ }
+
+ /**
+ * @param string $name
+ * @param string $value
+ * @param int $expire
+ * @param string $path
+ * @param string $domain
+ * @param bool $secure
+ * @param bool $httponly
+ */
+ public function setCookie($name, $value, $expire, $path, $domain, $secure, $httponly) {
+ setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
+ }
+
+}
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php
index 6012033fe52..b1b4b713287 100644
--- a/lib/private/appframework/http/request.php
+++ b/lib/private/appframework/http/request.php
@@ -24,15 +24,23 @@
namespace OC\AppFramework\Http;
+use OC\Security\TrustedDomainHelper;
+use OCP\IConfig;
use OCP\IRequest;
+use OCP\Security\ISecureRandom;
/**
* Class for accessing variables in the request.
* This class provides an immutable object with request variables.
*/
-
class Request implements \ArrayAccess, \Countable, IRequest {
+ const USER_AGENT_IE = '/MSIE/';
+ // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
+ const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
+ const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
+ const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)$/';
+
protected $inputStream;
protected $content;
protected $items = array();
@@ -48,24 +56,37 @@ class Request implements \ArrayAccess, \Countable, IRequest {
'method',
'requesttoken',
);
+ /** @var ISecureRandom */
+ protected $secureRandom;
+ /** @var IConfig */
+ protected $config;
+ /** @var string */
+ protected $requestId = '';
/**
* @param array $vars An associative array with the following optional values:
- * @param array 'urlParams' the parameters which were matched from the URL
- * @param array 'get' the $_GET array
- * @param array|string 'post' the $_POST array or JSON string
- * @param array 'files' the $_FILES array
- * @param array 'server' the $_SERVER array
- * @param array 'env' the $_ENV array
- * @param array 'cookies' the $_COOKIE array
- * @param string 'method' the request method (GET, POST etc)
- * @param string|false 'requesttoken' the requesttoken or false when not available
+ * - array 'urlParams' the parameters which were matched from the URL
+ * - array 'get' the $_GET array
+ * - array|string 'post' the $_POST array or JSON string
+ * - array 'files' the $_FILES array
+ * - array 'server' the $_SERVER array
+ * - array 'env' the $_ENV array
+ * - array 'cookies' the $_COOKIE array
+ * - string 'method' the request method (GET, POST etc)
+ * - string|false 'requesttoken' the requesttoken or false when not available
+ * @param ISecureRandom $secureRandom
+ * @param IConfig $config
+ * @param string $stream
* @see http://www.php.net/manual/en/reserved.variables.php
*/
- public function __construct(array $vars=array(), $stream='php://input') {
-
+ public function __construct(array $vars=array(),
+ ISecureRandom $secureRandom = null,
+ IConfig $config,
+ $stream='php://input') {
$this->inputStream = $stream;
$this->items['params'] = array();
+ $this->secureRandom = $secureRandom;
+ $this->config = $config;
if(!array_key_exists('method', $vars)) {
$vars['method'] = 'GET';
@@ -106,8 +127,10 @@ class Request implements \ArrayAccess, \Countable, IRequest {
);
}
-
- public function setUrlParameters($parameters) {
+ /**
+ * @param array $parameters
+ */
+ public function setUrlParameters(array $parameters) {
$this->items['urlParams'] = $parameters;
$this->items['parameters'] = array_merge(
$this->items['parameters'],
@@ -115,7 +138,10 @@ class Request implements \ArrayAccess, \Countable, IRequest {
);
}
- // Countable method.
+ /**
+ * Countable method
+ * @return int
+ */
public function count() {
return count(array_keys($this->items['parameters']));
}
@@ -167,7 +193,11 @@ class Request implements \ArrayAccess, \Countable, IRequest {
throw new \RuntimeException('You cannot change the contents of the request object');
}
- // Magic property accessors
+ /**
+ * Magic property accessors
+ * @param string $name
+ * @param mixed $value
+ */
public function __set($name, $value) {
throw new \RuntimeException('You cannot change the contents of the request object');
}
@@ -222,12 +252,17 @@ class Request implements \ArrayAccess, \Countable, IRequest {
}
}
-
+ /**
+ * @param string $name
+ * @return bool
+ */
public function __isset($name) {
return isset($this->items['parameters'][$name]);
}
-
+ /**
+ * @param string $id
+ */
public function __unset($id) {
throw new \RunTimeException('You cannot change the contents of the request object');
}
@@ -384,4 +419,279 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// Valid token
return true;
}
- }}
+ }
+
+ /**
+ * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging
+ * If `mod_unique_id` is installed this value will be taken.
+ * @return string
+ */
+ public function getId() {
+ if(isset($this->server['UNIQUE_ID'])) {
+ return $this->server['UNIQUE_ID'];
+ }
+
+ if(empty($this->requestId)) {
+ $this->requestId = $this->secureRandom->getLowStrengthGenerator()->generate(20);
+ }
+
+ return $this->requestId;
+ }
+
+ /**
+ * Returns the remote address, if the connection came from a trusted proxy
+ * and `forwarded_for_headers` has been configured then the IP address
+ * specified in this header will be returned instead.
+ * Do always use this instead of $_SERVER['REMOTE_ADDR']
+ * @return string IP address
+ */
+ public function getRemoteAddress() {
+ $remoteAddress = isset($this->server['REMOTE_ADDR']) ? $this->server['REMOTE_ADDR'] : '';
+ $trustedProxies = $this->config->getSystemValue('trusted_proxies', []);
+
+ if(is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
+ $forwardedForHeaders = $this->config->getSystemValue('forwarded_for_headers', []);
+
+ foreach($forwardedForHeaders as $header) {
+ if(isset($this->server[$header])) {
+ foreach(explode(',', $this->server[$header]) as $IP) {
+ $IP = trim($IP);
+ if (filter_var($IP, FILTER_VALIDATE_IP) !== false) {
+ return $IP;
+ }
+ }
+ }
+ }
+ }
+
+ return $remoteAddress;
+ }
+
+ /**
+ * Check overwrite condition
+ * @param string $type
+ * @return bool
+ */
+ private function isOverwriteCondition($type = '') {
+ $regex = '/' . $this->config->getSystemValue('overwritecondaddr', '') . '/';
+ return $regex === '//' || preg_match($regex, $this->server['REMOTE_ADDR']) === 1
+ || $type !== 'protocol';
+ }
+
+ /**
+ * Returns the server protocol. It respects one or more reverse proxies servers
+ * and load balancers
+ * @return string Server protocol (http or https)
+ */
+ public function getServerProtocol() {
+ if($this->config->getSystemValue('overwriteprotocol') !== ''
+ && $this->isOverwriteCondition('protocol')) {
+ return $this->config->getSystemValue('overwriteprotocol');
+ }
+
+ if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) {
+ if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) {
+ $parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']);
+ $proto = strtolower(trim($parts[0]));
+ } else {
+ $proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']);
+ }
+
+ // Verify that the protocol is always HTTP or HTTPS
+ // default to http if an invalid value is provided
+ return $proto === 'https' ? 'https' : 'http';
+ }
+
+ if (isset($this->server['HTTPS'])
+ && $this->server['HTTPS'] !== null
+ && $this->server['HTTPS'] !== 'off') {
+ return 'https';
+ }
+
+ return 'http';
+ }
+
+ /**
+ * Returns the request uri, even if the website uses one or more
+ * reverse proxies
+ * @return string
+ */
+ public function getRequestUri() {
+ $uri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : '';
+ if($this->config->getSystemValue('overwritewebroot') !== '' && $this->isOverwriteCondition()) {
+ $uri = $this->getScriptName() . substr($uri, strlen($this->server['SCRIPT_NAME']));
+ }
+ return $uri;
+ }
+
+ /**
+ * Get raw PathInfo from request (not urldecoded)
+ * @throws \Exception
+ * @return string Path info
+ */
+ public function getRawPathInfo() {
+ $requestUri = isset($this->server['REQUEST_URI']) ? $this->server['REQUEST_URI'] : '';
+ // remove too many leading slashes - can be caused by reverse proxy configuration
+ if (strpos($requestUri, '/') === 0) {
+ $requestUri = '/' . ltrim($requestUri, '/');
+ }
+
+ $requestUri = preg_replace('%/{2,}%', '/', $requestUri);
+
+ // Remove the query string from REQUEST_URI
+ if ($pos = strpos($requestUri, '?')) {
+ $requestUri = substr($requestUri, 0, $pos);
+ }
+
+ $scriptName = $this->server['SCRIPT_NAME'];
+ $pathInfo = $requestUri;
+
+ // strip off the script name's dir and file name
+ // FIXME: Sabre does not really belong here
+ list($path, $name) = \Sabre\HTTP\URLUtil::splitPath($scriptName);
+ if (!empty($path)) {
+ if($path === $pathInfo || strpos($pathInfo, $path.'/') === 0) {
+ $pathInfo = substr($pathInfo, strlen($path));
+ } else {
+ throw new \Exception("The requested uri($requestUri) cannot be processed by the script '$scriptName')");
+ }
+ }
+ if (strpos($pathInfo, '/'.$name) === 0) {
+ $pathInfo = substr($pathInfo, strlen($name) + 1);
+ }
+ if (strpos($pathInfo, $name) === 0) {
+ $pathInfo = substr($pathInfo, strlen($name));
+ }
+ if($pathInfo === '/'){
+ return '';
+ } else {
+ return $pathInfo;
+ }
+ }
+
+ /**
+ * Get PathInfo from request
+ * @throws \Exception
+ * @return string|false Path info or false when not found
+ */
+ public function getPathInfo() {
+ if(isset($this->server['PATH_INFO'])) {
+ return $this->server['PATH_INFO'];
+ }
+
+ $pathInfo = $this->getRawPathInfo();
+ // following is taken from \Sabre\HTTP\URLUtil::decodePathSegment
+ $pathInfo = rawurldecode($pathInfo);
+ $encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
+
+ switch($encoding) {
+ case 'ISO-8859-1' :
+ $pathInfo = utf8_encode($pathInfo);
+ }
+ // end copy
+
+ return $pathInfo;
+ }
+
+ /**
+ * Returns the script name, even if the website uses one or more
+ * reverse proxies
+ * @return string the script name
+ */
+ public function getScriptName() {
+ $name = $this->server['SCRIPT_NAME'];
+ $overwriteWebRoot = $this->config->getSystemValue('overwritewebroot');
+ if ($overwriteWebRoot !== '' && $this->isOverwriteCondition()) {
+ // FIXME: This code is untestable due to __DIR__, also that hardcoded path is really dangerous
+ $serverRoot = str_replace('\\', '/', substr(__DIR__, 0, -strlen('lib/private/appframework/http/')));
+ $suburi = str_replace('\\', '/', substr(realpath($this->server['SCRIPT_FILENAME']), strlen($serverRoot)));
+ $name = '/' . ltrim($overwriteWebRoot . $suburi, '/');
+ }
+ return $name;
+ }
+
+ /**
+ * Checks whether the user agent matches a given regex
+ * @param array $agent array of agent names
+ * @return bool true if at least one of the given agent matches, false otherwise
+ */
+ public function isUserAgent(array $agent) {
+ foreach ($agent as $regex) {
+ if (preg_match($regex, $this->server['HTTP_USER_AGENT'])) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns the unverified server host from the headers without checking
+ * whether it is a trusted domain
+ * @return string Server host
+ */
+ public function getInsecureServerHost() {
+ $host = 'localhost';
+ if (isset($this->server['HTTP_X_FORWARDED_HOST'])) {
+ if (strpos($this->server['HTTP_X_FORWARDED_HOST'], ',') !== false) {
+ $parts = explode(',', $this->server['HTTP_X_FORWARDED_HOST']);
+ $host = trim(current($parts));
+ } else {
+ $host = $this->server['HTTP_X_FORWARDED_HOST'];
+ }
+ } else {
+ if (isset($this->server['HTTP_HOST'])) {
+ $host = $this->server['HTTP_HOST'];
+ } else if (isset($this->server['SERVER_NAME'])) {
+ $host = $this->server['SERVER_NAME'];
+ }
+ }
+ return $host;
+ }
+
+
+ /**
+ * Returns the server host from the headers, or the first configured
+ * trusted domain if the host isn't in the trusted list
+ * @return string Server host
+ */
+ public function getServerHost() {
+ // FIXME: Ugly workaround that we need to get rid of
+ if (\OC::$CLI && defined('PHPUNIT_RUN')) {
+ return 'localhost';
+ }
+
+ // overwritehost is always trusted
+ $host = $this->getOverwriteHost();
+ if ($host !== null) {
+ return $host;
+ }
+
+ // get the host from the headers
+ $host = $this->getInsecureServerHost();
+
+ // Verify that the host is a trusted domain if the trusted domains
+ // are defined
+ // If no trusted domain is provided the first trusted domain is returned
+ $trustedDomainHelper = new TrustedDomainHelper($this->config);
+ if ($trustedDomainHelper->isTrustedDomain($host)) {
+ return $host;
+ } else {
+ $trustedList = $this->config->getSystemValue('trusted_domains', []);
+ return $trustedList[0];
+ }
+ }
+
+ /**
+ * Returns the overwritehost setting from the config if set and
+ * if the overwrite condition is met
+ * @return string|null overwritehost value or null if not defined or the defined condition
+ * isn't met
+ */
+ private function getOverwriteHost() {
+ if($this->config->getSystemValue('overwritehost') !== '' && $this->isOverwriteCondition()) {
+ return $this->config->getSystemValue('overwritehost');
+ }
+ return null;
+ }
+
+}
diff --git a/lib/private/appframework/utility/simplecontainer.php b/lib/private/appframework/utility/simplecontainer.php
index 68d52d759e0..c0c47cf4644 100644
--- a/lib/private/appframework/utility/simplecontainer.php
+++ b/lib/private/appframework/utility/simplecontainer.php
@@ -33,8 +33,8 @@ class SimpleContainer extends \Pimple\Container implements \OCP\IContainer {
/**
- * @param ReflectionClass $class the class to instantiate
- * @return stdClass the created class
+ * @param \ReflectionClass $class the class to instantiate
+ * @return \stdClass the created class
*/
private function buildClass(\ReflectionClass $class) {
$constructor = $class->getConstructor();
@@ -63,6 +63,7 @@ class SimpleContainer extends \Pimple\Container implements \OCP\IContainer {
* If a parameter is not registered in the container try to instantiate it
* by using reflection to find out how to build the class
* @param string $name the class name to resolve
+ * @return \stdClass
* @throws QueryException if the class could not be found or instantiated
*/
private function resolve($name) {
@@ -84,7 +85,7 @@ class SimpleContainer extends \Pimple\Container implements \OCP\IContainer {
/**
* @param string $name name of the service to query for
* @return mixed registered service for the given $name
- * @throws QueryExcpetion if the query could not be resolved
+ * @throws QueryException if the query could not be resolved
*/
public function query($name) {
if ($this->offsetExists($name)) {
diff --git a/lib/private/avatar.php b/lib/private/avatar.php
index a9d9346d50a..5e234d77bb2 100644
--- a/lib/private/avatar.php
+++ b/lib/private/avatar.php
@@ -43,6 +43,15 @@ class OC_Avatar implements \OCP\IAvatar {
}
/**
+ * Check if an avatar exists for the user
+ *
+ * @return bool
+ */
+ public function exists() {
+ return $this->view->file_exists('avatar.jpg') || $this->view->file_exists('avatar.png');
+ }
+
+ /**
* sets the users avatar
* @param \OC_Image|resource|string $data OC_Image, imagedata or path to set a new avatar
* @throws Exception if the provided file is not a jpg or png image
diff --git a/lib/private/backgroundjob/joblist.php b/lib/private/backgroundjob/joblist.php
index 9d15cd1663a..f8b88f9a89b 100644
--- a/lib/private/backgroundjob/joblist.php
+++ b/lib/private/backgroundjob/joblist.php
@@ -42,6 +42,9 @@ class JobList implements IJobList {
$class = $job;
}
$argument = json_encode($argument);
+ if (strlen($argument) > 4000) {
+ throw new \InvalidArgumentException('Background job arguments can\'t exceed 4000 characters (json encoded)');
+ }
$query = $this->conn->prepare('INSERT INTO `*PREFIX*jobs`(`class`, `argument`, `last_run`) VALUES(?, ?, 0)');
$query->execute(array($class, $argument));
}
diff --git a/lib/private/backgroundjob/queuedjob.php b/lib/private/backgroundjob/queuedjob.php
index 799eac47848..b73072b535f 100644
--- a/lib/private/backgroundjob/queuedjob.php
+++ b/lib/private/backgroundjob/queuedjob.php
@@ -23,7 +23,7 @@ abstract class QueuedJob extends Job {
* @param \OC\Log $logger
*/
public function execute($jobList, $logger = null) {
- $jobList->remove($this);
+ $jobList->remove($this, $this->argument);
parent::execute($jobList, $logger);
}
}
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php
index d321a954bd2..6fa7686ea96 100644
--- a/lib/private/cache/file.php
+++ b/lib/private/cache/file.php
@@ -92,7 +92,7 @@ class File {
public function hasKey($key) {
$storage = $this->getStorage();
- if ($storage && $storage->is_file($key)) {
+ if ($storage && $storage->is_file($key) && $storage->isReadable($key)) {
return true;
}
return false;
diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php
index d9e0fd46d37..5c4ff60f20a 100644
--- a/lib/private/cache/fileglobal.php
+++ b/lib/private/cache/fileglobal.php
@@ -52,7 +52,7 @@ class FileGlobal {
public function hasKey($key) {
$key = $this->fixKey($key);
$cache_dir = self::getCacheDir();
- if ($cache_dir && is_file($cache_dir.$key)) {
+ if ($cache_dir && is_file($cache_dir.$key) && is_readable($cache_dir.$key)) {
$mtime = filemtime($cache_dir.$key);
if ($mtime < time()) {
unlink($cache_dir.$key);
@@ -86,29 +86,4 @@ class FileGlobal {
}
}
}
-
- static public function gc() {
- $appConfig = \OC::$server->getAppConfig();
- $last_run = $appConfig->getValue('core', 'global_cache_gc_lastrun', 0);
- $now = time();
- if (($now - $last_run) < 300) {
- // only do cleanup every 5 minutes
- return;
- }
- $appConfig->setValue('core', 'global_cache_gc_lastrun', $now);
- $cache_dir = self::getCacheDir();
- if($cache_dir and is_dir($cache_dir)) {
- $dh=opendir($cache_dir);
- if(is_resource($dh)) {
- while (($file = readdir($dh)) !== false) {
- if($file!='.' and $file!='..') {
- $mtime = filemtime($cache_dir.$file);
- if ($mtime < $now) {
- unlink($cache_dir.$file);
- }
- }
- }
- }
- }
- }
}
diff --git a/lib/private/cache/fileglobalgc.php b/lib/private/cache/fileglobalgc.php
index 399dd5e6f94..039992718ab 100644
--- a/lib/private/cache/fileglobalgc.php
+++ b/lib/private/cache/fileglobalgc.php
@@ -2,8 +2,52 @@
namespace OC\Cache;
-class FileGlobalGC extends \OC\BackgroundJob\Job{
- public function run($argument){
- FileGlobal::gc();
+use OC\BackgroundJob\Job;
+use OCP\IConfig;
+
+class FileGlobalGC extends Job {
+ public function run($argument) {
+ $this->gc(\OC::$server->getConfig(), $this->getCacheDir());
+ }
+
+ protected function getCacheDir() {
+ return get_temp_dir() . '/owncloud-' . \OC_Util::getInstanceId() . '/';
+ }
+
+ /**
+ * @param string $cacheDir
+ * @param int $now
+ * @return string[]
+ */
+ public function getExpiredPaths($cacheDir, $now) {
+ $files = scandir($cacheDir);
+ $files = array_filter($files, function ($file) {
+ return $file != '.' and $file != '..';
+ });
+ $paths = array_map(function ($file) use ($cacheDir) {
+ return $cacheDir . $file;
+ }, $files);
+ return array_values(array_filter($paths, function ($path) use ($now) {
+ return is_file($path) and (filemtime($path) < $now);
+ }));
+ }
+
+ /**
+ * @param \OCP\IConfig $config
+ * @param string $cacheDir
+ */
+ public function gc(IConfig $config, $cacheDir) {
+ $lastRun = $config->getAppValue('core', 'global_cache_gc_lastrun', 0);
+ $now = time();
+ if (($now - $lastRun) < 300) {
+ // only do cleanup every 5 minutes
+ return;
+ }
+ $config->setAppValue('core', 'global_cache_gc_lastrun', $now);
+ if (!is_dir($cacheDir)) {
+ return;
+ }
+ $paths = $this->getExpiredPaths($cacheDir, $now);
+ array_walk($paths, 'unlink');
}
}
diff --git a/lib/private/command/asyncbus.php b/lib/private/command/asyncbus.php
new file mode 100644
index 00000000000..084842fa6f1
--- /dev/null
+++ b/lib/private/command/asyncbus.php
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Command;
+
+use OCP\Command\IBus;
+use OCP\Command\ICommand;
+use SuperClosure\Serializer;
+
+/**
+ * Asynchronous command bus that uses the background job system as backend
+ */
+class AsyncBus implements IBus {
+ /**
+ * @var \OCP\BackgroundJob\IJobList
+ */
+ private $jobList;
+
+ /**
+ * List of traits for command which require sync execution
+ *
+ * @var string[]
+ */
+ private $syncTraits = [];
+
+ /**
+ * @param \OCP\BackgroundJob\IJobList $jobList
+ */
+ function __construct($jobList) {
+ $this->jobList = $jobList;
+ }
+
+ /**
+ * Schedule a command to be fired
+ *
+ * @param \OCP\Command\ICommand | callable $command
+ */
+ public function push($command) {
+ if ($this->canRunAsync($command)) {
+ $this->jobList->add($this->getJobClass($command), $this->serializeCommand($command));
+ } else {
+ $this->runCommand($command);
+ }
+ }
+
+ /**
+ * Require all commands using a trait to be run synchronous
+ *
+ * @param string $trait
+ */
+ public function requireSync($trait) {
+ $this->syncTraits[] = trim($trait, '\\');
+ }
+
+ /**
+ * @param \OCP\Command\ICommand | callable $command
+ */
+ private function runCommand($command) {
+ if ($command instanceof ICommand) {
+ $command->handle();
+ } else {
+ $command();
+ }
+ }
+
+ /**
+ * @param \OCP\Command\ICommand | callable $command
+ * @return string
+ */
+ private function getJobClass($command) {
+ if ($command instanceof \Closure) {
+ return 'OC\Command\ClosureJob';
+ } else if (is_callable($command)) {
+ return 'OC\Command\CallableJob';
+ } else if ($command instanceof ICommand) {
+ return 'OC\Command\CommandJob';
+ } else {
+ throw new \InvalidArgumentException('Invalid command');
+ }
+ }
+
+ /**
+ * @param \OCP\Command\ICommand | callable $command
+ * @return string
+ */
+ private function serializeCommand($command) {
+ if ($command instanceof \Closure) {
+ $serializer = new Serializer();
+ return $serializer->serialize($command);
+ } else if (is_callable($command) or $command instanceof ICommand) {
+ return serialize($command);
+ } else {
+ throw new \InvalidArgumentException('Invalid command');
+ }
+ }
+
+ /**
+ * @param \OCP\Command\ICommand | callable $command
+ * @return bool
+ */
+ private function canRunAsync($command) {
+ $traits = $this->getTraits($command);
+ foreach ($traits as $trait) {
+ if (array_search($trait, $this->syncTraits) !== false) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * @param \OCP\Command\ICommand | callable $command
+ * @return string[]
+ */
+ private function getTraits($command) {
+ if ($command instanceof ICommand) {
+ return class_uses($command);
+ } else {
+ return [];
+ }
+ }
+}
diff --git a/lib/private/command/callablejob.php b/lib/private/command/callablejob.php
new file mode 100644
index 00000000000..6b755d615e6
--- /dev/null
+++ b/lib/private/command/callablejob.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Command;
+
+use OC\BackgroundJob\QueuedJob;
+
+class CallableJob extends QueuedJob {
+ protected function run($serializedCallable) {
+ $callable = unserialize($serializedCallable);
+ if (is_callable($callable)) {
+ $callable();
+ } else {
+ throw new \InvalidArgumentException('Invalid serialized callable');
+ }
+ }
+}
diff --git a/lib/private/command/closurejob.php b/lib/private/command/closurejob.php
new file mode 100644
index 00000000000..abba120b745
--- /dev/null
+++ b/lib/private/command/closurejob.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Command;
+
+use OC\BackgroundJob\QueuedJob;
+use SuperClosure\Serializer;
+
+class ClosureJob extends QueuedJob {
+ protected function run($serializedCallable) {
+ $serializer = new Serializer();
+ $callable = $serializer->unserialize($serializedCallable);
+ if (is_callable($callable)) {
+ $callable();
+ } else {
+ throw new \InvalidArgumentException('Invalid serialized callable');
+ }
+ }
+}
diff --git a/lib/private/command/commandjob.php b/lib/private/command/commandjob.php
new file mode 100644
index 00000000000..b2c7d30ee56
--- /dev/null
+++ b/lib/private/command/commandjob.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Command;
+
+use OC\BackgroundJob\QueuedJob;
+use OCP\Command\ICommand;
+
+/**
+ * Wrap a command in the background job interface
+ */
+class CommandJob extends QueuedJob {
+ protected function run($serializedCommand) {
+ $command = unserialize($serializedCommand);
+ if ($command instanceof ICommand) {
+ $command->handle();
+ } else {
+ throw new \InvalidArgumentException('Invalid serialized command');
+ }
+ }
+}
diff --git a/lib/private/command/fileaccess.php b/lib/private/command/fileaccess.php
new file mode 100644
index 00000000000..5de00862fac
--- /dev/null
+++ b/lib/private/command/fileaccess.php
@@ -0,0 +1,18 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Command;
+
+use OCP\IUser;
+
+trait FileAccess {
+ protected function getUserFolder(IUser $user) {
+ \OC_Util::setupFS($user->getUID());
+ return \OC::$server->getUserFolder($user->getUID());
+ }
+}
diff --git a/lib/private/config.php b/lib/private/config.php
index 31e536221dd..5c8cc89f0f0 100644
--- a/lib/private/config.php
+++ b/lib/private/config.php
@@ -236,8 +236,11 @@ class Config {
flock($filePointer, LOCK_UN);
fclose($filePointer);
- // Clear the opcode cache
- \OC_Util::clearOpcodeCache();
+ // Try invalidating the opcache just for the file we wrote...
+ if (!\OC_Util::deleteFromOpcodeCache($this->configFilePath)) {
+ // But if that doesn't work, clear the whole cache.
+ \OC_Util::clearOpcodeCache();
+ }
}
}
diff --git a/lib/private/connector/sabre/appenabledplugin.php b/lib/private/connector/sabre/appenabledplugin.php
index 61f5170658d..982cbaf47da 100644
--- a/lib/private/connector/sabre/appenabledplugin.php
+++ b/lib/private/connector/sabre/appenabledplugin.php
@@ -58,7 +58,7 @@ class AppEnabledPlugin extends ServerPlugin {
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
- $this->server->subscribeEvent('beforeMethod', array($this, 'checkAppEnabled'), 30);
+ $this->server->on('beforeMethod', array($this, 'checkAppEnabled'), 30);
}
/**
diff --git a/lib/private/connector/sabre/auth.php b/lib/private/connector/sabre/auth.php
index 533d250d68e..866053e5434 100644
--- a/lib/private/connector/sabre/auth.php
+++ b/lib/private/connector/sabre/auth.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -20,8 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
+namespace OC\Connector\Sabre;
-class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
+class Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
const DAV_AUTHENTICATED = 'AUTHENTICATED_TO_DAV_BACKEND';
/**
@@ -51,17 +51,20 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
* @return bool
*/
protected function validateUserPass($username, $password) {
- if (OC_User::isLoggedIn() &&
- $this->isDavAuthenticated($username)
+ if (\OC_User::isLoggedIn() &&
+ $this->isDavAuthenticated(\OC_User::getUser())
) {
- OC_Util::setupFS(OC_User::getUser());
+ \OC_Util::setupFS(\OC_User::getUser());
\OC::$server->getSession()->close();
return true;
} else {
- OC_Util::setUpFS(); //login hooks may need early access to the filesystem
- if(OC_User::login($username, $password)) {
- OC_Util::setUpFS(OC_User::getUser());
- \OC::$server->getSession()->set(self::DAV_AUTHENTICATED, $username);
+ \OC_Util::setUpFS(); //login hooks may need early access to the filesystem
+ if(\OC_User::login($username, $password)) {
+ // make sure we use owncloud's internal username here
+ // and not the HTTP auth supplied one, see issue #14048
+ $ocUser = \OC_User::getUser();
+ \OC_Util::setUpFS($ocUser);
+ \OC::$server->getSession()->set(self::DAV_AUTHENTICATED, $ocUser);
\OC::$server->getSession()->close();
return true;
} else {
@@ -79,7 +82,7 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
* @return string|null
*/
public function getCurrentUser() {
- $user = OC_User::getUser();
+ $user = \OC_User::getUser();
if($user && $this->isDavAuthenticated($user)) {
return $user;
}
@@ -110,11 +113,11 @@ class OC_Connector_Sabre_Auth extends \Sabre\DAV\Auth\Backend\AbstractBasic {
* @return bool
*/
private function auth(\Sabre\DAV\Server $server, $realm) {
- if (OC_User::handleApacheAuth() ||
- (OC_User::isLoggedIn() && is_null(\OC::$server->getSession()->get(self::DAV_AUTHENTICATED)))
+ if (\OC_User::handleApacheAuth() ||
+ (\OC_User::isLoggedIn() && is_null(\OC::$server->getSession()->get(self::DAV_AUTHENTICATED)))
) {
- $user = OC_User::getUser();
- OC_Util::setupFS($user);
+ $user = \OC_User::getUser();
+ \OC_Util::setupFS($user);
$this->currentUser = $user;
\OC::$server->getSession()->close();
return true;
diff --git a/lib/private/connector/sabre/custompropertiesbackend.php b/lib/private/connector/sabre/custompropertiesbackend.php
new file mode 100644
index 00000000000..76ac8b84ef9
--- /dev/null
+++ b/lib/private/connector/sabre/custompropertiesbackend.php
@@ -0,0 +1,339 @@
+<?php
+
+/**
+ * ownCloud
+ *
+ * @author Vincent Petry
+ * @copyright 2015 Vincent Petry <pvince81@owncloud.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OC\Connector\Sabre;
+
+use OCP\IDBConnection;
+use OCP\IUser;
+use Sabre\DAV\PropertyStorage\Backend\BackendInterface;
+use Sabre\DAV\PropFind;
+use Sabre\DAV\PropPatch;
+use Sabre\DAV\Tree;
+
+class CustomPropertiesBackend implements BackendInterface {
+
+ /**
+ * Ignored properties
+ *
+ * @var array
+ */
+ private $ignoredProperties = array(
+ '{DAV:}getcontentlength',
+ '{DAV:}getcontenttype',
+ '{DAV:}getetag',
+ '{DAV:}quota-used-bytes',
+ '{DAV:}quota-available-bytes',
+ '{DAV:}quota-available-bytes',
+ '{http://owncloud.org/ns}permissions',
+ '{http://owncloud.org/ns}downloadURL',
+ '{http://owncloud.org/ns}dDC',
+ '{http://owncloud.org/ns}size',
+ );
+
+ /**
+ * @var Tree
+ */
+ private $tree;
+
+ /**
+ * @var IDBConnection
+ */
+ private $connection;
+
+ /**
+ * @var IUser
+ */
+ private $user;
+
+ /**
+ * Properties cache
+ *
+ * @var array
+ */
+ private $cache = [];
+
+ /**
+ * @param Tree $tree node tree
+ * @param IDBConnection $connection database connection
+ * @param IUser $user owner of the tree and properties
+ */
+ public function __construct(
+ Tree $tree,
+ IDBConnection $connection,
+ IUser $user) {
+ $this->tree = $tree;
+ $this->connection = $connection;
+ $this->user = $user->getUID();
+ }
+
+ /**
+ * Fetches properties for a path.
+ *
+ * @param string $path
+ * @param PropFind $propFind
+ * @return void
+ */
+ public function propFind($path, PropFind $propFind) {
+ $node = $this->tree->getNodeForPath($path);
+ if (!($node instanceof Node)) {
+ return;
+ }
+
+ $requestedProps = $propFind->get404Properties();
+
+ // these might appear
+ $requestedProps = array_diff(
+ $requestedProps,
+ $this->ignoredProperties
+ );
+
+ if (empty($requestedProps)) {
+ return;
+ }
+
+ if ($node instanceof Directory
+ && $propFind->getDepth() !== 0
+ ) {
+ // note: pre-fetching only supported for depth <= 1
+ $this->loadChildrenProperties($node, $requestedProps);
+ }
+
+ $props = $this->getProperties($node, $requestedProps);
+ foreach ($props as $propName => $propValue) {
+ $propFind->set($propName, $propValue);
+ }
+ }
+
+ /**
+ * Updates properties for a path
+ *
+ * @param string $path
+ * @param PropPatch $propPatch
+ *
+ * @return void
+ */
+ public function propPatch($path, PropPatch $propPatch) {
+ $node = $this->tree->getNodeForPath($path);
+ if (!($node instanceof Node)) {
+ return;
+ }
+
+ $propPatch->handleRemaining(function($changedProps) use ($node) {
+ return $this->updateProperties($node, $changedProps);
+ });
+ }
+
+ /**
+ * This method is called after a node is deleted.
+ *
+ * @param string $path path of node for which to delete properties
+ */
+ public function delete($path) {
+ $statement = $this->connection->prepare(
+ 'DELETE FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?'
+ );
+ $statement->execute(array($this->user, '/' . $path));
+ $statement->closeCursor();
+
+ unset($this->cache[$path]);
+ }
+
+ /**
+ * This method is called after a successful MOVE
+ *
+ * @param string $source
+ * @param string $destination
+ *
+ * @return void
+ */
+ public function move($source, $destination) {
+ $statement = $this->connection->prepare(
+ 'UPDATE `*PREFIX*properties` SET `propertypath` = ?' .
+ ' WHERE `userid` = ? AND `propertypath` = ?'
+ );
+ $statement->execute(array('/' . $destination, $this->user, '/' . $source));
+ $statement->closeCursor();
+ }
+
+ /**
+ * Returns a list of properties for this nodes.;
+ * @param Node $node
+ * @param array $requestedProperties requested properties or empty array for "all"
+ * @return array
+ * @note The properties list is a list of propertynames the client
+ * requested, encoded as xmlnamespace#tagName, for example:
+ * http://www.example.org/namespace#author If the array is empty, all
+ * properties should be returned
+ */
+ private function getProperties(Node $node, array $requestedProperties) {
+ $path = $node->getPath();
+ if (isset($this->cache[$path])) {
+ return $this->cache[$path];
+ }
+
+ // TODO: chunking if more than 1000 properties
+ $sql = 'SELECT * FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?';
+
+ $whereValues = array($this->user, $path);
+ $whereTypes = array(null, null);
+
+ if (!empty($requestedProperties)) {
+ // request only a subset
+ $sql .= ' AND `propertyname` in (?)';
+ $whereValues[] = $requestedProperties;
+ $whereTypes[] = \Doctrine\DBAL\Connection::PARAM_STR_ARRAY;
+ }
+
+ $result = $this->connection->executeQuery(
+ $sql,
+ $whereValues,
+ $whereTypes
+ );
+
+ $props = [];
+ while ($row = $result->fetch()) {
+ $props[$row['propertyname']] = $row['propertyvalue'];
+ }
+
+ $result->closeCursor();
+
+ $this->cache[$path] = $props;
+ return $props;
+ }
+
+ /**
+ * Update properties
+ *
+ * @param Node $node node for which to update properties
+ * @param array $properties array of properties to update
+ *
+ * @return bool
+ */
+ private function updateProperties($node, $properties) {
+ $path = $node->getPath();
+
+ $deleteStatement = 'DELETE FROM `*PREFIX*properties`' .
+ ' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?';
+
+ $insertStatement = 'INSERT INTO `*PREFIX*properties`' .
+ ' (`userid`,`propertypath`,`propertyname`,`propertyvalue`) VALUES(?,?,?,?)';
+
+ $updateStatement = 'UPDATE `*PREFIX*properties` SET `propertyvalue` = ?' .
+ ' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?';
+
+ // TODO: use "insert or update" strategy ?
+ $existing = $this->getProperties($node, array());
+ $this->connection->beginTransaction();
+ foreach ($properties as $propertyName => $propertyValue) {
+ // If it was null, we need to delete the property
+ if (is_null($propertyValue)) {
+ if (array_key_exists($propertyName, $existing)) {
+ $this->connection->executeUpdate($deleteStatement,
+ array(
+ $this->user,
+ $path,
+ $propertyName
+ )
+ );
+ }
+ } else {
+ if (!array_key_exists($propertyName, $existing)) {
+ $this->connection->executeUpdate($insertStatement,
+ array(
+ $this->user,
+ $path,
+ $propertyName,
+ $propertyValue
+ )
+ );
+ } else {
+ $this->connection->executeUpdate($updateStatement,
+ array(
+ $propertyValue,
+ $this->user,
+ $path,
+ $propertyName
+ )
+ );
+ }
+ }
+ }
+
+ $this->connection->commit();
+ unset($this->cache[$path]);
+
+ return true;
+ }
+
+ /**
+ * Bulk load properties for directory children
+ *
+ * @param Directory $node
+ * @param array $requestedProperties requested properties
+ *
+ * @return void
+ */
+ private function loadChildrenProperties(Directory $node, $requestedProperties) {
+ $path = $node->getPath();
+ if (isset($this->cache[$path])) {
+ // we already loaded them at some point
+ return;
+ }
+
+ $childNodes = $node->getChildren();
+ // pre-fill cache
+ foreach ($childNodes as $childNode) {
+ $this->cache[$childNode->getPath()] = [];
+ }
+
+ $sql = 'SELECT * FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` LIKE ?';
+ $sql .= ' AND `propertyname` in (?) ORDER BY `propertypath`, `propertyname`';
+
+ $result = $this->connection->executeQuery(
+ $sql,
+ array($this->user, rtrim($path, '/') . '/%', $requestedProperties),
+ array(null, null, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY)
+ );
+
+ $oldPath = null;
+ $props = [];
+ while ($row = $result->fetch()) {
+ $path = $row['propertypath'];
+ if ($oldPath !== $path) {
+ // save previously gathered props
+ $this->cache[$oldPath] = $props;
+ $oldPath = $path;
+ // prepare props for next path
+ $props = [];
+ }
+ $props[$row['propertyname']] = $row['propertyvalue'];
+ }
+ if (!is_null($oldPath)) {
+ // save props from last run
+ $this->cache[$oldPath] = $props;
+ }
+
+ $result->closeCursor();
+ }
+
+}
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index c878e5ee4b4..103d608d0f8 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -20,8 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
+namespace OC\Connector\Sabre;
-class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
+class Directory extends \OC\Connector\Sabre\Node
implements \Sabre\DAV\ICollection, \Sabre\DAV\IQuota {
/**
@@ -32,6 +32,13 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
private $dirContent;
/**
+ * Cached quota info
+ *
+ * @var array
+ */
+ private $quotaInfo;
+
+ /**
* Creates a new file in the directory
*
* Data will either be supplied as a stream resource, or in certain cases
@@ -64,9 +71,10 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
// exit if we can't create a new file and we don't updatable existing file
- $info = OC_FileChunking::decodeName($name);
+ $info = \OC_FileChunking::decodeName($name);
if (!$this->fileView->isCreatable($this->path) &&
- !$this->fileView->isUpdatable($this->path . '/' . $info['name'])) {
+ !$this->fileView->isUpdatable($this->path . '/' . $info['name'])
+ ) {
throw new \Sabre\DAV\Exception\Forbidden();
}
@@ -80,7 +88,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
$path = $this->fileView->getAbsolutePath($this->path) . '/' . $name;
// using a dummy FileInfo is acceptable here since it will be refreshed after the put is complete
$info = new \OC\Files\FileInfo($path, null, null, array(), null);
- $node = new OC_Connector_Sabre_File($this->fileView, $info);
+ $node = new \OC\Connector\Sabre\File($this->fileView, $info);
return $node->put($data);
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
@@ -101,8 +109,8 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
}
$newPath = $this->path . '/' . $name;
- if(!$this->fileView->mkdir($newPath)) {
- throw new \Sabre\DAV\Exception\Forbidden('Could not create directory '.$newPath);
+ if (!$this->fileView->mkdir($newPath)) {
+ throw new \Sabre\DAV\Exception\Forbidden('Could not create directory ' . $newPath);
}
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
@@ -132,9 +140,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
}
if ($info['mimetype'] == 'httpd/unix-directory') {
- $node = new OC_Connector_Sabre_Directory($this->fileView, $info);
+ $node = new \OC\Connector\Sabre\Directory($this->fileView, $info);
} else {
- $node = new OC_Connector_Sabre_File($this->fileView, $info);
+ $node = new \OC\Connector\Sabre\File($this->fileView, $info);
}
return $node;
}
@@ -150,42 +158,9 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
}
$folderContent = $this->fileView->getDirectoryContent($this->path);
- $properties = array();
- $paths = array();
- foreach($folderContent as $info) {
- $name = $info->getName();
- $paths[] = $this->path . '/' . $name;
- $properties[$this->path.'/' . $name][self::GETETAG_PROPERTYNAME] = '"' . $info->getEtag() . '"';
- }
- // TODO: move this to a beforeGetPropertiesForPath event to pre-cache properties
- // TODO: only fetch the requested properties
- if(count($paths)>0) {
- //
- // the number of arguments within IN conditions are limited in most databases
- // we chunk $paths into arrays of 200 items each to meet this criteria
- //
- $chunks = array_chunk($paths, 200, false);
- foreach ($chunks as $pack) {
- $placeholders = join(',', array_fill(0, count($pack), '?'));
- $query = OC_DB::prepare( 'SELECT * FROM `*PREFIX*properties`'
- .' WHERE `userid` = ?' . ' AND `propertypath` IN ('.$placeholders.')' );
- array_unshift($pack, OC_User::getUser()); // prepend userid
- $result = $query->execute( $pack );
- while($row = $result->fetchRow()) {
- $propertypath = $row['propertypath'];
- $propertyname = $row['propertyname'];
- $propertyvalue = $row['propertyvalue'];
- if($propertyname !== self::GETETAG_PROPERTYNAME) {
- $properties[$propertypath][$propertyname] = $propertyvalue;
- }
- }
- }
- }
-
$nodes = array();
- foreach($folderContent as $info) {
+ foreach ($folderContent as $info) {
$node = $this->getChild($info->getName(), $info);
- $node->setPropertyCache($properties[$this->path . '/' . $info->getName()]);
$nodes[] = $node;
}
$this->dirContent = $nodes;
@@ -199,7 +174,13 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
* @return bool
*/
public function childExists($name) {
-
+ // note: here we do NOT resolve the chunk file name to the real file name
+ // to make sure we return false when checking for file existence with a chunk
+ // file name.
+ // This is to make sure that "createFile" is still triggered
+ // (required old code) instead of "updateFile".
+ //
+ // TODO: resolve chunk file name here and implement "updateFile"
$path = $this->path . '/' . $name;
return $this->fileView->file_exists($path);
@@ -230,45 +211,19 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
* @return array
*/
public function getQuotaInfo() {
+ if ($this->quotaInfo) {
+ return $this->quotaInfo;
+ }
try {
- $path = \OC\Files\Filesystem::getView()->getRelativePath($this->info->getPath());
- $storageInfo = OC_Helper::getStorageInfo($path);
- return array(
+ $storageInfo = \OC_Helper::getStorageInfo($this->info->getPath(), $this->info);
+ $this->quotaInfo = array(
$storageInfo['used'],
$storageInfo['free']
);
- }
- catch (\OCP\Files\StorageNotAvailableException $e) {
+ return $this->quotaInfo;
+ } catch (\OCP\Files\StorageNotAvailableException $e) {
return array(0, 0);
}
}
- /**
- * Returns a list of properties for this nodes.;
- *
- * The properties list is a list of propertynames the client requested,
- * encoded as xmlnamespace#tagName, for example:
- * http://www.example.org/namespace#author
- * If the array is empty, all properties should be returned
- *
- * @param array $properties
- * @return array
- */
- public function getProperties($properties) {
- $props = parent::getProperties($properties);
- if (in_array(self::GETETAG_PROPERTYNAME, $properties) && !isset($props[self::GETETAG_PROPERTYNAME])) {
- $props[self::GETETAG_PROPERTYNAME] = $this->info->getEtag();
- }
- return $props;
- }
-
- /**
- * Returns the size of the node, in bytes
- *
- * @return int
- */
- public function getSize() {
- return $this->info->getSize();
- }
-
}
diff --git a/lib/private/connector/sabre/dummygetresponseplugin.php b/lib/private/connector/sabre/dummygetresponseplugin.php
new file mode 100644
index 00000000000..0b78fe7dcb3
--- /dev/null
+++ b/lib/private/connector/sabre/dummygetresponseplugin.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Copyright (c) 2015 Lukas Reschke <lukas@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Connector\Sabre;
+
+/**
+ * Class DummyGetResponsePlugin is a plugin used to not show a "Not implemented"
+ * error to clients that rely on verifying the functionality of the ownCloud
+ * WebDAV backend using a simple GET to /.
+ *
+ * This is considered a legacy behaviour and implementers should consider sending
+ * a PROPFIND request instead to verify whether the WebDAV component is working
+ * properly.
+ *
+ * FIXME: Remove once clients are all compliant.
+ *
+ * @package OC\Connector\Sabre
+ */
+class DummyGetResponsePlugin extends \Sabre\DAV\ServerPlugin {
+ /** @var \Sabre\DAV\Server */
+ protected $server;
+
+ /**
+ * @param \Sabre\DAV\Server $server
+ * @return void
+ */
+ function initialize(\Sabre\DAV\Server $server) {
+ $this->server = $server;
+ $this->server->on('method:GET', [$this,'httpGet'], 200);
+ }
+
+ /**
+ * @return false
+ */
+ function httpGet() {
+ return false;
+ }
+}
diff --git a/lib/private/connector/sabre/exception/entitytoolarge.php b/lib/private/connector/sabre/exception/entitytoolarge.php
index 2524fbaa74c..bbd03439c04 100644
--- a/lib/private/connector/sabre/exception/entitytoolarge.php
+++ b/lib/private/connector/sabre/exception/entitytoolarge.php
@@ -1,12 +1,15 @@
<?php
+
+namespace OC\Connector\Sabre\Exception;
+
/**
* Entity Too Large
*
* This exception is thrown whenever a user tries to upload a file which exceeds hard limitations
*
*/
-class OC_Connector_Sabre_Exception_EntityTooLarge extends \Sabre\DAV\Exception {
+class EntityTooLarge extends \Sabre\DAV\Exception {
/**
* Returns the HTTP status code for this exception
diff --git a/lib/private/connector/sabre/exception/filelocked.php b/lib/private/connector/sabre/exception/filelocked.php
index 59d932d22de..58455e3dba8 100644
--- a/lib/private/connector/sabre/exception/filelocked.php
+++ b/lib/private/connector/sabre/exception/filelocked.php
@@ -7,7 +7,11 @@
*
*/
-class OC_Connector_Sabre_Exception_FileLocked extends \Sabre\DAV\Exception {
+namespace OC\Connector\Sabre\Exception;
+
+use Exception;
+
+class FileLocked extends \Sabre\DAV\Exception {
public function __construct($message = "", $code = 0, Exception $previous = null) {
if($previous instanceof \OCP\Files\LockNotAcquiredException) {
diff --git a/lib/private/connector/sabre/exception/invalidpath.php b/lib/private/connector/sabre/exception/invalidpath.php
new file mode 100644
index 00000000000..ecf28f377b0
--- /dev/null
+++ b/lib/private/connector/sabre/exception/invalidpath.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Copyright (c) 2015 Thomas Müller <deepdiver@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file. */
+
+namespace OC\Connector\Sabre\Exception;
+
+use Sabre\DAV\Exception;
+
+class InvalidPath extends Exception {
+
+ const NS_OWNCLOUD = 'http://owncloud.org/ns';
+
+ /**
+ * @var bool
+ */
+ private $retry;
+
+ /**
+ * @param string $message
+ * @param bool $retry
+ */
+ public function __construct($message, $retry = false) {
+ parent::__construct($message);
+ $this->retry = $retry;
+ }
+
+ /**
+ * Returns the HTTP status code for this exception
+ *
+ * @return int
+ */
+ public function getHTTPCode() {
+
+ return 400;
+
+ }
+
+ /**
+ * This method allows the exception to include additional information
+ * into the WebDAV error response
+ *
+ * @param \Sabre\DAV\Server $server
+ * @param \DOMElement $errorNode
+ * @return void
+ */
+ public function serialize(\Sabre\DAV\Server $server,\DOMElement $errorNode) {
+
+ // set ownCloud namespace
+ $errorNode->setAttribute('xmlns:o', self::NS_OWNCLOUD);
+
+ // adding the retry node
+ $error = $errorNode->ownerDocument->createElementNS('o:','o:retry', var_export($this->retry, true));
+ $errorNode->appendChild($error);
+
+ // adding the message node
+ $error = $errorNode->ownerDocument->createElementNS('o:','o:reason', $this->getMessage());
+ $errorNode->appendChild($error);
+ }
+
+}
diff --git a/lib/private/connector/sabre/exception/unsupportedmediatype.php b/lib/private/connector/sabre/exception/unsupportedmediatype.php
index 9b285196ebd..61664747293 100644
--- a/lib/private/connector/sabre/exception/unsupportedmediatype.php
+++ b/lib/private/connector/sabre/exception/unsupportedmediatype.php
@@ -1,12 +1,15 @@
<?php
+
+namespace OC\Connector\Sabre\Exception;
+
/**
* Unsupported Media Type
*
* This exception is thrown whenever a user tries to upload a file which holds content which is not allowed
*
*/
-class OC_Connector_Sabre_Exception_UnsupportedMediaType extends \Sabre\DAV\Exception {
+class UnsupportedMediaType extends \Sabre\DAV\Exception {
/**
* Returns the HTTP status code for this exception
diff --git a/lib/private/connector/sabre/exceptionloggerplugin.php b/lib/private/connector/sabre/exceptionloggerplugin.php
index 5963123709b..a0dc6e7c182 100644
--- a/lib/private/connector/sabre/exceptionloggerplugin.php
+++ b/lib/private/connector/sabre/exceptionloggerplugin.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -9,8 +8,13 @@
* @license AGPL3
*/
-class OC_Connector_Sabre_ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin
-{
+namespace OC\Connector\Sabre;
+
+use OCP\ILogger;
+use Sabre\DAV\Exception;
+use Sabre\HTTP\Response;
+
+class ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin {
private $nonFatalExceptions = array(
'Sabre\DAV\Exception\NotAuthenticated' => true,
// the sync client uses this to find out whether files exist,
@@ -22,13 +26,19 @@ class OC_Connector_Sabre_ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin
'Sabre\DAV\Exception\PreconditionFailed' => true,
);
+ /** @var string */
private $appName;
+ /** @var ILogger */
+ private $logger;
+
/**
* @param string $loggerAppName app name to use when logging
+ * @param ILogger $logger
*/
- public function __construct($loggerAppName = 'webdav') {
+ public function __construct($loggerAppName, $logger) {
$this->appName = $loggerAppName;
+ $this->logger = $logger;
}
/**
@@ -44,20 +54,36 @@ class OC_Connector_Sabre_ExceptionLoggerPlugin extends \Sabre\DAV\ServerPlugin
*/
public function initialize(\Sabre\DAV\Server $server) {
- $server->subscribeEvent('exception', array($this, 'logException'), 10);
+ $server->on('exception', array($this, 'logException'), 10);
}
/**
* Log exception
*
- * @internal param Exception $e exception
*/
- public function logException($e) {
- $exceptionClass = get_class($e);
+ public function logException(\Exception $ex) {
+ $exceptionClass = get_class($ex);
$level = \OCP\Util::FATAL;
if (isset($this->nonFatalExceptions[$exceptionClass])) {
$level = \OCP\Util::DEBUG;
}
- \OCP\Util::logException($this->appName, $e, $level);
+
+ $message = $ex->getMessage();
+ if ($ex instanceof Exception) {
+ if (empty($message)) {
+ $response = new Response($ex->getHTTPCode());
+ $message = $response->getStatusText();
+ }
+ $message = "HTTP/1.1 {$ex->getHTTPCode()} $message";
+ }
+
+ $exception = [
+ 'Message' => $message,
+ 'Code' => $ex->getCode(),
+ 'Trace' => $ex->getTraceAsString(),
+ 'File' => $ex->getFile(),
+ 'Line' => $ex->getLine(),
+ ];
+ $this->logger->log($level, 'Exception: ' . json_encode($exception), ['app' => $this->appName]);
}
}
diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php
index 12ce633838f..8f0642d794a 100644
--- a/lib/private/connector/sabre/file.php
+++ b/lib/private/connector/sabre/file.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -21,7 +20,9 @@
*
*/
-class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\DAV\IFile {
+namespace OC\Connector\Sabre;
+
+class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
/**
* Updates the data
@@ -41,11 +42,12 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
* return an ETag, and just return null.
*
* @param resource $data
+ *
* @throws \Sabre\DAV\Exception\Forbidden
- * @throws OC_Connector_Sabre_Exception_UnsupportedMediaType
+ * @throws \OC\Connector\Sabre\Exception\UnsupportedMediaType
* @throws \Sabre\DAV\Exception\BadRequest
* @throws \Sabre\DAV\Exception
- * @throws OC_Connector_Sabre_Exception_EntityTooLarge
+ * @throws \OC\Connector\Sabre\Exception\EntityTooLarge
* @throws \Sabre\DAV\Exception\ServiceUnavailable
* @return string|null
*/
@@ -64,17 +66,15 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
throw new \Sabre\DAV\Exception\ServiceUnavailable("Encryption is disabled");
}
- $fileName = basename($this->info->getPath());
- if (!\OCP\Util::isValidFileName($fileName)) {
- throw new \Sabre\DAV\Exception\BadRequest();
- }
+ // verify path of the target
+ $this->verifyPath();
// chunked handling
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
return $this->createFileChunked($data);
}
- list($storage,) = $this->fileView->resolvePath($this->path);
+ list($storage) = $this->fileView->resolvePath($this->path);
$needsPartFile = $this->needsPartFile($storage) && (strlen($this->path) > 1);
if ($needsPartFile) {
@@ -99,11 +99,11 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
} catch (\OCP\Files\EntityTooLargeException $e) {
// the file is too big to be stored
- throw new OC_Connector_Sabre_Exception_EntityTooLarge($e->getMessage());
+ throw new \OC\Connector\Sabre\Exception\EntityTooLarge($e->getMessage());
} catch (\OCP\Files\InvalidContentException $e) {
// the file content is not permitted
- throw new OC_Connector_Sabre_Exception_UnsupportedMediaType($e->getMessage());
+ throw new \OC\Connector\Sabre\Exception\UnsupportedMediaType($e->getMessage());
} catch (\OCP\Files\InvalidPathException $e) {
// the path for the file was not valid
@@ -111,7 +111,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
} catch (\OCP\Files\LockNotAcquiredException $e) {
// the file is currently being written to by another process
- throw new OC_Connector_Sabre_Exception_FileLocked($e->getMessage(), $e->getCode(), $e);
+ throw new \OC\Connector\Sabre\Exception\FileLocked($e->getMessage(), $e->getCode(), $e);
} catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
} catch (\OCP\Files\StorageNotAvailableException $e) {
@@ -144,14 +144,14 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
}
catch (\OCP\Files\LockNotAcquiredException $e) {
// the file is currently being written to by another process
- throw new OC_Connector_Sabre_Exception_FileLocked($e->getMessage(), $e->getCode(), $e);
+ throw new \OC\Connector\Sabre\Exception\FileLocked($e->getMessage(), $e->getCode(), $e);
}
}
// allow sync clients to send the mtime along in a header
- $mtime = OC_Request::hasModificationTime();
- if ($mtime !== false) {
- if($this->fileView->touch($this->path, $mtime)) {
+ $request = \OC::$server->getRequest();
+ if (isset($request->server['HTTP_X_OC_MTIME'])) {
+ if($this->fileView->touch($this->path, $request->server['HTTP_X_OC_MTIME'])) {
header('X-OC-MTime: accepted');
}
}
@@ -165,8 +165,9 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
/**
* Returns the data
- *
* @return string|resource
+ * @throws \Sabre\DAV\Exception\Forbidden
+ * @throws \Sabre\DAV\Exception\ServiceUnavailable
*/
public function get() {
@@ -187,9 +188,8 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
/**
* Delete the current file
- *
- * @return void
* @throws \Sabre\DAV\Exception\Forbidden
+ * @throws \Sabre\DAV\Exception\ServiceUnavailable
*/
public function delete() {
if (!$this->info->isDeletable()) {
@@ -204,19 +204,6 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to unlink: ".$e->getMessage());
}
-
- // remove properties
- $this->removeProperties();
-
- }
-
- /**
- * Returns the size of the node, in bytes
- *
- * @return int|float
- */
- public function getSize() {
- return $this->info->getSize();
}
/**
@@ -236,6 +223,9 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
return \OC_Helper::getSecureMimeType($mimeType);
}
+ /**
+ * @return array|false
+ */
public function getDirectDownload() {
if (\OCP\App::isEnabled('encryption')) {
return [];
@@ -252,16 +242,20 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
/**
* @param resource $data
* @return null|string
+ * @throws \Sabre\DAV\Exception
+ * @throws \Sabre\DAV\Exception\BadRequest
+ * @throws \Sabre\DAV\Exception\NotImplemented
+ * @throws \Sabre\DAV\Exception\ServiceUnavailable
*/
private function createFileChunked($data)
{
- list($path, $name) = \Sabre\DAV\URLUtil::splitPath($this->path);
+ list($path, $name) = \Sabre\HTTP\URLUtil::splitPath($this->path);
- $info = OC_FileChunking::decodeName($name);
+ $info = \OC_FileChunking::decodeName($name);
if (empty($info)) {
throw new \Sabre\DAV\Exception\NotImplemented();
}
- $chunk_handler = new OC_FileChunking($info);
+ $chunk_handler = new \OC_FileChunking($info);
$bytesWritten = $chunk_handler->store($info['index'], $data);
//detect aborted upload
@@ -304,9 +298,9 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
}
// allow sync clients to send the mtime along in a header
- $mtime = OC_Request::hasModificationTime();
- if ($mtime !== false) {
- if($this->fileView->touch($targetPath, $mtime)) {
+ $request = \OC::$server->getRequest();
+ if (isset($request->server['HTTP_X_OC_MTIME'])) {
+ if($this->fileView->touch($targetPath, $request->server['HTTP_X_OC_MTIME'])) {
header('X-OC-MTime: accepted');
}
}
@@ -325,14 +319,13 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements \Sabre\
* Returns whether a part file is needed for the given storage
* or whether the file can be assembled/uploaded directly on the
* target storage.
- *
- * @param \OCP\Files\Storage $storage storage to check
- * @param bool true if the storage needs part file handling
+ * @param \OCP\Files\Storage $storage
+ * @return bool true if the storage needs part file handling
*/
private function needsPartFile($storage) {
// TODO: in the future use ChunkHandler provided by storage
// and/or add method on Storage called "needsPartFile()"
return !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') &&
!$storage->instanceOfStorage('OC\Files\Storage\OwnCloud');
- }
+ }
}
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index ff5a6cc8b4b..29240e2b674 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -9,11 +8,23 @@
* @license AGPL3
*/
-class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
-{
+namespace OC\Connector\Sabre;
+
+use \Sabre\DAV\PropFind;
+use \Sabre\DAV\PropPatch;
+use \Sabre\HTTP\RequestInterface;
+use \Sabre\HTTP\ResponseInterface;
+
+class FilesPlugin extends \Sabre\DAV\ServerPlugin {
// namespace
const NS_OWNCLOUD = 'http://owncloud.org/ns';
+ const FILEID_PROPERTYNAME = '{http://owncloud.org/ns}id';
+ const PERMISSIONS_PROPERTYNAME = '{http://owncloud.org/ns}permissions';
+ const DOWNLOADURL_PROPERTYNAME = '{http://owncloud.org/ns}downloadURL';
+ const SIZE_PROPERTYNAME = '{http://owncloud.org/ns}size';
+ const GETETAG_PROPERTYNAME = '{DAV:}getetag';
+ const GETLASTMODIFIED_PROPERTYNAME = '{DAV:}getlastmodified';
/**
* Reference to main server object
@@ -23,6 +34,15 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
private $server;
/**
+ * @var \Sabre\DAV\Tree
+ */
+ private $tree;
+
+ public function __construct(\Sabre\DAV\Tree $tree) {
+ $this->tree = $tree;
+ }
+
+ /**
* This initializes the plugin.
*
* This function is called by \Sabre\DAV\Server, after
@@ -36,69 +56,101 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
public function initialize(\Sabre\DAV\Server $server) {
$server->xmlNamespaces[self::NS_OWNCLOUD] = 'oc';
- $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}id';
- $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}permissions';
- $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}size';
- $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}downloadURL';
+ $server->protectedProperties[] = self::FILEID_PROPERTYNAME;
+ $server->protectedProperties[] = self::PERMISSIONS_PROPERTYNAME;
+ $server->protectedProperties[] = self::SIZE_PROPERTYNAME;
+ $server->protectedProperties[] = self::DOWNLOADURL_PROPERTYNAME;
+
+ // normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH
+ $allowedProperties = ['{DAV:}getetag', '{DAV:}getlastmodified'];
+ $server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties);
$this->server = $server;
- $this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
- $this->server->subscribeEvent('afterBind', array($this, 'sendFileIdHeader'));
- $this->server->subscribeEvent('afterWriteContent', array($this, 'sendFileIdHeader'));
+ $this->server->on('propFind', array($this, 'handleGetProperties'));
+ $this->server->on('propPatch', array($this, 'handleUpdateProperties'));
+ $this->server->on('afterBind', array($this, 'sendFileIdHeader'));
+ $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
+ $this->server->on('beforeMethod:GET', array($this, 'handleRangeHeaders'));
}
/**
* Adds all ownCloud-specific properties
*
- * @param string $path
+ * @param PropFind $propFind
* @param \Sabre\DAV\INode $node
- * @param array $requestedProperties
- * @param array $returnedProperties
* @return void
*/
- public function beforeGetProperties($path, \Sabre\DAV\INode $node, array &$requestedProperties, array &$returnedProperties) {
+ public function handleGetProperties(PropFind $propFind, \Sabre\DAV\INode $node) {
- if ($node instanceof OC_Connector_Sabre_Node) {
+ if ($node instanceof \OC\Connector\Sabre\Node) {
- $fileIdPropertyName = '{' . self::NS_OWNCLOUD . '}id';
- $permissionsPropertyName = '{' . self::NS_OWNCLOUD . '}permissions';
- if (array_search($fileIdPropertyName, $requestedProperties)) {
- unset($requestedProperties[array_search($fileIdPropertyName, $requestedProperties)]);
- }
- if (array_search($permissionsPropertyName, $requestedProperties)) {
- unset($requestedProperties[array_search($permissionsPropertyName, $requestedProperties)]);
- }
+ $propFind->handle(self::FILEID_PROPERTYNAME, function() use ($node) {
+ return $node->getFileId();
+ });
- /** @var $node OC_Connector_Sabre_Node */
- $fileId = $node->getFileId();
- if (!is_null($fileId)) {
- $returnedProperties[200][$fileIdPropertyName] = $fileId;
- }
+ $propFind->handle(self::PERMISSIONS_PROPERTYNAME, function() use ($node) {
+ return $node->getDavPermissions();
+ });
- $permissions = $node->getDavPermissions();
- if (!is_null($permissions)) {
- $returnedProperties[200][$permissionsPropertyName] = $permissions;
- }
+ $propFind->handle(self::GETETAG_PROPERTYNAME, function() use ($node) {
+ return $node->getEtag();
+ });
}
- if ($node instanceof OC_Connector_Sabre_File) {
- /** @var $node OC_Connector_Sabre_File */
- $directDownloadUrl = $node->getDirectDownload();
- if (isset($directDownloadUrl['url'])) {
- $directDownloadUrlPropertyName = '{' . self::NS_OWNCLOUD . '}downloadURL';
- $returnedProperties[200][$directDownloadUrlPropertyName] = $directDownloadUrl['url'];
- }
+ if ($node instanceof \OC\Connector\Sabre\File) {
+ $propFind->handle(self::DOWNLOADURL_PROPERTYNAME, function() use ($node) {
+ /** @var $node \OC\Connector\Sabre\File */
+ $directDownloadUrl = $node->getDirectDownload();
+ if (isset($directDownloadUrl['url'])) {
+ return $directDownloadUrl['url'];
+ }
+ return false;
+ });
}
- if ($node instanceof OC_Connector_Sabre_Directory) {
- $sizePropertyName = '{' . self::NS_OWNCLOUD . '}size';
-
- /** @var $node OC_Connector_Sabre_Directory */
- $returnedProperties[200][$sizePropertyName] = $node->getSize();
+ if ($node instanceof \OC\Connector\Sabre\Directory) {
+ $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
+ return $node->getSize();
+ });
}
}
/**
+ * Update ownCloud-specific properties
+ *
+ * @param string $path
+ * @param PropPatch $propPatch
+ *
+ * @return void
+ */
+ public function handleUpdateProperties($path, PropPatch $propPatch) {
+ $propPatch->handle(self::GETLASTMODIFIED_PROPERTYNAME, function($time) use ($path) {
+ if (empty($time)) {
+ return false;
+ }
+ $node = $this->tree->getNodeForPath($path);
+ if (is_null($node)) {
+ return 404;
+ }
+ $node->touch($time);
+ return true;
+ });
+ $propPatch->handle(self::GETETAG_PROPERTYNAME, function($etag) use ($path) {
+ if (empty($etag)) {
+ return false;
+ }
+ $node = $this->tree->getNodeForPath($path);
+ if (is_null($node)) {
+ return 404;
+ }
+ if ($node->setEtag($etag) !== -1) {
+ return true;
+ }
+ return false;
+ });
+ }
+
+ /**
* @param string $filePath
* @param \Sabre\DAV\INode $node
* @throws \Sabre\DAV\Exception\BadRequest
@@ -106,8 +158,8 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
public function sendFileIdHeader($filePath, \Sabre\DAV\INode $node = null) {
// chunked upload handling
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
- list($path, $name) = \Sabre\DAV\URLUtil::splitPath($filePath);
- $info = OC_FileChunking::decodeName($name);
+ list($path, $name) = \Sabre\HTTP\URLUtil::splitPath($filePath);
+ $info = \OC_FileChunking::decodeName($name);
if (!empty($info)) {
$filePath = $path . '/' . $info['name'];
}
@@ -118,15 +170,24 @@ class OC_Connector_Sabre_FilesPlugin extends \Sabre\DAV\ServerPlugin
return;
}
$node = $this->server->tree->getNodeForPath($filePath);
- if ($node instanceof OC_Connector_Sabre_Node) {
+ if ($node instanceof \OC\Connector\Sabre\Node) {
$fileId = $node->getFileId();
if (!is_null($fileId)) {
$this->server->httpResponse->setHeader('OC-FileId', $fileId);
}
- $eTag = $node->getETag();
- if (!is_null($eTag)) {
- $this->server->httpResponse->setHeader('OC-ETag', $eTag);
- }
+ }
+ }
+
+ /**
+ * Remove range headers if encryption is enabled.
+ *
+ * @param RequestInterface $request
+ * @param ResponseInterface $response
+ */
+ public function handleRangeHeaders(RequestInterface $request, ResponseInterface $response) {
+ if (\OC_App::isEnabled('files_encryption')) {
+ // encryption does not support range requests (yet)
+ $request->removeHeader('range');
}
}
diff --git a/lib/private/connector/sabre/locks.php b/lib/private/connector/sabre/locks.php
deleted file mode 100644
index 09bf874ec70..00000000000
--- a/lib/private/connector/sabre/locks.php
+++ /dev/null
@@ -1,189 +0,0 @@
-<?php
-
-/**
- * ownCloud
- *
- * @author Jakob Sack
- * @copyright 2011 Jakob Sack kde@jakobsack.de
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-class OC_Connector_Sabre_Locks extends \Sabre\DAV\Locks\Backend\AbstractBackend {
-
- /**
- * Returns a list of \Sabre\DAV\Locks_LockInfo objects
- *
- * This method should return all the locks for a particular uri, including
- * locks that might be set on a parent uri.
- *
- * If returnChildLocks is set to true, this method should also look for
- * any locks in the subtree of the uri for locks.
- *
- * @param string $uri
- * @param bool $returnChildLocks
- * @return array
- */
- public function getLocks($uri, $returnChildLocks) {
-
- // NOTE: the following 10 lines or so could be easily replaced by
- // pure sql. MySQL's non-standard string concatination prevents us
- // from doing this though.
- // NOTE: SQLite requires time() to be inserted directly. That's ugly
- // but otherwise reading locks from SQLite Databases will return
- // nothing
- $query = 'SELECT * FROM `*PREFIX*locks`'
- .' WHERE `userid` = ? AND (`created` + `timeout`) > '.time().' AND (( `uri` = ?)';
- if (OC_Config::getValue( "dbtype") === 'oci') {
- //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
- $query = 'SELECT * FROM `*PREFIX*locks`'
- .' WHERE `userid` = ? AND (`created` + `timeout`) > '.time().' AND (( to_char(`uri`) = ?)';
- }
- $params = array(OC_User::getUser(), $uri);
-
- // We need to check locks for every part in the uri.
- $uriParts = explode('/', $uri);
-
- // We already covered the last part of the uri
- array_pop($uriParts);
-
- $currentPath='';
-
- foreach($uriParts as $part) {
-
- if ($currentPath) $currentPath.='/';
- $currentPath.=$part;
- //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
- if (OC_Config::getValue( "dbtype") === 'oci') {
- $query.=' OR (`depth` != 0 AND to_char(`uri`) = ?)';
- } else {
- $query.=' OR (`depth` != 0 AND `uri` = ?)';
- }
- $params[] = $currentPath;
-
- }
-
- if ($returnChildLocks) {
-
- //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
- if (OC_Config::getValue( "dbtype") === 'oci') {
- $query.=' OR (to_char(`uri`) LIKE ?)';
- } else {
- $query.=' OR (`uri` LIKE ?)';
- }
- $params[] = $uri . '/%';
-
- }
- $query.=')';
-
- $result = OC_DB::executeAudited( $query, $params );
-
- $lockList = array();
- while( $row = $result->fetchRow()) {
-
- $lockInfo = new \Sabre\DAV\Locks\LockInfo();
- $lockInfo->owner = $row['owner'];
- $lockInfo->token = $row['token'];
- $lockInfo->timeout = $row['timeout'];
- $lockInfo->created = $row['created'];
- $lockInfo->scope = $row['scope'];
- $lockInfo->depth = $row['depth'];
- $lockInfo->uri = $row['uri'];
- $lockList[] = $lockInfo;
-
- }
-
- return $lockList;
-
- }
-
- /**
- * Locks a uri
- *
- * @param string $uri
- * @param \Sabre\DAV\Locks\LockInfo $lockInfo
- * @return bool
- */
- public function lock($uri, \Sabre\DAV\Locks\LockInfo $lockInfo) {
-
- // We're making the lock timeout 5 minutes
- $lockInfo->timeout = 300;
- $lockInfo->created = time();
- $lockInfo->uri = $uri;
-
- $locks = $this->getLocks($uri, false);
- $exists = false;
- foreach($locks as $lock) {
- if ($lock->token == $lockInfo->token) {
- $exists = true;
- break;
- }
- }
-
- if ($exists) {
- $sql = 'UPDATE `*PREFIX*locks`'
- .' SET `owner` = ?, `timeout` = ?, `scope` = ?, `depth` = ?, `uri` = ?, `created` = ?'
- .' WHERE `userid` = ? AND `token` = ?';
- $result = OC_DB::executeAudited( $sql, array(
- $lockInfo->owner,
- $lockInfo->timeout,
- $lockInfo->scope,
- $lockInfo->depth,
- $uri,
- $lockInfo->created,
- OC_User::getUser(),
- $lockInfo->token)
- );
- } else {
- $sql = 'INSERT INTO `*PREFIX*locks`'
- .' (`userid`,`owner`,`timeout`,`scope`,`depth`,`uri`,`created`,`token`)'
- .' VALUES (?,?,?,?,?,?,?,?)';
- $result = OC_DB::executeAudited( $sql, array(
- OC_User::getUser(),
- $lockInfo->owner,
- $lockInfo->timeout,
- $lockInfo->scope,
- $lockInfo->depth,
- $uri,
- $lockInfo->created,
- $lockInfo->token)
- );
- }
-
- return true;
-
- }
-
- /**
- * Removes a lock from a uri
- *
- * @param string $uri
- * @param \Sabre\DAV\Locks\LockInfo $lockInfo
- * @return bool
- */
- public function unlock($uri, \Sabre\DAV\Locks\LockInfo $lockInfo) {
-
- $sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND `uri` = ? AND `token` = ?';
- if (OC_Config::getValue( "dbtype") === 'oci') {
- //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
- $sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND to_char(`uri`) = ? AND `token` = ?';
- }
- $result = OC_DB::executeAudited( $sql, array(OC_User::getUser(), $uri, $lockInfo->token));
-
- return $result === 1;
-
- }
-
-}
diff --git a/lib/private/connector/sabre/maintenanceplugin.php b/lib/private/connector/sabre/maintenanceplugin.php
index 0208f3fb5a6..e9bbb6be78c 100644
--- a/lib/private/connector/sabre/maintenanceplugin.php
+++ b/lib/private/connector/sabre/maintenanceplugin.php
@@ -1,5 +1,4 @@
<?php
-
/**
* ownCloud
*
@@ -9,7 +8,9 @@
* @license AGPL3
*/
-class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
+namespace OC\Connector\Sabre;
+
+class MaintenancePlugin extends \Sabre\DAV\ServerPlugin
{
/**
@@ -33,7 +34,7 @@ class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
public function initialize(\Sabre\DAV\Server $server) {
$this->server = $server;
- $this->server->subscribeEvent('beforeMethod', array($this, 'checkMaintenanceMode'), 10);
+ $this->server->on('beforeMethod', array($this, 'checkMaintenanceMode'), 10);
}
/**
@@ -45,10 +46,10 @@ class OC_Connector_Sabre_MaintenancePlugin extends \Sabre\DAV\ServerPlugin
* @return bool
*/
public function checkMaintenanceMode() {
- if (OC_Config::getValue('maintenance', false)) {
+ if (\OC_Config::getValue('maintenance', false)) {
throw new \Sabre\DAV\Exception\ServiceUnavailable();
}
- if (OC::checkUpgrade(false)) {
+ if (\OC::checkUpgrade(false)) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('Upgrade needed');
}
diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php
index 3173ab8a30f..cdabf26a3fb 100644
--- a/lib/private/connector/sabre/node.php
+++ b/lib/private/connector/sabre/node.php
@@ -1,32 +1,41 @@
<?php
-
-use Sabre\DAV\URLUtil;
-use OC\Connector\Sabre\TagList;
-
/**
- * ownCloud
+ * @author Arthur Schiwon <blizzz@owncloud.com>
+ * @author Bart Visscher <bartv@thisnet.nl>
+ * @author Björn Schießle <schiessle@owncloud.com>
+ * @author Jakob Sack <mail@jakobsack.de>
+ * @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Klaas Freitag <freitag@owncloud.com>
+ * @author Markus Goetz <markus@woboq.com>
+ * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Robin Appelman <icewind@owncloud.com>
+ * @author Sam Tuke <mail@samtuke.com>
+ * @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @author Vincent Petry <pvince81@owncloud.com>
*
- * @author Jakob Sack
- * @copyright 2011 Jakob Sack kde@jakobsack.de
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
*
- * This library is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
*
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
- const GETETAG_PROPERTYNAME = '{DAV:}getetag';
- const LASTMODIFIED_PROPERTYNAME = '{DAV:}lastmodified';
+namespace OC\Connector\Sabre;
+
+use OC\Connector\Sabre\Exception\InvalidPath;
+
+
+abstract class Node implements \Sabre\DAV\INode {
/**
* Allow configuring the method used to generate Etags
*
@@ -82,6 +91,15 @@ abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\I
}
/**
+ * Returns the full path
+ *
+ * @return string
+ */
+ public function getPath() {
+ return $this->path;
+ }
+
+ /**
* Renames the node
* @param string $name The new name
* @throws \Sabre\DAV\Exception\BadRequest
@@ -94,23 +112,18 @@ abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\I
throw new \Sabre\DAV\Exception\Forbidden();
}
- list($parentPath,) = URLUtil::splitPath($this->path);
- list(, $newName) = URLUtil::splitPath($name);
+ list($parentPath,) = \Sabre\HTTP\URLUtil::splitPath($this->path);
+ list(, $newName) = \Sabre\HTTP\URLUtil::splitPath($name);
- if (!\OCP\Util::isValidFileName($newName)) {
- throw new \Sabre\DAV\Exception\BadRequest();
- }
+ // verify path of the target
+ $this->verifyPath();
$newPath = $parentPath . '/' . $newName;
- $oldPath = $this->path;
$this->fileView->rename($this->path, $newPath);
$this->path = $newPath;
- $query = OC_DB::prepare('UPDATE `*PREFIX*properties` SET `propertypath` = ?'
- . ' WHERE `userid` = ? AND `propertypath` = ?');
- $query->execute(array($newPath, OC_User::getUser(), $oldPath));
$this->refreshInfo();
}
@@ -141,91 +154,38 @@ abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\I
}
/**
- * Updates properties on this node,
- * @see \Sabre\DAV\IProperties::updateProperties
- * @param array $properties
- * @return boolean
+ * Returns the ETag for a file
+ *
+ * An ETag is a unique identifier representing the current version of the
+ * file. If the file changes, the ETag MUST change. The ETag is an
+ * arbitrary string, but MUST be surrounded by double-quotes.
+ *
+ * Return null if the ETag can not effectively be determined
+ *
+ * @return string
*/
- public function updateProperties($properties) {
- $existing = $this->getProperties(array());
- foreach ($properties as $propertyName => $propertyValue) {
- // If it was null, we need to delete the property
- if (is_null($propertyValue)) {
- if (array_key_exists($propertyName, $existing)) {
- $query = OC_DB::prepare('DELETE FROM `*PREFIX*properties`'
- . ' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?');
- $query->execute(array(OC_User::getUser(), $this->path, $propertyName));
- }
- } else {
- if (strcmp($propertyName, self::GETETAG_PROPERTYNAME) === 0) {
- \OC\Files\Filesystem::putFileInfo($this->path, array('etag' => $propertyValue));
- } elseif (strcmp($propertyName, self::LASTMODIFIED_PROPERTYNAME) === 0) {
- $this->touch($propertyValue);
- } else {
- if (!array_key_exists($propertyName, $existing)) {
- $query = OC_DB::prepare('INSERT INTO `*PREFIX*properties`'
- . ' (`userid`,`propertypath`,`propertyname`,`propertyvalue`) VALUES(?,?,?,?)');
- $query->execute(array(OC_User::getUser(), $this->path, $propertyName, $propertyValue));
- } else {
- $query = OC_DB::prepare('UPDATE `*PREFIX*properties` SET `propertyvalue` = ?'
- . ' WHERE `userid` = ? AND `propertypath` = ? AND `propertyname` = ?');
- $query->execute(array($propertyValue, OC_User::getUser(), $this->path, $propertyName));
- }
- }
- }
-
- }
- $this->setPropertyCache(null);
- return true;
+ public function getETag() {
+ return '"' . $this->info->getEtag() . '"';
}
/**
- * removes all properties for this node and user
+ * Sets the ETag
+ *
+ * @param string $etag
+ *
+ * @return int file id of updated file or -1 on failure
*/
- public function removeProperties() {
- $query = OC_DB::prepare('DELETE FROM `*PREFIX*properties`'
- . ' WHERE `userid` = ? AND `propertypath` = ?');
- $query->execute(array(OC_User::getUser(), $this->path));
-
- $this->setPropertyCache(null);
+ public function setETag($etag) {
+ return $this->fileView->putFileInfo($this->path, array('etag' => $etag));
}
/**
- * Returns a list of properties for this nodes.;
- * @param array $properties
- * @return array
- * @note The properties list is a list of propertynames the client
- * requested, encoded as xmlnamespace#tagName, for example:
- * http://www.example.org/namespace#author If the array is empty, all
- * properties should be returned
+ * Returns the size of the node, in bytes
+ *
+ * @return int|float
*/
- public function getProperties($properties) {
-
- if (is_null($this->property_cache)) {
- $sql = 'SELECT * FROM `*PREFIX*properties` WHERE `userid` = ? AND `propertypath` = ?';
- $result = OC_DB::executeAudited($sql, array(OC_User::getUser(), $this->path));
-
- $this->property_cache = array();
- while ($row = $result->fetchRow()) {
- $this->property_cache[$row['propertyname']] = $row['propertyvalue'];
- }
-
- $this->property_cache[self::GETETAG_PROPERTYNAME] = '"' . $this->info->getEtag() . '"';
- }
-
- // if the array was empty, we need to return everything
- if (count($properties) == 0) {
- return $this->property_cache;
- }
-
- $props = array();
- foreach ($properties as $property) {
- if (isset($this->property_cache[$property])) {
- $props[$property] = $this->property_cache[$property];
- }
- }
-
- return $props;
+ public function getSize() {
+ return $this->info->getSize();
}
/**
@@ -242,7 +202,7 @@ abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\I
*/
public function getFileId() {
if ($this->info->getId()) {
- $instanceId = OC_Util::getInstanceId();
+ $instanceId = \OC_Util::getInstanceId();
$id = sprintf('%08d', $this->info->getId());
return $id . $instanceId;
}
@@ -282,19 +242,12 @@ abstract class OC_Connector_Sabre_Node implements \Sabre\DAV\INode, \Sabre\DAV\I
return $p;
}
- /**
- * Returns the ETag for a file
- *
- * An ETag is a unique identifier representing the current version of the
- * file. If the file changes, the ETag MUST change. The ETag is an
- * arbitrary string, but MUST be surrounded by double-quotes.
- *
- * Return null if the ETag can not effectively be determined
- *
- * @return mixed
- */
- public function getETag() {
- return '"' . $this->info->getEtag() . '"';
+ protected function verifyPath() {
+ try {
+ $fileName = basename($this->info->getPath());
+ $this->fileView->verifyPath($this->path, $fileName);
+ } catch (\OCP\Files\InvalidPathException $ex) {
+ throw new InvalidPath($ex->getMessage());
+ }
}
-
}
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index 3422ed2d575..3705aa80586 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -8,13 +8,15 @@
namespace OC\Connector\Sabre;
+use OC\Connector\Sabre\Exception\InvalidPath;
use OC\Files\FileInfo;
use OC\Files\Filesystem;
use OC\Files\Mount\MoveableMount;
+use OC_Connector_Sabre_Exception_InvalidPath;
use OCP\Files\StorageInvalidException;
use OCP\Files\StorageNotAvailableException;
-class ObjectTree extends \Sabre\DAV\ObjectTree {
+class ObjectTree extends \Sabre\DAV\Tree {
/**
* @var \OC\Files\View
@@ -28,8 +30,6 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
/**
* Creates the object
- *
- * This method expects the rootObject to be passed as a parameter
*/
public function __construct() {
}
@@ -46,6 +46,35 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
}
/**
+ * If the given path is a chunked file name, converts it
+ * to the real file name. Only applies if the OC-CHUNKED header
+ * is present.
+ *
+ * @param string $path chunk file path to convert
+ *
+ * @return string path to real file
+ */
+ private function resolveChunkFile($path) {
+ if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
+ // resolve to real file name to find the proper node
+ list($dir, $name) = \Sabre\HTTP\URLUtil::splitPath($path);
+ if ($dir == '/' || $dir == '.') {
+ $dir = '';
+ }
+
+ $info = \OC_FileChunking::decodeName($name);
+ // only replace path if it was really the chunked file
+ if (isset($info['transferid'])) {
+ // getNodePath is called for multiple nodes within a chunk
+ // upload call
+ $path = $dir . '/' . $info['name'];
+ $path = ltrim($path, '/');
+ }
+ }
+ return $path;
+ }
+
+ /**
* Returns the INode object for the requested path
*
* @param string $path
@@ -86,12 +115,15 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
$info = null;
}
} else {
+ // resolve chunk file name to real name, if applicable
+ $path = $this->resolveChunkFile($path);
+
// read from cache
try {
$info = $this->fileView->getFileInfo($path);
} catch (StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage not available');
- } catch (StorageInvalidException $e){
+ } catch (StorageInvalidException $e) {
throw new \Sabre\DAV\Exception\NotFound('Storage ' . $path . ' is invalid');
}
}
@@ -101,9 +133,9 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
}
if ($info->getType() === 'dir') {
- $node = new \OC_Connector_Sabre_Directory($this->fileView, $info);
+ $node = new \OC\Connector\Sabre\Directory($this->fileView, $info);
} else {
- $node = new \OC_Connector_Sabre_File($this->fileView, $info);
+ $node = new \OC\Connector\Sabre\File($this->fileView, $info);
}
$this->cache[$path] = $node;
@@ -130,8 +162,8 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
if ($sourceNode instanceof \Sabre\DAV\ICollection and $this->nodeExists($destinationPath)) {
throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory ' . $sourceNode . ', target exists');
}
- list($sourceDir,) = \Sabre\DAV\URLUtil::splitPath($sourcePath);
- list($destinationDir,) = \Sabre\DAV\URLUtil::splitPath($destinationPath);
+ list($sourceDir,) = \Sabre\HTTP\URLUtil::splitPath($sourcePath);
+ list($destinationDir,) = \Sabre\HTTP\URLUtil::splitPath($destinationPath);
$isMovableMount = false;
$sourceMount = $this->mountManager->find($this->fileView->getAbsolutePath($sourcePath));
@@ -155,8 +187,10 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
}
$fileName = basename($destinationPath);
- if (!\OCP\Util::isValidFileName($fileName)) {
- throw new \Sabre\DAV\Exception\BadRequest();
+ try {
+ $this->fileView->verifyPath($destinationDir, $fileName);
+ } catch (\OCP\Files\InvalidPathException $ex) {
+ throw new InvalidPath($ex->getMessage());
}
$renameOkay = $this->fileView->rename($sourcePath, $destinationPath);
@@ -167,12 +201,6 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
}
- // update properties
- $query = \OC_DB::prepare('UPDATE `*PREFIX*properties` SET `propertypath` = ?'
- . ' WHERE `userid` = ? AND `propertypath` = ?');
- $query->execute(array(\OC\Files\Filesystem::normalizePath($destinationPath), \OC_User::getUser(),
- \OC\Files\Filesystem::normalizePath($sourcePath)));
-
$this->markDirty($sourceDir);
$this->markDirty($destinationDir);
@@ -194,26 +222,16 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup');
}
- try {
- if ($this->fileView->is_file($source)) {
- $this->fileView->copy($source, $destination);
- } else {
- $this->fileView->mkdir($destination);
- $dh = $this->fileView->opendir($source);
- if (is_resource($dh)) {
- while (($subNode = readdir($dh)) !== false) {
+ // this will trigger existence check
+ $this->getNodeForPath($source);
- if ($subNode == '.' || $subNode == '..') continue;
- $this->copy($source . '/' . $subNode, $destination . '/' . $subNode);
-
- }
- }
- }
+ try {
+ $this->fileView->copy($source, $destination);
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable($e->getMessage());
}
- list($destinationDir,) = \Sabre\DAV\URLUtil::splitPath($destination);
+ list($destinationDir,) = \Sabre\HTTP\URLUtil::splitPath($destination);
$this->markDirty($destinationDir);
}
}
diff --git a/lib/private/connector/sabre/principal.php b/lib/private/connector/sabre/principal.php
index 4bb28c65ddd..5db9e505709 100644
--- a/lib/private/connector/sabre/principal.php
+++ b/lib/private/connector/sabre/principal.php
@@ -13,6 +13,7 @@ namespace OC\Connector\Sabre;
use OCP\IUserManager;
use OCP\IConfig;
+use \Sabre\DAV\PropPatch;
class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface {
/** @var IConfig */
@@ -120,7 +121,7 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface {
* @throws \Sabre\DAV\Exception
*/
public function getGroupMembership($principal) {
- list($prefix, $name) = \Sabre\DAV\URLUtil::splitPath($principal);
+ list($prefix, $name) = \Sabre\HTTP\URLUtil::splitPath($principal);
$group_membership = array();
if ($prefix === 'principals') {
@@ -157,19 +158,28 @@ class Principal implements \Sabre\DAVACL\PrincipalBackend\BackendInterface {
/**
* @param string $path
- * @param array $mutations
+ * @param PropPatch $propPatch
* @return int
*/
- function updatePrincipal($path, $mutations) {
+ function updatePrincipal($path, PropPatch $propPatch) {
return 0;
}
/**
* @param string $prefixPath
* @param array $searchProperties
+ * @param string $test
* @return array
*/
- function searchPrincipals($prefixPath, array $searchProperties) {
+ function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') {
return [];
}
+
+ /**
+ * @param string $uri
+ * @return string
+ */
+ function findByUri($uri) {
+ return '';
+ }
}
diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php
index 59d0e188f66..6c0f9f3f950 100644
--- a/lib/private/connector/sabre/quotaplugin.php
+++ b/lib/private/connector/sabre/quotaplugin.php
@@ -1,5 +1,6 @@
<?php
-use Sabre\DAV\URLUtil;
+
+namespace OC\Connector\Sabre;
/**
* This plugin check user quota and deny creating files when they exceeds the quota.
@@ -8,7 +9,7 @@ use Sabre\DAV\URLUtil;
* @copyright Copyright (C) 2012 entreCables S.L. All rights reserved.
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
-class OC_Connector_Sabre_QuotaPlugin extends \Sabre\DAV\ServerPlugin {
+class QuotaPlugin extends \Sabre\DAV\ServerPlugin {
/**
* @var \OC\Files\View
@@ -44,8 +45,8 @@ class OC_Connector_Sabre_QuotaPlugin extends \Sabre\DAV\ServerPlugin {
$this->server = $server;
- $server->subscribeEvent('beforeWriteContent', array($this, 'checkQuota'), 10);
- $server->subscribeEvent('beforeCreateFile', array($this, 'checkQuota'), 10);
+ $server->on('beforeWriteContent', array($this, 'checkQuota'), 10);
+ $server->on('beforeCreateFile', array($this, 'checkQuota'), 10);
}
/**
@@ -62,11 +63,11 @@ class OC_Connector_Sabre_QuotaPlugin extends \Sabre\DAV\ServerPlugin {
if (substr($uri, 0, 1) !== '/') {
$uri = '/' . $uri;
}
- list($parentUri, $newName) = URLUtil::splitPath($uri);
+ list($parentUri, $newName) = \Sabre\HTTP\URLUtil::splitPath($uri);
$req = $this->server->httpRequest;
if ($req->getHeader('OC-Chunked')) {
- $info = OC_FileChunking::decodeName($newName);
- $chunkHandler = new OC_FileChunking($info);
+ $info = \OC_FileChunking::decodeName($newName);
+ $chunkHandler = new \OC_FileChunking($info);
// subtract the already uploaded size to see whether
// there is still enough space for the remaining chunks
$length -= $chunkHandler->getCurrentSize();
diff --git a/lib/private/connector/sabre/server.php b/lib/private/connector/sabre/server.php
index a836af2a0b8..b817252f3c5 100644
--- a/lib/private/connector/sabre/server.php
+++ b/lib/private/connector/sabre/server.php
@@ -9,34 +9,16 @@
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
*/
+namespace OC\Connector\Sabre;
+
/**
- * Class OC_Connector_Sabre_Server
- *
- * This class reimplements some methods from @see \Sabre\DAV\Server.
- *
- * Basically we add handling of depth: infinity.
- *
- * The right way to handle this would have been to submit a patch to the upstream project
- * and grab the corresponding version one merged.
- *
- * Due to time constrains and the limitations where we don't want to upgrade 3rdparty code in
- * this stage of the release cycle we did choose this approach.
+ * Class \OC\Connector\Sabre\Server
*
- * For ownCloud 7 we will upgrade SabreDAV and submit the patch - if needed.
+ * This class overrides some methods from @see \Sabre\DAV\Server.
*
* @see \Sabre\DAV\Server
*/
-class OC_Connector_Sabre_Server extends Sabre\DAV\Server {
-
- /**
- * @var string
- */
- private $overLoadedUri = null;
-
- /**
- * @var boolean
- */
- private $ignoreRangeHeader = false;
+class Server extends \Sabre\DAV\Server {
/**
* @see \Sabre\DAV\Server
@@ -44,261 +26,6 @@ class OC_Connector_Sabre_Server extends Sabre\DAV\Server {
public function __construct($treeOrNode = null) {
parent::__construct($treeOrNode);
self::$exposeVersion = false;
- }
-
- public function getRequestUri() {
-
- if (!is_null($this->overLoadedUri)) {
- return $this->overLoadedUri;
- }
-
- return parent::getRequestUri();
- }
-
- public function checkPreconditions($handleAsGET = false) {
- // chunked upload handling
- if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
- $filePath = parent::getRequestUri();
- list($path, $name) = \Sabre\DAV\URLUtil::splitPath($filePath);
- $info = OC_FileChunking::decodeName($name);
- if (!empty($info)) {
- $filePath = $path . '/' . $info['name'];
- $this->overLoadedUri = $filePath;
- }
- }
-
- $result = parent::checkPreconditions($handleAsGET);
- $this->overLoadedUri = null;
- return $result;
- }
-
- public function getHTTPRange() {
- if ($this->ignoreRangeHeader) {
- return null;
- }
- return parent::getHTTPRange();
- }
-
- protected function httpGet($uri) {
- $range = $this->getHTTPRange();
-
- if (OC_App::isEnabled('files_encryption') && $range) {
- // encryption does not support range requests
- $this->ignoreRangeHeader = true;
- }
- return parent::httpGet($uri);
- }
-
- /**
- * @see \Sabre\DAV\Server
- */
- protected function httpPropfind($uri) {
-
- // $xml = new \Sabre\DAV\XMLReader(file_get_contents('php://input'));
- $requestedProperties = $this->parsePropFindRequest($this->httpRequest->getBody(true));
-
- $depth = $this->getHTTPDepth(1);
- // The only two options for the depth of a propfind is 0 or 1
- // if ($depth!=0) $depth = 1;
-
- $newProperties = $this->getPropertiesForPath($uri,$requestedProperties,$depth);
-
- // This is a multi-status response
- $this->httpResponse->sendStatus(207);
- $this->httpResponse->setHeader('Content-Type','application/xml; charset=utf-8');
- $this->httpResponse->setHeader('Vary','Brief,Prefer');
-
- // Normally this header is only needed for OPTIONS responses, however..
- // iCal seems to also depend on these being set for PROPFIND. Since
- // this is not harmful, we'll add it.
- $features = array('1','3', 'extended-mkcol');
- foreach($this->plugins as $plugin) {
- $features = array_merge($features,$plugin->getFeatures());
- }
-
- $this->httpResponse->setHeader('DAV',implode(', ',$features));
-
- $prefer = $this->getHTTPPrefer();
- $minimal = $prefer['return-minimal'];
-
- $data = $this->generateMultiStatus($newProperties, $minimal);
- $this->httpResponse->sendBody($data);
-
- }
-
- /**
- * Small helper to support PROPFIND with DEPTH_INFINITY.
- * @param string $path
- */
- private function addPathNodesRecursively(&$nodes, $path) {
- foreach($this->tree->getChildren($path) as $childNode) {
- $nodes[$path . '/' . $childNode->getName()] = $childNode;
- if ($childNode instanceof \Sabre\DAV\ICollection)
- $this->addPathNodesRecursively($nodes, $path . '/' . $childNode->getName());
- }
- }
-
- public function getPropertiesForPath($path, $propertyNames = array(), $depth = 0) {
-
- // if ($depth!=0) $depth = 1;
-
- $path = rtrim($path,'/');
-
- // This event allows people to intercept these requests early on in the
- // process.
- //
- // We're not doing anything with the result, but this can be helpful to
- // pre-fetch certain expensive live properties.
- $this->broadCastEvent('beforeGetPropertiesForPath', array($path, $propertyNames, $depth));
-
- $returnPropertyList = array();
-
- $parentNode = $this->tree->getNodeForPath($path);
- $nodes = array(
- $path => $parentNode
- );
- if ($depth==1 && $parentNode instanceof \Sabre\DAV\ICollection) {
- foreach($this->tree->getChildren($path) as $childNode)
- $nodes[$path . '/' . $childNode->getName()] = $childNode;
- } else if ($depth == self::DEPTH_INFINITY && $parentNode instanceof \Sabre\DAV\ICollection) {
- $this->addPathNodesRecursively($nodes, $path);
- }
-
- // If the propertyNames array is empty, it means all properties are requested.
- // We shouldn't actually return everything we know though, and only return a
- // sensible list.
- $allProperties = count($propertyNames)==0;
-
- foreach($nodes as $myPath=>$node) {
-
- $currentPropertyNames = $propertyNames;
-
- $newProperties = array(
- '200' => array(),
- '404' => array(),
- );
-
- if ($allProperties) {
- // Default list of propertyNames, when all properties were requested.
- $currentPropertyNames = array(
- '{DAV:}getlastmodified',
- '{DAV:}getcontentlength',
- '{DAV:}resourcetype',
- '{DAV:}quota-used-bytes',
- '{DAV:}quota-available-bytes',
- '{DAV:}getetag',
- '{DAV:}getcontenttype',
- );
- }
-
- // If the resourceType was not part of the list, we manually add it
- // and mark it for removal. We need to know the resourcetype in order
- // to make certain decisions about the entry.
- // WebDAV dictates we should add a / and the end of href's for collections
- $removeRT = false;
- if (!in_array('{DAV:}resourcetype',$currentPropertyNames)) {
- $currentPropertyNames[] = '{DAV:}resourcetype';
- $removeRT = true;
- }
-
- $result = $this->broadcastEvent('beforeGetProperties',array($myPath, $node, &$currentPropertyNames, &$newProperties));
- // If this method explicitly returned false, we must ignore this
- // node as it is inaccessible.
- if ($result===false) continue;
-
- if (count($currentPropertyNames) > 0) {
-
- if ($node instanceof \Sabre\DAV\IProperties) {
- $nodeProperties = $node->getProperties($currentPropertyNames);
-
- // The getProperties method may give us too much,
- // properties, in case the implementor was lazy.
- //
- // So as we loop through this list, we will only take the
- // properties that were actually requested and discard the
- // rest.
- foreach($currentPropertyNames as $k=>$currentPropertyName) {
- if (isset($nodeProperties[$currentPropertyName])) {
- unset($currentPropertyNames[$k]);
- $newProperties[200][$currentPropertyName] = $nodeProperties[$currentPropertyName];
- }
- }
-
- }
-
- }
-
- foreach($currentPropertyNames as $prop) {
-
- if (isset($newProperties[200][$prop])) continue;
-
- switch($prop) {
- case '{DAV:}getlastmodified' : if ($node->getLastModified()) $newProperties[200][$prop] = new \Sabre\DAV\Property\GetLastModified($node->getLastModified()); break;
- case '{DAV:}getcontentlength' :
- if ($node instanceof \Sabre\DAV\IFile) {
- $size = $node->getSize();
- if (!is_null($size)) {
- $newProperties[200][$prop] = 0 + $size;
- }
- }
- break;
- case '{DAV:}quota-used-bytes' :
- if ($node instanceof \Sabre\DAV\IQuota) {
- $quotaInfo = $node->getQuotaInfo();
- $newProperties[200][$prop] = $quotaInfo[0];
- }
- break;
- case '{DAV:}quota-available-bytes' :
- if ($node instanceof \Sabre\DAV\IQuota) {
- $quotaInfo = $node->getQuotaInfo();
- $newProperties[200][$prop] = $quotaInfo[1];
- }
- break;
- case '{DAV:}getetag' : if ($node instanceof \Sabre\DAV\IFile && $etag = $node->getETag()) $newProperties[200][$prop] = $etag; break;
- case '{DAV:}getcontenttype' : if ($node instanceof \Sabre\DAV\IFile && $ct = $node->getContentType()) $newProperties[200][$prop] = $ct; break;
- case '{DAV:}supported-report-set' :
- $reports = array();
- foreach($this->plugins as $plugin) {
- $reports = array_merge($reports, $plugin->getSupportedReportSet($myPath));
- }
- $newProperties[200][$prop] = new \Sabre\DAV\Property\SupportedReportSet($reports);
- break;
- case '{DAV:}resourcetype' :
- $newProperties[200]['{DAV:}resourcetype'] = new \Sabre\DAV\Property\ResourceType();
- foreach($this->resourceTypeMapping as $className => $resourceType) {
- if ($node instanceof $className) $newProperties[200]['{DAV:}resourcetype']->add($resourceType);
- }
- break;
-
- }
-
- // If we were unable to find the property, we will list it as 404.
- if (!$allProperties && !isset($newProperties[200][$prop])) $newProperties[404][$prop] = null;
-
- }
-
- $this->broadcastEvent('afterGetProperties',array(trim($myPath,'/'),&$newProperties, $node));
-
- $newProperties['href'] = trim($myPath,'/');
-
- // Its is a WebDAV recommendation to add a trailing slash to collectionnames.
- // Apple's iCal also requires a trailing slash for principals (rfc 3744), though this is non-standard.
- if ($myPath!='' && isset($newProperties[200]['{DAV:}resourcetype'])) {
- $rt = $newProperties[200]['{DAV:}resourcetype'];
- if ($rt->is('{DAV:}collection') || $rt->is('{DAV:}principal')) {
- $newProperties['href'] .='/';
- }
- }
-
- // If the resourcetype property was manually added to the requested property list,
- // we will remove it again.
- if ($removeRT) unset($newProperties[200]['{DAV:}resourcetype']);
-
- $returnPropertyList[] = $newProperties;
-
- }
-
- return $returnPropertyList;
-
+ $this->enablePropfindDepthInfinity = true;
}
}
diff --git a/lib/private/connector/sabre/taglist.php b/lib/private/connector/sabre/taglist.php
index 56cab393fea..807c3262e85 100644
--- a/lib/private/connector/sabre/taglist.php
+++ b/lib/private/connector/sabre/taglist.php
@@ -85,9 +85,10 @@ class TagList extends DAV\Property {
* It will only decode tag values.
*
* @param \DOMElement $dom
+ * @param array $propertyMap
* @return \OC\Connector\Sabre\TagList
*/
- static function unserialize(\DOMElement $dom) {
+ static function unserialize(\DOMElement $dom, array $propertyMap) {
$tags = array();
foreach($dom->childNodes as $child) {
diff --git a/lib/private/connector/sabre/tagsplugin.php b/lib/private/connector/sabre/tagsplugin.php
index dd0b5172bd6..cc8c6e12604 100644
--- a/lib/private/connector/sabre/tagsplugin.php
+++ b/lib/private/connector/sabre/tagsplugin.php
@@ -23,6 +23,9 @@ namespace OC\Connector\Sabre;
*
*/
+use \Sabre\DAV\PropFind;
+use \Sabre\DAV\PropPatch;
+
class TagsPlugin extends \Sabre\DAV\ServerPlugin
{
@@ -58,13 +61,19 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
private $cachedTags;
/**
+ * @var \Sabre\DAV\Tree
+ */
+ private $tree;
+
+ /**
+ * @param \Sabre\DAV\Tree $tree tree
* @param \OCP\ITagManager $tagManager tag manager
*/
- public function __construct(\Sabre\DAV\ObjectTree $objectTree, \OCP\ITagManager $tagManager) {
- $this->objectTree = $objectTree;
+ public function __construct(\Sabre\DAV\Tree $tree, \OCP\ITagManager $tagManager) {
+ $this->tree = $tree;
$this->tagManager = $tagManager;
$this->tagger = null;
- $this->cachedTags = null;
+ $this->cachedTags = array();
}
/**
@@ -84,25 +93,8 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
$server->propertyMap[self::TAGS_PROPERTYNAME] = 'OC\\Connector\\Sabre\\TagList';
$this->server = $server;
- $this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
- $this->server->subscribeEvent('beforeGetPropertiesForPath', array($this, 'beforeGetPropertiesForPath'));
- $this->server->subscribeEvent('updateProperties', array($this, 'updateProperties'));
- }
-
- /**
- * Searches and removes a value from the given array
- *
- * @param array $requestedProps
- * @param string $propName to remove
- * @return boolean true if the property was present, false otherwise
- */
- private function findAndRemoveProperty(&$requestedProps, $propName) {
- $index = array_search($propName, $requestedProps);
- if ($index !== false) {
- unset($requestedProps[$index]);
- return true;
- }
- return false;
+ $this->server->on('propFind', array($this, 'handleGetProperties'));
+ $this->server->on('propPatch', array($this, 'handleUpdateProperties'));
}
/**
@@ -148,7 +140,10 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
return $this->cachedTags[$fileId];
} else {
$tags = $this->getTagger()->getTagsForObjects(array($fileId));
- if ($tags) {
+ if ($tags !== false) {
+ if (empty($tags)) {
+ return array();
+ }
return current($tags);
}
}
@@ -182,108 +177,98 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin
}
/**
- * Pre-fetch tags info
+ * Adds tags and favorites properties to the response,
+ * if requested.
*
- * @param string $path
- * @param array $requestedProperties
- * @param integer $depth
+ * @param PropFind $propFind
+ * @param \Sabre\DAV\INode $node
* @return void
*/
- public function beforeGetPropertiesForPath(
- $path,
- array $requestedProperties,
- $depth
+ public function handleGetProperties(
+ PropFind $propFind,
+ \Sabre\DAV\INode $node
) {
- $node = $this->objectTree->getNodeForPath($path);
- if (!($node instanceof \OC_Connector_Sabre_Directory)) {
+ if (!($node instanceof \OC\Connector\Sabre\Node)) {
return;
}
- if ($this->findAndRemoveProperty($requestedProperties, self::TAGS_PROPERTYNAME)
- || $this->findAndRemoveProperty($requestedProperties, self::FAVORITE_PROPERTYNAME)
- ) {
- $fileIds = array();
+ // need prefetch ?
+ if ($node instanceof \OC\Connector\Sabre\Directory
+ && $propFind->getDepth() !== 0
+ && (!is_null($propFind->getStatus(self::TAGS_PROPERTYNAME))
+ || !is_null($propFind->getStatus(self::FAVORITE_PROPERTYNAME))
+ )) {
// note: pre-fetching only supported for depth <= 1
$folderContent = $node->getChildren();
- // TODO: refactor somehow with the similar array that is created
- // in getChildren()
+ $fileIds[] = (int)$node->getId();
foreach ($folderContent as $info) {
- $fileIds[] = $info->getId();
+ $fileIds[] = (int)$info->getId();
}
$tags = $this->getTagger()->getTagsForObjects($fileIds);
- if ($tags) {
- $this->cachedTags = $tags;
+ if ($tags === false) {
+ // the tags API returns false on error...
+ $tags = array();
}
- }
- }
- /**
- * Adds tags and favorites properties to the response,
- * if requested.
- *
- * @param string $path
- * @param \Sabre\DAV\INode $node
- * @param array $requestedProperties
- * @param array $returnedProperties
- * @return void
- */
- public function beforeGetProperties(
- $path,
- \Sabre\DAV\INode $node,
- array &$requestedProperties,
- array &$returnedProperties
- ) {
- if (!($node instanceof \OC_Connector_Sabre_Node)) {
- return;
+ $this->cachedTags = $this->cachedTags + $tags;
+ $emptyFileIds = array_diff($fileIds, array_keys($tags));
+ // also cache the ones that were not found
+ foreach ($emptyFileIds as $fileId) {
+ $this->cachedTags[$fileId] = [];
+ }
}
$tags = null;
$isFav = null;
- if ($this->findAndRemoveProperty($requestedProperties, self::TAGS_PROPERTYNAME)) {
+
+ $propFind->handle(self::TAGS_PROPERTYNAME, function() use ($tags, &$isFav, $node) {
list($tags, $isFav) = $this->getTagsAndFav($node->getId());
- $returnedProperties[200][self::TAGS_PROPERTYNAME] = new TagList($tags);
- }
- if ($this->findAndRemoveProperty($requestedProperties, self::FAVORITE_PROPERTYNAME)) {
- if (is_null($tags)) {
- list($tags, $isFav) = $this->getTagsAndFav($node->getId());
+ return new TagList($tags);
+ });
+
+ $propFind->handle(self::FAVORITE_PROPERTYNAME, function() use ($isFav, $node) {
+ if (is_null($isFav)) {
+ list(, $isFav) = $this->getTagsAndFav($node->getId());
}
- $returnedProperties[200][self::FAVORITE_PROPERTYNAME] = $isFav;
- }
+ return $isFav;
+ });
}
/**
* Updates tags and favorites properties, if applicable.
*
* @param string $path
- * @param \Sabre\DAV\INode $node
- * @param array $requestedProperties
- * @param array $returnedProperties
- * @return bool success status
+ * @param PropPatch $propPatch
+ *
+ * @return void
*/
- public function updateProperties(array &$properties, array &$result, \Sabre\DAV\INode $node) {
- if (!($node instanceof \OC_Connector_Sabre_Node)) {
- return;
- }
+ public function handleUpdateProperties($path, PropPatch $propPatch) {
+ $propPatch->handle(self::TAGS_PROPERTYNAME, function($tagList) use ($path) {
+ $node = $this->tree->getNodeForPath($path);
+ if (is_null($node)) {
+ return 404;
+ }
+ $this->updateTags($node->getId(), $tagList->getTags());
+ return true;
+ });
- $fileId = $node->getId();
- if (isset($properties[self::TAGS_PROPERTYNAME])) {
- $tagsProp = $properties[self::TAGS_PROPERTYNAME];
- unset($properties[self::TAGS_PROPERTYNAME]);
- $this->updateTags($fileId, $tagsProp->getTags());
- $result[200][self::TAGS_PROPERTYNAME] = new TagList($tagsProp->getTags());
- }
- if (isset($properties[self::FAVORITE_PROPERTYNAME])) {
- $favState = $properties[self::FAVORITE_PROPERTYNAME];
- unset($properties[self::FAVORITE_PROPERTYNAME]);
+ $propPatch->handle(self::FAVORITE_PROPERTYNAME, function($favState) use ($path) {
+ $node = $this->tree->getNodeForPath($path);
+ if (is_null($node)) {
+ return 404;
+ }
if ((int)$favState === 1 || $favState === 'true') {
- $favState = true;
- $this->getTagger()->tagAs($fileId, self::TAG_FAVORITE);
+ $this->getTagger()->tagAs($node->getId(), self::TAG_FAVORITE);
} else {
- $favState = false;
- $this->getTagger()->unTag($fileId, self::TAG_FAVORITE);
+ $this->getTagger()->unTag($node->getId(), self::TAG_FAVORITE);
}
- $result[200][self::FAVORITE_PROPERTYNAME] = $favState;
- }
- return true;
+
+ if (is_null($favState)) {
+ // confirm deletion
+ return 204;
+ }
+
+ return 200;
+ });
}
}
diff --git a/lib/private/datetimezone.php b/lib/private/datetimezone.php
index e4a0af4fc69..727ce321dba 100644
--- a/lib/private/datetimezone.php
+++ b/lib/private/datetimezone.php
@@ -44,19 +44,66 @@ class DateTimeZone implements IDateTimeZone {
$timeZone = $this->config->getUserValue($this->session->get('user_id'), 'core', 'timezone', null);
if ($timeZone === null) {
if ($this->session->exists('timezone')) {
- $offsetHours = $this->session->get('timezone');
- // Note: the timeZone name is the inverse to the offset,
- // so a positive offset means negative timeZone
- // and the other way around.
- if ($offsetHours > 0) {
- return new \DateTimeZone('Etc/GMT-' . $offsetHours);
- } else {
- return new \DateTimeZone('Etc/GMT+' . abs($offsetHours));
- }
+ return $this->guessTimeZoneFromOffset($this->session->get('timezone'));
+ }
+ $timeZone = $this->getDefaultTimeZone();
+ }
+
+ try {
+ return new \DateTimeZone($timeZone);
+ } catch (\Exception $e) {
+ \OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", \OCP\Util::DEBUG);
+ return new \DateTimeZone($this->getDefaultTimeZone());
+ }
+ }
+
+ /**
+ * Guess the DateTimeZone for a given offset
+ *
+ * We first try to find a Etc/GMT* timezone, if that does not exist,
+ * we try to find it manually, before falling back to UTC.
+ *
+ * @param mixed $offset
+ * @return \DateTimeZone
+ */
+ protected function guessTimeZoneFromOffset($offset) {
+ try {
+ // Note: the timeZone name is the inverse to the offset,
+ // so a positive offset means negative timeZone
+ // and the other way around.
+ if ($offset > 0) {
+ $timeZone = 'Etc/GMT-' . $offset;
} else {
- return new \DateTimeZone('UTC');
+ $timeZone = 'Etc/GMT+' . abs($offset);
}
+
+ return new \DateTimeZone($timeZone);
+ } catch (\Exception $e) {
+ // If the offset has no Etc/GMT* timezone,
+ // we try to guess one timezone that has the same offset
+ foreach (\DateTimeZone::listIdentifiers() as $timeZone) {
+ $dtz = new \DateTimeZone($timeZone);
+ $dtOffset = $dtz->getOffset(new \DateTime());
+ if ($dtOffset == 3600 * $offset) {
+ return $dtz;
+ }
+ }
+
+ // No timezone found, fallback to UTC
+ \OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", \OCP\Util::DEBUG);
+ return new \DateTimeZone($this->getDefaultTimeZone());
}
- return new \DateTimeZone($timeZone);
+ }
+
+ /**
+ * Get the default timezone of the server
+ *
+ * Falls back to UTC if it is not yet set.
+ *
+ * @return string
+ */
+ protected function getDefaultTimeZone() {
+ $serverTimeZone = date_default_timezone_get();
+ return $serverTimeZone ?: 'UTC';
}
}
diff --git a/lib/private/db/adaptersqlite.php b/lib/private/db/adaptersqlite.php
index c5dfa85aaac..df4a804feb1 100644
--- a/lib/private/db/adaptersqlite.php
+++ b/lib/private/db/adaptersqlite.php
@@ -19,11 +19,13 @@ class AdapterSqlite extends Adapter {
}
public function insertIfNotExist($table, $input) {
- // NOTE: For SQLite we have to use this clumsy approach
- // otherwise all fieldnames used must have a unique key.
- $query = 'SELECT COUNT(*) FROM `' . $table . '` WHERE ';
- $inserts = array();
- foreach ($input as $key => $value) {
+ $fieldList = '`' . implode('`,`', array_keys($input)) . '`';
+ $query = "INSERT INTO `$table` ($fieldList) SELECT "
+ . str_repeat('?,', count($input)-1).'? '
+ . " WHERE NOT EXISTS (SELECT 1 FROM `$table` WHERE ";
+
+ $inserts = array_values($input);
+ foreach($input as $key => $value) {
$query .= '`' . $key . '`';
if (is_null($value)) {
$query .= ' IS NULL AND ';
@@ -33,34 +35,10 @@ class AdapterSqlite extends Adapter {
}
}
$query = substr($query, 0, strlen($query) - 5);
+ $query .= ')';
try {
- $stmt = $this->conn->prepare($query);
- $result = $stmt->execute($inserts);
- } catch(\Doctrine\DBAL\DBALException $e) {
- $entry = 'DB Error: "'.$e->getMessage() . '"<br />';
- $entry .= 'Offending command was: ' . $query . '<br />';
- \OC_Log::write('core', $entry, \OC_Log::FATAL);
- $l = \OC::$server->getL10N('lib');
- throw new \OC\HintException(
- $l->t('Database Error'),
- $l->t('Please contact your system administrator.'),
- 0,
- $e
- );
- }
-
- if ($stmt->fetchColumn() === '0') {
- $query = 'INSERT INTO `' . $table . '` (`'
- . implode('`,`', array_keys($input)) . '`) VALUES('
- . str_repeat('?,', count($input)-1).'? ' . ')';
- } else {
- return 0; //no rows updated
- }
-
- try {
- $statement = $this->conn->prepare($query);
- $result = $statement->execute(array_values($input));
+ return $this->conn->executeUpdate($query, $inserts);
} catch(\Doctrine\DBAL\DBALException $e) {
$entry = 'DB Error: "'.$e->getMessage() . '"<br />';
$entry .= 'Offending command was: ' . $query.'<br />';
@@ -73,7 +51,5 @@ class AdapterSqlite extends Adapter {
$e
);
}
-
- return $result;
}
}
diff --git a/lib/private/db/connection.php b/lib/private/db/connection.php
index 53935c1e1ed..6ba29fc2ccf 100644
--- a/lib/private/db/connection.php
+++ b/lib/private/db/connection.php
@@ -79,8 +79,6 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
if (!is_null($limit)) {
$platform = $this->getDatabasePlatform();
$statement = $platform->modifyLimitQuery($statement, $limit, $offset);
- } else {
- $origStatement = $statement;
}
$statement = $this->replaceTablePrefix($statement);
$statement = $this->adapter->fixupStatement($statement);
@@ -92,17 +90,19 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
}
/**
- * Executes an, optionally parameterized, SQL query.
+ * Executes an, optionally parametrized, SQL query.
*
- * If the query is parameterized, a prepared statement is used.
+ * If the query is parametrized, a prepared statement is used.
* If an SQLLogger is configured, the execution is logged.
*
- * @param string $query The SQL query to execute.
- * @param string[] $params The parameters to bind to the query, if any.
- * @param array $types The types the previous parameters are in.
- * @param QueryCacheProfile $qcp
+ * @param string $query The SQL query to execute.
+ * @param array $params The parameters to bind to the query, if any.
+ * @param array $types The types the previous parameters are in.
+ * @param \Doctrine\DBAL\Cache\QueryCacheProfile|null $qcp The query cache profile, optional.
+ *
* @return \Doctrine\DBAL\Driver\Statement The executed statement.
- * @internal PERF: Directly prepares a driver statement, not a wrapper.
+ *
+ * @throws \Doctrine\DBAL\DBALException
*/
public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
{
@@ -117,11 +117,13 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
*
* This method supports PDO binding types as well as DBAL mapping types.
*
- * @param string $query The SQL query.
- * @param array $params The query parameters.
- * @param array $types The parameter types.
+ * @param string $query The SQL query.
+ * @param array $params The query parameters.
+ * @param array $types The parameter types.
+ *
* @return integer The number of affected rows.
- * @internal PERF: Directly prepares a driver statement, not a wrapper.
+ *
+ * @throws \Doctrine\DBAL\DBALException
*/
public function executeUpdate($query, array $params = array(), array $types = array())
{
diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php
index 7dd4168fb6e..23104b1bc2d 100644
--- a/lib/private/db/mdb2schemareader.php
+++ b/lib/private/db/mdb2schemareader.php
@@ -293,6 +293,9 @@ class MDB2SchemaReader {
}
if (!empty($fields)) {
if (isset($primary) && $primary) {
+ if ($table->hasPrimaryKey()) {
+ return;
+ }
$table->setPrimaryKey($fields, $name);
} else {
if (isset($unique) && $unique) {
diff --git a/lib/private/db/migrator.php b/lib/private/db/migrator.php
index fcf5aae0258..f55b5078c0e 100644
--- a/lib/private/db/migrator.php
+++ b/lib/private/db/migrator.php
@@ -100,7 +100,7 @@ class Migrator {
* @return string
*/
protected function generateTemporaryTableName($name) {
- return 'oc_' . $name . '_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
+ return $this->config->getSystemValue('dbtableprefix', 'oc_') . $name . '_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
}
/**
@@ -151,7 +151,7 @@ class Migrator {
$indexName = $index->getName();
} else {
// avoid conflicts in index names
- $indexName = 'oc_' . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
+ $indexName = $this->config->getSystemValue('dbtableprefix', 'oc_') . $this->random->generate(13, ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_DIGITS);
}
$newIndexes[] = new Index($indexName, $index->getColumns(), $index->isUnique(), $index->isPrimary());
}
diff --git a/lib/private/db/sqlitemigrator.php b/lib/private/db/sqlitemigrator.php
index 42b65634645..739bb242810 100644
--- a/lib/private/db/sqlitemigrator.php
+++ b/lib/private/db/sqlitemigrator.php
@@ -58,6 +58,7 @@ class SQLiteMigrator extends Migrator {
$platform = $connection->getDatabasePlatform();
$platform->registerDoctrineTypeMapping('tinyint unsigned', 'integer');
$platform->registerDoctrineTypeMapping('smallint unsigned', 'integer');
+ $platform->registerDoctrineTypeMapping('varchar ', 'string');
return parent::getDiff($targetSchema, $connection);
}
diff --git a/lib/private/db/statementwrapper.php b/lib/private/db/statementwrapper.php
index a85c0167e0b..c74a74e4ae2 100644
--- a/lib/private/db/statementwrapper.php
+++ b/lib/private/db/statementwrapper.php
@@ -51,15 +51,6 @@ class OC_DB_StatementWrapper {
}
$this->lastArguments = $input;
if (count($input) > 0) {
-
- if (!isset($type)) {
- $type = OC_Config::getValue( "dbtype", "sqlite" );
- }
-
- if ($type == 'mssql') {
- $input = $this->tryFixSubstringLastArgumentDataForMSSQL($input);
- }
-
$result = $this->statement->execute($input);
} else {
$result = $this->statement->execute();
@@ -69,105 +60,13 @@ class OC_DB_StatementWrapper {
return false;
}
if ($this->isManipulation) {
- return $this->statement->rowCount();
+ $count = $this->statement->rowCount();
+ return $count;
} else {
return $this;
}
}
- private function tryFixSubstringLastArgumentDataForMSSQL($input) {
- $query = $this->statement->getWrappedStatement()->queryString;
- $pos = stripos ($query, 'SUBSTRING');
-
- if ( $pos === false) {
- return $input;
- }
-
- try {
- $newQuery = '';
-
- $cArg = 0;
-
- $inSubstring = false;
- $queryLength = strlen($query);
-
- // Create new query
- for ($i = 0; $i < $queryLength; $i++) {
- if ($inSubstring == false) {
- // Defines when we should start inserting values
- if (substr ($query, $i, 9) == 'SUBSTRING') {
- $inSubstring = true;
- }
- } else {
- // Defines when we should stop inserting values
- if (substr ($query, $i, 1) == ')') {
- $inSubstring = false;
- }
- }
-
- if (substr ($query, $i, 1) == '?') {
- // We found a question mark
- if ($inSubstring) {
- $newQuery .= $input[$cArg];
-
- //
- // Remove from input array
- //
- array_splice ($input, $cArg, 1);
- } else {
- $newQuery .= substr ($query, $i, 1);
- $cArg++;
- }
- } else {
- $newQuery .= substr ($query, $i, 1);
- }
- }
-
- // The global data we need
- $name = OC_Config::getValue( "dbname", "owncloud" );
- $host = OC_Config::getValue( "dbhost", "" );
- $user = OC_Config::getValue( "dbuser", "" );
- $pass = OC_Config::getValue( "dbpassword", "" );
- if (strpos($host, ':')) {
- list($host, $port) = explode(':', $host, 2);
- } else {
- $port = false;
- }
- $opts = array();
-
- if ($port) {
- $dsn = 'sqlsrv:Server='.$host.','.$port.';Database='.$name;
- } else {
- $dsn = 'sqlsrv:Server='.$host.';Database='.$name;
- }
-
- $PDO = new PDO($dsn, $user, $pass, $opts);
- $PDO->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
- $PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-
- $this->statement = $PDO->prepare($newQuery);
-
- $this->lastArguments = $input;
-
- return $input;
- } catch (PDOException $e){
- $entry = 'PDO DB Error: "'.$e->getMessage().'"<br />';
- $entry .= 'Offending command was: '.$this->statement->queryString .'<br />';
- $entry .= 'Input parameters: ' .print_r($input, true).'<br />';
- $entry .= 'Stack trace: ' .$e->getTraceAsString().'<br />';
- OC_Log::write('core', $entry, OC_Log::FATAL);
- OC_User::setUserId(null);
-
- $l = \OC::$server->getL10N('lib');
- throw new \OC\HintException(
- $l->t('Database Error'),
- $l->t('Please contact your system administrator.'),
- 0,
- $e
- );
- }
- }
-
/**
* provide an alias for fetch
*
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index c16ebdbe24c..bb245092938 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -1,9 +1,5 @@
<?php
-if (file_exists(OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php')) {
- require_once 'themes/' . OC_Util::getTheme() . '/defaults.php';
-}
-
/**
* Default strings and values which differ between the enterprise and the
* community edition. Use the get methods to always get the right strings.
@@ -39,14 +35,21 @@ class OC_Defaults {
$this->defaultiOSClientUrl = 'https://itunes.apple.com/us/app/owncloud/id543672169?mt=8';
$this->defaultiTunesAppId = '543672169';
$this->defaultAndroidClientUrl = 'https://play.google.com/store/apps/details?id=com.owncloud.android';
- $this->defaultDocBaseUrl = 'http://doc.owncloud.org';
+ $this->defaultDocBaseUrl = 'https://doc.owncloud.org';
$this->defaultDocVersion = $version[0] . '.0'; // used to generate doc links
$this->defaultSlogan = $this->l->t('web services under your control');
$this->defaultLogoClaim = '';
$this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */
- if (class_exists('OC_Theme')) {
- $this->theme = new OC_Theme();
+ $themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php';
+ if (file_exists($themePath)) {
+ // prevent defaults.php from printing output
+ ob_start();
+ require_once $themePath;
+ ob_end_clean();
+ if (class_exists('OC_Theme')) {
+ $this->theme = new OC_Theme();
+ }
}
}
@@ -212,7 +215,8 @@ class OC_Defaults {
if ($this->themeExist('getShortFooter')) {
$footer = $this->theme->getShortFooter();
} else {
- $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank">' .$this->getEntity() . '</a>'.
+ $footer = '<a href="'. $this->getBaseUrl() . '" target="_blank"' .
+ ' rel="noreferrer">' .$this->getEntity() . '</a>'.
' – ' . $this->getSlogan();
}
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index 5438bdad5cb..62c32ce6593 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -74,9 +74,11 @@ class Cache {
if (!isset(self::$mimetypeIds[$mime])) {
try {
- $result = \OC_DB::executeAudited('INSERT INTO `*PREFIX*mimetypes`(`mimetype`) VALUES(?)', array($mime));
- self::$mimetypeIds[$mime] = \OC_DB::insertid('*PREFIX*mimetypes');
- self::$mimetypes[self::$mimetypeIds[$mime]] = $mime;
+ $connection = \OC_DB::getConnection();
+ $connection->insertIfNotExist('*PREFIX*mimetypes', [
+ 'mimetype' => $mime,
+ ]);
+ $this->loadMimetypes();
} catch (\Doctrine\DBAL\DBALException $e) {
\OC_Log::write('core', 'Exception during mimetype insertion: ' . $e->getmessage(), \OC_Log::DEBUG);
return -1;
@@ -95,6 +97,8 @@ class Cache {
}
public function loadMimetypes() {
+ self::$mimetypeIds = self::$mimetypes = array();
+
$result = \OC_DB::executeAudited('SELECT `id`, `mimetype` FROM `*PREFIX*mimetypes`', array());
if ($result) {
while ($row = $result->fetchRow()) {
@@ -193,6 +197,9 @@ class Cache {
$file['size'] = $file['unencrypted_size'];
}
$file['permissions'] = (int)$file['permissions'];
+ $file['mtime'] = (int)$file['mtime'];
+ $file['storage_mtime'] = (int)$file['storage_mtime'];
+ $file['size'] = 0 + $file['size'];
}
return $files;
} else {
@@ -236,13 +243,19 @@ class Cache {
list($queryParts, $params) = $this->buildParts($data);
$queryParts[] = '`storage`';
$params[] = $this->getNumericStorageId();
- $valuesPlaceholder = array_fill(0, count($queryParts), '?');
- $sql = 'INSERT INTO `*PREFIX*filecache` (' . implode(', ', $queryParts) . ')'
- . ' VALUES (' . implode(', ', $valuesPlaceholder) . ')';
- \OC_DB::executeAudited($sql, $params);
+ $params = array_map(function($item) {
+ return trim($item, "`");
+ }, $params);
+ $queryParts = array_map(function($item) {
+ return trim($item, "`");
+ }, $queryParts);
+ $values = array_combine($queryParts, $params);
+ if (\OC::$server->getDatabaseConnection()->insertIfNotExist('*PREFIX*filecache', $values)) {
+ return (int)\OC_DB::insertid('*PREFIX*filecache');
+ }
- return (int)\OC_DB::insertid('*PREFIX*filecache');
+ return $this->getId($file);
}
}
@@ -408,12 +421,14 @@ class Cache {
$result = \OC_DB::executeAudited($sql, array($this->getNumericStorageId(), $source . '/%'));
$childEntries = $result->fetchAll();
$sourceLength = strlen($source);
+ \OC_DB::beginTransaction();
$query = \OC_DB::prepare('UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ? WHERE `fileid` = ?');
foreach ($childEntries as $child) {
$targetPath = $target . substr($child['path'], $sourceLength);
\OC_DB::executeAudited($query, array($targetPath, md5($targetPath), $child['fileid']));
}
+ \OC_DB::commit();
}
$sql = 'UPDATE `*PREFIX*filecache` SET `path` = ?, `path_hash` = ?, `name` = ?, `parent` =? WHERE `fileid` = ?';
@@ -434,7 +449,7 @@ class Cache {
/**
* @param string $file
*
- * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
+ * @return int Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
// normalize file
@@ -687,7 +702,7 @@ class Cache {
* instead does a global search in the cache table
*
* @param int $id
- * @return array, first element holding the storage id, second the path
+ * @return array first element holding the storage id, second the path
*/
static public function getById($id) {
$sql = 'SELECT `storage`, `path` FROM `*PREFIX*filecache` WHERE `fileid` = ?';
diff --git a/lib/private/files/cache/changepropagator.php b/lib/private/files/cache/changepropagator.php
index 2967c8f6259..36fc6e80144 100644
--- a/lib/private/files/cache/changepropagator.php
+++ b/lib/private/files/cache/changepropagator.php
@@ -59,8 +59,8 @@ class ChangePropagator {
list($storage, $internalPath) = $this->view->resolvePath($parent);
if ($storage) {
$cache = $storage->getCache();
- $id = $cache->getId($internalPath);
- $cache->update($id, array('mtime' => $time, 'etag' => $storage->getETag($internalPath)));
+ $entry = $cache->get($internalPath);
+ $cache->update($entry['fileid'], array('mtime' => max($time, $entry['mtime']), 'etag' => $storage->getETag($internalPath)));
}
}
}
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 4778a6803ba..d369398af1c 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -80,7 +80,8 @@ class Scanner extends BasicEmitter {
* @return array an array of metadata of the file
*/
public function getData($path) {
- if (!$this->storage->isReadable($path)) {
+ $permissions = $this->storage->getPermissions($path);
+ if (!$permissions & \OCP\PERMISSION_READ) {
//cant read, nothing we can do
\OCP\Util::writeLog('OC\Files\Cache\Scanner', "!!! Path '$path' is not accessible or present !!!", \OCP\Util::DEBUG);
return null;
@@ -95,7 +96,7 @@ class Scanner extends BasicEmitter {
}
$data['etag'] = $this->storage->getETag($path);
$data['storage_mtime'] = $data['mtime'];
- $data['permissions'] = $this->storage->getPermissions($path);
+ $data['permissions'] = $permissions;
return $data;
}
@@ -104,9 +105,11 @@ class Scanner extends BasicEmitter {
*
* @param string $file
* @param int $reuseExisting
+ * @param int $parentId
+ * @param array | null $cacheData existing data in the cache for the file to be scanned
* @return array an array of metadata of the scanned file
*/
- public function scanFile($file, $reuseExisting = 0) {
+ public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null) {
if (!self::isPartialFile($file)
and !Filesystem::isFileBlacklisted($file)
) {
@@ -118,7 +121,9 @@ class Scanner extends BasicEmitter {
if ($parent === '.' or $parent === '/') {
$parent = '';
}
- $parentId = $this->cache->getId($parent);
+ if ($parentId === -1) {
+ $parentId = $this->cache->getId($parent);
+ }
// scan the parent if it's not in the cache (id -1) and the current file is not the root folder
if ($file and $parentId === -1) {
@@ -128,14 +133,18 @@ class Scanner extends BasicEmitter {
if ($parent) {
$data['parent'] = $parentId;
}
- $cacheData = $this->cache->get($file);
- if ($cacheData and $reuseExisting) {
+ if (is_null($cacheData)) {
+ $cacheData = $this->cache->get($file);
+ }
+ if ($cacheData and $reuseExisting and isset($cacheData['fileid'])) {
// prevent empty etag
if (empty($cacheData['etag'])) {
$etag = $data['etag'];
} else {
$etag = $cacheData['etag'];
}
+ $fileId = $cacheData['fileid'];
+ $data['fileid'] = $fileId;
// only reuse data if the file hasn't explicitly changed
if (isset($data['storage_mtime']) && isset($cacheData['storage_mtime']) && $data['storage_mtime'] === $cacheData['storage_mtime']) {
$data['mtime'] = $cacheData['mtime'];
@@ -150,9 +159,10 @@ class Scanner extends BasicEmitter {
$newData = array_diff_assoc($data, $cacheData);
} else {
$newData = $data;
+ $fileId = -1;
}
if (!empty($newData)) {
- $data['fileid'] = $this->addToCache($file, $newData);
+ $data['fileid'] = $this->addToCache($file, $newData, $fileId);
$this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId));
\OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId));
}
@@ -175,13 +185,19 @@ class Scanner extends BasicEmitter {
/**
* @param string $path
* @param array $data
+ * @param int $fileId
* @return int the id of the added file
*/
- protected function addToCache($path, $data) {
+ protected function addToCache($path, $data, $fileId = -1) {
\OC_Hook::emit('Scanner', 'addToCache', array('file' => $path, 'data' => $data));
$this->emit('\OC\Files\Cache\Scanner', 'addToCache', array($path, $this->storageId, $data));
if ($this->cacheActive) {
- return $this->cache->put($path, $data);
+ if ($fileId !== -1) {
+ $this->cache->update($fileId, $data);
+ return $fileId;
+ } else {
+ return $this->cache->put($path, $data);
+ }
} else {
return -1;
}
@@ -190,12 +206,17 @@ class Scanner extends BasicEmitter {
/**
* @param string $path
* @param array $data
+ * @param int $fileId
*/
- protected function updateCache($path, $data) {
+ protected function updateCache($path, $data, $fileId = -1) {
\OC_Hook::emit('Scanner', 'addToCache', array('file' => $path, 'data' => $data));
$this->emit('\OC\Files\Cache\Scanner', 'updateCache', array($path, $this->storageId, $data));
if ($this->cacheActive) {
- $this->cache->put($path, $data);
+ if ($fileId !== -1) {
+ $this->cache->update($fileId, $data);
+ } else {
+ $this->cache->put($path, $data);
+ }
}
}
@@ -212,97 +233,124 @@ class Scanner extends BasicEmitter {
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
}
$data = $this->scanFile($path, $reuse);
- if ($data !== null) {
- $size = $this->scanChildren($path, $recursive, $reuse);
+ if ($data and $data['mimetype'] === 'httpd/unix-directory') {
+ $size = $this->scanChildren($path, $recursive, $reuse, $data);
$data['size'] = $size;
}
return $data;
}
- protected function getExistingChildren($path) {
+ /**
+ * Get the children currently in the cache
+ *
+ * @param int $folderId
+ * @return array[]
+ */
+ protected function getExistingChildren($folderId) {
$existingChildren = array();
- if ($this->cache->inCache($path)) {
- $children = $this->cache->getFolderContents($path);
- foreach ($children as $child) {
- $existingChildren[] = $child['name'];
- }
+ $children = $this->cache->getFolderContentsById($folderId);
+ foreach ($children as $child) {
+ $existingChildren[$child['name']] = $child;
}
return $existingChildren;
}
/**
+ * Get the children from the storage
+ *
+ * @param string $folder
+ * @return string[]
+ */
+ protected function getNewChildren($folder) {
+ $children = array();
+ if ($dh = $this->storage->opendir($folder)) {
+ if (is_resource($dh)) {
+ while (($file = readdir($dh)) !== false) {
+ if (!Filesystem::isIgnoredDir($file)) {
+ $children[] = $file;
+ }
+ }
+ }
+ }
+ return $children;
+ }
+
+ /**
* scan all the files and folders in a folder
*
* @param string $path
* @param bool $recursive
* @param int $reuse
+ * @param array $folderData existing cache data for the folder to be scanned
* @return int the size of the scanned folder or -1 if the size is unknown at this stage
*/
- public function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {
+ protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderData = null) {
if ($reuse === -1) {
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
}
$this->emit('\OC\Files\Cache\Scanner', 'scanFolder', array($path, $this->storageId));
$size = 0;
$childQueue = array();
- $existingChildren = $this->getExistingChildren($path);
- $newChildren = array();
- if ($this->storage->is_dir($path) && ($dh = $this->storage->opendir($path))) {
- $exceptionOccurred = false;
- if ($this->useTransactions) {
- \OC_DB::beginTransaction();
- }
- if (is_resource($dh)) {
- while (($file = readdir($dh)) !== false) {
- $child = ($path) ? $path . '/' . $file : $file;
- if (!Filesystem::isIgnoredDir($file)) {
- $newChildren[] = $file;
- try {
- $data = $this->scanFile($child, $reuse);
- if ($data) {
- if ($data['mimetype'] === 'httpd/unix-directory' and $recursive === self::SCAN_RECURSIVE) {
- $childQueue[] = $child;
- } else if ($data['size'] === -1) {
- $size = -1;
- } else if ($size !== -1) {
- $size += $data['size'];
- }
- }
- } catch (\Doctrine\DBAL\DBALException $ex) {
- // might happen if inserting duplicate while a scanning
- // process is running in parallel
- // log and ignore
- \OC_Log::write('core', 'Exception while scanning file "' . $child . '": ' . $ex->getMessage(), \OC_Log::DEBUG);
- $exceptionOccurred = true;
- }
+ if (is_array($folderData) and isset($folderData['fileid'])) {
+ $folderId = $folderData['fileid'];
+ } else {
+ $folderId = $this->cache->getId($path);
+ }
+ $existingChildren = $this->getExistingChildren($folderId);
+ $newChildren = $this->getNewChildren($path);
+
+ if ($this->useTransactions) {
+ \OC_DB::beginTransaction();
+ }
+ $exceptionOccurred = false;
+ foreach ($newChildren as $file) {
+ $child = ($path) ? $path . '/' . $file : $file;
+ try {
+ $existingData = isset($existingChildren[$file]) ? $existingChildren[$file] : null;
+ $data = $this->scanFile($child, $reuse, $folderId, $existingData);
+ if ($data) {
+ if ($data['mimetype'] === 'httpd/unix-directory' and $recursive === self::SCAN_RECURSIVE) {
+ $childQueue[$child] = $data;
+ } else if ($data['size'] === -1) {
+ $size = -1;
+ } else if ($size !== -1) {
+ $size += $data['size'];
}
}
+ } catch (\Doctrine\DBAL\DBALException $ex) {
+ // might happen if inserting duplicate while a scanning
+ // process is running in parallel
+ // log and ignore
+ \OC_Log::write('core', 'Exception while scanning file "' . $child . '": ' . $ex->getMessage(), \OC_Log::DEBUG);
+ $exceptionOccurred = true;
}
- $removedChildren = \array_diff($existingChildren, $newChildren);
- foreach ($removedChildren as $childName) {
- $child = ($path) ? $path . '/' . $childName : $childName;
- $this->removeFromCache($child);
- }
- if ($this->useTransactions) {
- \OC_DB::commit();
- }
- if ($exceptionOccurred) {
- // It might happen that the parallel scan process has already
- // inserted mimetypes but those weren't available yet inside the transaction
- // To make sure to have the updated mime types in such cases,
- // we reload them here
- $this->cache->loadMimetypes();
- }
+ }
+ $removedChildren = \array_diff(array_keys($existingChildren), $newChildren);
+ foreach ($removedChildren as $childName) {
+ $child = ($path) ? $path . '/' . $childName : $childName;
+ $this->removeFromCache($child);
+ }
+ if ($this->useTransactions) {
+ \OC_DB::commit();
+ }
+ if ($exceptionOccurred) {
+ // It might happen that the parallel scan process has already
+ // inserted mimetypes but those weren't available yet inside the transaction
+ // To make sure to have the updated mime types in such cases,
+ // we reload them here
+ $this->cache->loadMimetypes();
+ }
- foreach ($childQueue as $child) {
- $childSize = $this->scanChildren($child, self::SCAN_RECURSIVE, $reuse);
- if ($childSize === -1) {
- $size = -1;
- } else if ($size !== -1) {
- $size += $childSize;
- }
+ foreach ($childQueue as $child => $childData) {
+ $childSize = $this->scanChildren($child, self::SCAN_RECURSIVE, $reuse, $childData);
+ if ($childSize === -1) {
+ $size = -1;
+ } else if ($size !== -1) {
+ $size += $childSize;
}
- $this->updateCache($path, array('size' => $size));
+ }
+ if (!is_array($folderData) or !isset($folderData['size']) or $folderData['size'] !== $size) {
+ $this->updateCache($path, array('size' => $size), $folderId);
}
$this->emit('\OC\Files\Cache\Scanner', 'postScanFolder', array($path, $this->storageId));
return $size;
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php
index 31a4a7c21e7..248748ea4a9 100644
--- a/lib/private/files/cache/updater.php
+++ b/lib/private/files/cache/updater.php
@@ -13,6 +13,11 @@ namespace OC\Files\Cache;
*/
class Updater {
/**
+ * @var bool
+ */
+ protected $enabled = true;
+
+ /**
* @var \OC\Files\View
*/
protected $view;
@@ -30,7 +35,18 @@ class Updater {
$this->propagator = new ChangePropagator($view);
}
+ public function disable() {
+ $this->enabled = false;
+ }
+
+ public function enable() {
+ $this->enabled = true;
+ }
+
public function propagate($path, $time = null) {
+ if (Scanner::isPartialFile($path)) {
+ return;
+ }
$this->propagator->addChange($path);
$this->propagator->propagateChanges($time);
}
@@ -42,6 +58,9 @@ class Updater {
* @param int $time
*/
public function update($path, $time = null) {
+ if (!$this->enabled or Scanner::isPartialFile($path)) {
+ return;
+ }
/**
* @var \OC\Files\Storage\Storage $storage
* @var string $internalPath
@@ -64,6 +83,9 @@ class Updater {
* @param string $path
*/
public function remove($path) {
+ if (!$this->enabled or Scanner::isPartialFile($path)) {
+ return;
+ }
/**
* @var \OC\Files\Storage\Storage $storage
* @var string $internalPath
@@ -88,6 +110,9 @@ class Updater {
* @param string $target
*/
public function rename($source, $target) {
+ if (!$this->enabled or Scanner::isPartialFile($source) or Scanner::isPartialFile($target)) {
+ return;
+ }
/**
* @var \OC\Files\Storage\Storage $sourceStorage
* @var \OC\Files\Storage\Storage $targetStorage
@@ -104,6 +129,9 @@ class Updater {
if ($sourceStorage && $targetStorage) {
if ($sourceStorage === $targetStorage) {
$cache = $sourceStorage->getCache($sourceInternalPath);
+ if ($cache->inCache($targetInternalPath)) {
+ $cache->remove($targetInternalPath);
+ }
$cache->move($sourceInternalPath, $targetInternalPath);
if (pathinfo($sourceInternalPath, PATHINFO_EXTENSION) !== pathinfo($targetInternalPath, PATHINFO_EXTENSION)) {
diff --git a/lib/private/files/cache/wrapper/cachejail.php b/lib/private/files/cache/wrapper/cachejail.php
index 3f7ea66ea1b..bb065643cf7 100644
--- a/lib/private/files/cache/wrapper/cachejail.php
+++ b/lib/private/files/cache/wrapper/cachejail.php
@@ -163,7 +163,7 @@ class CacheJail extends CacheWrapper {
/**
* @param string $file
*
- * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
+ * @return int Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
return $this->cache->getStatus($this->getSourcePath($file));
diff --git a/lib/private/files/cache/wrapper/cachewrapper.php b/lib/private/files/cache/wrapper/cachewrapper.php
index 83811520e4b..a5997edb307 100644
--- a/lib/private/files/cache/wrapper/cachewrapper.php
+++ b/lib/private/files/cache/wrapper/cachewrapper.php
@@ -152,7 +152,7 @@ class CacheWrapper extends Cache {
/**
* @param string $file
*
- * @return int, Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
+ * @return int Cache::NOT_FOUND, Cache::PARTIAL, Cache::SHALLOW or Cache::COMPLETE
*/
public function getStatus($file) {
return $this->cache->getStatus($file);
@@ -260,7 +260,7 @@ class CacheWrapper extends Cache {
* instead does a global search in the cache table
*
* @param int $id
- * @return array, first element holding the storage id, second the path
+ * @return array first element holding the storage id, second the path
*/
static public function getById($id) {
return parent::getById($id);
diff --git a/lib/private/files/fileinfo.php b/lib/private/files/fileinfo.php
index e4a397dcca2..1acb62033dd 100644
--- a/lib/private/files/fileinfo.php
+++ b/lib/private/files/fileinfo.php
@@ -159,11 +159,10 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
* @return \OCP\Files\FileInfo::TYPE_FILE|\OCP\Files\FileInfo::TYPE_FOLDER
*/
public function getType() {
- if (isset($this->data['type'])) {
- return $this->data['type'];
- } else {
- return $this->getMimetype() === 'httpd/unix-directory' ? self::TYPE_FOLDER : self::TYPE_FILE;
+ if (!isset($this->data['type'])) {
+ $this->data['type'] = ($this->getMimetype() === 'httpd/unix-directory') ? self::TYPE_FOLDER : self::TYPE_FILE;
}
+ return $this->data['type'];
}
public function getData() {
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index c7454683e80..c3a062cd2d6 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -536,9 +536,11 @@ class Filesystem {
* @return bool
*/
static public function isFileBlacklisted($filename) {
+ $filename = self::normalizePath($filename);
+
$blacklist = \OC_Config::getValue('blacklisted_files', array('.htaccess'));
$filename = strtolower(basename($filename));
- return (in_array($filename, $blacklist));
+ return in_array($filename, $blacklist);
}
/**
@@ -714,9 +716,18 @@ class Filesystem {
* Fix common problems with a file path
* @param string $path
* @param bool $stripTrailingSlash
+ * @param bool $isAbsolutePath
* @return string
*/
public static function normalizePath($path, $stripTrailingSlash = true, $isAbsolutePath = false) {
+ /**
+ * FIXME: This is a workaround for existing classes and files which call
+ * this function with another type than a valid string. This
+ * conversion should get removed as soon as all existing
+ * function calls have been fixed.
+ */
+ $path = (string)$path;
+
$cacheKey = json_encode([$path, $stripTrailingSlash, $isAbsolutePath]);
if(isset(self::$normalizedPathCache[$cacheKey])) {
@@ -727,6 +738,9 @@ class Filesystem {
return '/';
}
+ //normalize unicode if possible
+ $path = \OC_Util::normalizeUnicode($path);
+
//no windows style slashes
$path = str_replace('\\', '/', $path);
@@ -763,9 +777,6 @@ class Filesystem {
$path = substr($path, 0, -2);
}
- //normalize unicode if possible
- $path = \OC_Util::normalizeUnicode($path);
-
$normalizedPath = $windows_drive_letter . $path;
self::$normalizedPathCache[$cacheKey] = $normalizedPath;
diff --git a/lib/private/files/mapper.php b/lib/private/files/mapper.php
index 5e78ef03dd0..86c23c62e4b 100644
--- a/lib/private/files/mapper.php
+++ b/lib/private/files/mapper.php
@@ -115,6 +115,8 @@ class Mapper
/**
* @param string $logicPath
+ * @return null
+ * @throws \OC\DatabaseException
*/
private function resolveLogicPath($logicPath) {
$logicPath = $this->resolveRelativePath($logicPath);
@@ -162,7 +164,8 @@ class Mapper
/**
* @param string $logicPath
- * @param boolean $store
+ * @param bool $store
+ * @return string
*/
private function create($logicPath, $store) {
$logicPath = $this->resolveRelativePath($logicPath);
@@ -191,7 +194,9 @@ class Mapper
}
/**
- * @param integer $index
+ * @param string $path
+ * @param int $index
+ * @return string
*/
public function slugifyPath($path, $index = null) {
$path = $this->stripRootFolder($path, $this->unchangedPhysicalRoot);
@@ -205,7 +210,7 @@ class Mapper
continue;
}
- $sluggedElements[] = self::slugify($pathElement);
+ $sluggedElements[] = $this->slugify($pathElement);
}
// apply index to file name
@@ -253,13 +258,18 @@ class Mapper
// trim ending dots (for security reasons and win compatibility)
$text = preg_replace('~\.+$~', '', $text);
- if (empty($text)) {
+ if (empty($text) || \OC\Files\Filesystem::isFileBlacklisted($text)) {
/**
* Item slug would be empty. Previously we used uniqid() here.
* However this means that the behaviour is not reproducible, so
* when uploading files into a "empty" folder, the folders name is
* different.
*
+ * The other case is, that the slugified name would be a blacklisted
+ * filename. In this case we just use the same workaround by
+ * returning the secure md5 hash of the original name.
+ *
+ *
* If there would be a md5() hash collision, the deduplicate check
* will spot this and append an index later, so this should not be
* a problem.
diff --git a/lib/private/files/node/node.php b/lib/private/files/node/node.php
index 536483fc89d..e5b219420cd 100644
--- a/lib/private/files/node/node.php
+++ b/lib/private/files/node/node.php
@@ -8,6 +8,10 @@
namespace OC\Files\Node;
+use OC\Files\Filesystem;
+use OCP\Files\FileInfo;
+use OCP\Files\InvalidPathException;
+use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
class Node implements \OCP\Files\Node {
@@ -45,11 +49,21 @@ class Node implements \OCP\Files\Node {
/**
* Returns the matching file info
*
- * @return \OCP\Files\FileInfo
+ * @return FileInfo
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getFileInfo() {
+ if (!Filesystem::isValidPath($this->path)) {
+ throw new InvalidPathException();
+ }
if (!$this->fileInfo) {
- $this->fileInfo = $this->view->getFileInfo($this->path);
+ $fileInfo = $this->view->getFileInfo($this->path);
+ if ($fileInfo instanceof FileInfo) {
+ $this->fileInfo = $fileInfo;
+ } else {
+ throw new NotFoundException();
+ }
}
return $this->fileInfo;
}
@@ -138,6 +152,8 @@ class Node implements \OCP\Files\Node {
/**
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getId() {
return $this->getFileInfo()->getId();
@@ -152,6 +168,8 @@ class Node implements \OCP\Files\Node {
/**
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getMTime() {
return $this->getFileInfo()->getMTime();
@@ -159,6 +177,8 @@ class Node implements \OCP\Files\Node {
/**
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getSize() {
return $this->getFileInfo()->getSize();
@@ -166,6 +186,8 @@ class Node implements \OCP\Files\Node {
/**
* @return string
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getEtag() {
return $this->getFileInfo()->getEtag();
@@ -173,6 +195,8 @@ class Node implements \OCP\Files\Node {
/**
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getPermissions() {
return $this->getFileInfo()->getPermissions();
@@ -180,6 +204,8 @@ class Node implements \OCP\Files\Node {
/**
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isReadable() {
return $this->getFileInfo()->isReadable();
@@ -187,6 +213,8 @@ class Node implements \OCP\Files\Node {
/**
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isUpdateable() {
return $this->getFileInfo()->isUpdateable();
@@ -194,6 +222,8 @@ class Node implements \OCP\Files\Node {
/**
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isDeletable() {
return $this->getFileInfo()->isDeletable();
@@ -201,11 +231,18 @@ class Node implements \OCP\Files\Node {
/**
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isShareable() {
return $this->getFileInfo()->isShareable();
}
+ /**
+ * @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
+ */
public function isCreatable() {
return $this->getFileInfo()->isCreatable();
}
diff --git a/lib/private/files/objectstore/noopscanner.php b/lib/private/files/objectstore/noopscanner.php
index 59ca1771971..7750a8d5529 100644
--- a/lib/private/files/objectstore/noopscanner.php
+++ b/lib/private/files/objectstore/noopscanner.php
@@ -33,10 +33,11 @@ class NoopScanner extends Scanner {
*
* @param string $file
* @param int $reuseExisting
- * @param bool $parentExistsInCache
- * @return array with metadata of the scanned file
+ * @param int $parentId
+ * @param array|null $cacheData existing data in the cache for the file to be scanned
+ * @return array an array of metadata of the scanned file
*/
- public function scanFile($file, $reuseExisting = 0, $parentExistsInCache = false) {
+ public function scanFile($file, $reuseExisting = 0, $parentId = -1, $cacheData = null) {
return array();
}
@@ -58,11 +59,11 @@ class NoopScanner extends Scanner {
* @param string $path
* @param bool $recursive
* @param int $reuse
+ * @param array $folderData existing cache data for the folder to be scanned
* @return int the size of the scanned folder or -1 if the size is unknown at this stage
*/
- public function scanChildren($path, $recursive = Storage::SCAN_RECURSIVE, $reuse = -1) {
- $size = 0;
- return $size;
+ protected function scanChildren($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1, $folderData = null) {
+ return 0;
}
/**
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php
index b2bf41f751c..8549d5a1fad 100644
--- a/lib/private/files/storage/common.php
+++ b/lib/private/files/storage/common.php
@@ -8,8 +8,14 @@
namespace OC\Files\Storage;
+use OC\Files\Cache\Cache;
+use OC\Files\Cache\Scanner;
+use OC\Files\Cache\Storage;
use OC\Files\Filesystem;
use OC\Files\Cache\Watcher;
+use OCP\Files\InvalidCharacterInPathException;
+use OCP\Files\InvalidPathException;
+use OCP\Files\ReservedWordException;
/**
* Storage backend class for providing common filesystem operation methods
@@ -25,7 +31,6 @@ use OC\Files\Cache\Watcher;
abstract class Common implements \OC\Files\Storage\Storage {
protected $cache;
protected $scanner;
- protected $permissioncache;
protected $watcher;
protected $storageCache;
@@ -303,7 +308,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
$storage = $this;
}
if (!isset($this->cache)) {
- $this->cache = new \OC\Files\Cache\Cache($storage);
+ $this->cache = new Cache($storage);
}
return $this->cache;
}
@@ -313,7 +318,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
$storage = $this;
}
if (!isset($this->scanner)) {
- $this->scanner = new \OC\Files\Cache\Scanner($storage);
+ $this->scanner = new Scanner($storage);
}
return $this->scanner;
}
@@ -323,7 +328,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
$storage = $this;
}
if (!isset($this->watcher)) {
- $this->watcher = new \OC\Files\Cache\Watcher($storage);
+ $this->watcher = new Watcher($storage);
$this->watcher->setPolicy(\OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_ONCE));
}
return $this->watcher;
@@ -334,7 +339,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
$storage = $this;
}
if (!isset($this->storageCache)) {
- $this->storageCache = new \OC\Files\Cache\Storage($storage);
+ $this->storageCache = new Storage($storage);
}
return $this->storageCache;
}
@@ -343,7 +348,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
* get the owner of a path
*
* @param string $path The path to get the owner
- * @return string uid or false
+ * @return string|false uid or false
*/
public function getOwner($path) {
return \OC_User::getUser();
@@ -353,10 +358,10 @@ abstract class Common implements \OC\Files\Storage\Storage {
* get the ETag for a file or folder
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getETag($path) {
- $ETagFunction = \OC_Connector_Sabre_Node::$ETagFunction;
+ $ETagFunction = \OC\Connector\Sabre\Node::$ETagFunction;
if ($ETagFunction) {
$hash = call_user_func($ETagFunction, $path);
return $hash;
@@ -400,7 +405,7 @@ abstract class Common implements \OC\Files\Storage\Storage {
* get the free space in the storage
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function free_space($path) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
@@ -445,10 +450,66 @@ abstract class Common implements \OC\Files\Storage\Storage {
* For now the returned array can hold the parameter url - in future more attributes might follow.
*
* @param string $path
- * @return array
+ * @return array|false
*/
public function getDirectDownload($path) {
return [];
}
+ /**
+ * @inheritdoc
+ */
+ public function verifyPath($path, $fileName) {
+ // NOTE: $path will remain unverified for now
+ if (\OC_Util::runningOnWindows()) {
+ $this->verifyWindowsPath($fileName);
+ } else {
+ $this->verifyPosixPath($fileName);
+ }
+ }
+
+ /**
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx
+ * @param string $fileName
+ * @throws InvalidPathException
+ */
+ protected function verifyWindowsPath($fileName) {
+ $fileName = trim($fileName);
+ $this->scanForInvalidCharacters($fileName, "\\/<>:\"|?*");
+ $reservedNames = ['CON', 'PRN', 'AUX', 'NUL', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9'];
+ if (in_array(strtoupper($fileName), $reservedNames)) {
+ throw new ReservedWordException();
+ }
+ }
+
+ /**
+ * @param string $fileName
+ * @throws InvalidPathException
+ */
+ protected function verifyPosixPath($fileName) {
+ $fileName = trim($fileName);
+ $this->scanForInvalidCharacters($fileName, "\\/");
+ $reservedNames = ['*'];
+ if (in_array($fileName, $reservedNames)) {
+ throw new ReservedWordException();
+ }
+ }
+
+ /**
+ * @param string $fileName
+ * @param string $invalidChars
+ * @throws InvalidPathException
+ */
+ private function scanForInvalidCharacters($fileName, $invalidChars) {
+ foreach(str_split($invalidChars) as $char) {
+ if (strpos($fileName, $char) !== false) {
+ throw new InvalidCharacterInPathException();
+ }
+ }
+
+ $sanitizedFileName = filter_var($fileName, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
+ if($sanitizedFileName !== $fileName) {
+ throw new InvalidCharacterInPathException();
+ }
+ }
}
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index 4f7b3ff8940..7ca18262115 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -10,8 +10,13 @@ namespace OC\Files\Storage;
use OCP\Files\StorageInvalidException;
use OCP\Files\StorageNotAvailableException;
-use Sabre\DAV\Exception;
+use Sabre\HTTP\ClientHttpException;
+/**
+ * Class DAV
+ *
+ * @package OC\Files\Storage
+ */
class DAV extends \OC\Files\Storage\Common {
protected $password;
protected $user;
@@ -25,8 +30,13 @@ class DAV extends \OC\Files\Storage\Common {
*/
private $client;
- private static $tempFiles = array();
+ /** @var array */
+ private static $tempFiles = [];
+ /**
+ * @param array $params
+ * @throws \Exception
+ */
public function __construct($params) {
if (isset($params['host']) && isset($params['user']) && isset($params['password'])) {
$host = $params['host'];
@@ -76,16 +86,19 @@ class DAV extends \OC\Files\Storage\Common {
);
$this->client = new \Sabre\DAV\Client($settings);
+ $this->client->setThrowExceptions(true);
if ($this->secure === true && $this->certPath) {
$this->client->addTrustedCertificates($this->certPath);
}
}
+ /** {@inheritdoc} */
public function getId() {
return 'webdav::' . $this->user . '@' . $this->host . '/' . $this->root;
}
+ /** {@inheritdoc} */
public function createBaseUri() {
$baseUri = 'http';
if ($this->secure) {
@@ -95,12 +108,14 @@ class DAV extends \OC\Files\Storage\Common {
return $baseUri;
}
+ /** {@inheritdoc} */
public function mkdir($path) {
$this->init();
$path = $this->cleanPath($path);
return $this->simpleResponse('MKCOL', $path, null, 201);
}
+ /** {@inheritdoc} */
public function rmdir($path) {
$this->init();
$path = $this->cleanPath($path) . '/';
@@ -109,6 +124,7 @@ class DAV extends \OC\Files\Storage\Common {
return $this->simpleResponse('DELETE', $path, null, 204);
}
+ /** {@inheritdoc} */
public function opendir($path) {
$this->init();
$path = $this->cleanPath($path);
@@ -124,9 +140,10 @@ class DAV extends \OC\Files\Storage\Common {
}
\OC\Files\Stream\Dir::register($id, $content);
return opendir('fakedir://' . $id);
- } catch (Exception\NotFound $e) {
- return false;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 404) {
+ return false;
+ }
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -136,6 +153,7 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function filetype($path) {
$this->init();
$path = $this->cleanPath($path);
@@ -146,9 +164,10 @@ class DAV extends \OC\Files\Storage\Common {
$responseType = $response["{DAV:}resourcetype"]->resourceType;
}
return (count($responseType) > 0 and $responseType[0] == "{DAV:}collection") ? 'dir' : 'file';
- } catch (Exception\NotFound $e) {
- return false;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 404) {
+ return false;
+ }
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -158,15 +177,17 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function file_exists($path) {
$this->init();
$path = $this->cleanPath($path);
try {
$this->client->propfind($this->encodePath($path), array('{DAV:}resourcetype'));
return true; //no 404 exception
- } catch (Exception\NotFound $e) {
- return false;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 404) {
+ return false;
+ }
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -176,11 +197,13 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function unlink($path) {
$this->init();
return $this->simpleResponse('DELETE', $path, null, 204);
}
+ /** {@inheritdoc} */
public function fopen($path, $mode) {
$this->init();
$path = $this->cleanPath($path);
@@ -250,6 +273,9 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /**
+ * @param string $tmpFile
+ */
public function writeBack($tmpFile) {
if (isset(self::$tempFiles[$tmpFile])) {
$this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
@@ -257,6 +283,7 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function free_space($path) {
$this->init();
$path = $this->cleanPath($path);
@@ -272,6 +299,7 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function touch($path, $mtime = null) {
$this->init();
if (is_null($mtime)) {
@@ -283,9 +311,10 @@ class DAV extends \OC\Files\Storage\Common {
if ($this->file_exists($path)) {
try {
$this->client->proppatch($this->encodePath($path), array('{DAV:}lastmodified' => $mtime));
- } catch (Exception\NotImplemented $e) {
- return false;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 501) {
+ return false;
+ }
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -299,6 +328,10 @@ class DAV extends \OC\Files\Storage\Common {
return true;
}
+ /**
+ * @param string $path
+ * @param string $target
+ */
protected function uploadFile($path, $target) {
$this->init();
$source = fopen($path, 'r');
@@ -330,6 +363,7 @@ class DAV extends \OC\Files\Storage\Common {
$this->removeCachedFile($target);
}
+ /** {@inheritdoc} */
public function rename($path1, $path2) {
$this->init();
$path1 = $this->encodePath($this->cleanPath($path1));
@@ -339,7 +373,7 @@ class DAV extends \OC\Files\Storage\Common {
$this->removeCachedFile($path1);
$this->removeCachedFile($path2);
return true;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -349,6 +383,7 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function copy($path1, $path2) {
$this->init();
$path1 = $this->encodePath($this->cleanPath($path1));
@@ -357,7 +392,7 @@ class DAV extends \OC\Files\Storage\Common {
$this->client->request('COPY', $path1, null, array('Destination' => $path2));
$this->removeCachedFile($path2);
return true;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -367,6 +402,7 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function stat($path) {
$this->init();
$path = $this->cleanPath($path);
@@ -376,11 +412,12 @@ class DAV extends \OC\Files\Storage\Common {
'mtime' => strtotime($response['{DAV:}getlastmodified']),
'size' => (int)isset($response['{DAV:}getcontentlength']) ? $response['{DAV:}getcontentlength'] : 0,
);
- } catch (Exception\NotFound $e) {
- return array();
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 404) {
+ return array();
+ }
$this->convertSabreException($e);
- return false;
+ return array();
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
@@ -388,6 +425,7 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function getMimeType($path) {
$this->init();
$path = $this->cleanPath($path);
@@ -405,9 +443,10 @@ class DAV extends \OC\Files\Storage\Common {
} else {
return false;
}
- } catch (Exception\NotFound $e) {
- return false;
- } catch (\Sabre\DAV\Exception $e) {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 404) {
+ return false;
+ }
$this->convertSabreException($e);
return false;
} catch (\Exception $e) {
@@ -419,6 +458,7 @@ class DAV extends \OC\Files\Storage\Common {
/**
* @param string $path
+ * @return string
*/
public function cleanPath($path) {
if ($path === "") {
@@ -443,23 +483,24 @@ class DAV extends \OC\Files\Storage\Common {
/**
* @param string $method
* @param string $path
- * @param integer $expected
+ * @param string|resource|null $body
+ * @param int $expected
+ * @return bool
+ * @throws StorageInvalidException
+ * @throws StorageNotAvailableException
*/
private function simpleResponse($method, $path, $body, $expected) {
$path = $this->cleanPath($path);
try {
$response = $this->client->request($method, $this->encodePath($path), $body);
return $response['statusCode'] == $expected;
- } catch (Exception\NotFound $e) {
- if ($method === 'DELETE') {
+ } catch (ClientHttpException $e) {
+ if ($e->getHttpStatus() === 404 && $method === 'DELETE') {
return false;
}
$this->convertSabreException($e);
return false;
- } catch (\Sabre\DAV\Exception $e) {
- $this->convertSabreException($e);
- return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
@@ -478,22 +519,27 @@ class DAV extends \OC\Files\Storage\Common {
}
}
+ /** {@inheritdoc} */
public function isUpdatable($path) {
return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_UPDATE);
}
+ /** {@inheritdoc} */
public function isCreatable($path) {
return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_CREATE);
}
+ /** {@inheritdoc} */
public function isSharable($path) {
return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_SHARE);
}
+ /** {@inheritdoc} */
public function isDeletable($path) {
return (bool)($this->getPermissions($path) & \OCP\Constants::PERMISSION_DELETE);
}
+ /** {@inheritdoc} */
public function getPermissions($path) {
$this->init();
$path = $this->cleanPath($path);
@@ -563,9 +609,10 @@ class DAV extends \OC\Files\Storage\Common {
$remoteMtime = strtotime($response['{DAV:}getlastmodified']);
return $remoteMtime > $time;
}
- } catch (Exception\NotFound $e) {
- return false;
- } catch (Exception $e) {
+ } catch (\Exception $e) {
+ if ($e->getHttpStatus() === 404) {
+ return false;
+ }
$this->convertSabreException($e);
return false;
}
@@ -575,19 +622,19 @@ class DAV extends \OC\Files\Storage\Common {
* Convert sabre DAV exception to a storage exception,
* then throw it
*
- * @param \Sabre\Dav\Exception $e sabre exception
+ * @param ClientHttpException $e sabre exception
* @throws StorageInvalidException if the storage is invalid, for example
* when the authentication expired or is invalid
* @throws StorageNotAvailableException if the storage is not available,
* which might be temporary
*/
- private function convertSabreException(\Sabre\Dav\Exception $e) {
+ private function convertSabreException(ClientHttpException $e) {
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
- if ($e instanceof \Sabre\DAV\Exception\NotAuthenticated) {
+ if ($e->getHttpStatus() === 401) {
// either password was changed or was invalid all along
throw new StorageInvalidException(get_class($e).': '.$e->getMessage());
- } else if ($e instanceof \Sabre\DAV\Exception\MethodNotAllowed) {
- // ignore exception, false will be returned
+ } else if ($e->getHttpStatus() === 405) {
+ // ignore exception for MethodNotAllowed, false will be returned
return;
}
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index ea9de287361..9208a7f7774 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -8,6 +8,8 @@
namespace OC\Files\Storage\Wrapper;
+use OCP\Files\InvalidPathException;
+
class Wrapper implements \OC\Files\Storage\Storage {
/**
* @var \OC\Files\Storage\Storage $storage
@@ -477,4 +479,14 @@ class Wrapper implements \OC\Files\Storage\Storage {
public function getDirectDownload($path) {
return $this->storage->getDirectDownload($path);
}
+
+ /**
+ * @param string $path the path of the target folder
+ * @param string $fileName the name of the file itself
+ * @return void
+ * @throws InvalidPathException
+ */
+ public function verifyPath($path, $fileName) {
+ $this->storage->verifyPath($path, $fileName);
+ }
}
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 6c720a6f5c0..8b448abeb89 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -6,6 +6,15 @@
* See the COPYING-README file.
*/
+
+namespace OC\Files;
+
+use OC\Files\Cache\Updater;
+use OC\Files\Mount\MoveableMount;
+use OCP\Files\InvalidCharacterInPathException;
+use OCP\Files\InvalidPathException;
+use OCP\Files\ReservedWordException;
+
/**
* Class to provide access to ownCloud filesystem via a "view", and methods for
* working with files within that view (e.g. read, write, delete, etc.). Each
@@ -22,21 +31,22 @@
* Filesystem functions are not called directly; they are passed to the correct
* \OC\Files\Storage\Storage object
*/
-
-namespace OC\Files;
-
-use OC\Files\Cache\Updater;
-use OC\Files\Mount\MoveableMount;
-
class View {
+ /** @var string */
private $fakeRoot = '';
- /**
- * @var \OC\Files\Cache\Updater
- */
+ /** @var \OC\Files\Cache\Updater */
protected $updater;
+ /**
+ * @param string $root
+ * @throws \Exception If $root contains an invalid path
+ */
public function __construct($root = '') {
+ if(!Filesystem::isValidPath($root)) {
+ throw new \Exception();
+ }
+
$this->fakeRoot = $root;
$this->updater = new Updater($this);
}
@@ -87,6 +97,11 @@ class View {
if ($this->fakeRoot == '') {
return $path;
}
+
+ if (rtrim($path,'/') === rtrim($this->fakeRoot, '/')) {
+ return '/';
+ }
+
if (strpos($path, $this->fakeRoot) !== 0) {
return null;
} else {
@@ -103,7 +118,7 @@ class View {
* get the mountpoint of the storage object for a path
* ( note: because a storage is not always mounted inside the fakeroot, the
* returned mountpoint is relative to the absolute root of the filesystem
- * and doesn't take the chroot into account )
+ * and does not take the chroot into account )
*
* @param string $path
* @return string
@@ -116,7 +131,7 @@ class View {
* get the mountpoint of the storage object for a path
* ( note: because a storage is not always mounted inside the fakeroot, the
* returned mountpoint is relative to the absolute root of the filesystem
- * and doesn't take the chroot into account )
+ * and does not take the chroot into account )
*
* @param string $path
* @return \OCP\Files\Mount\IMountPoint
@@ -237,11 +252,19 @@ class View {
return $this->basicOperation('opendir', $path, array('read'));
}
+ /**
+ * @param $handle
+ * @return mixed
+ */
public function readdir($handle) {
$fsLocal = new Storage\Local(array('datadir' => '/'));
return $fsLocal->readdir($handle);
}
+ /**
+ * @param string $path
+ * @return bool|mixed
+ */
public function is_dir($path) {
if ($path == '/') {
return true;
@@ -249,6 +272,10 @@ class View {
return $this->basicOperation('is_dir', $path);
}
+ /**
+ * @param string $path
+ * @return bool|mixed
+ */
public function is_file($path) {
if ($path == '/') {
return false;
@@ -256,18 +283,35 @@ class View {
return $this->basicOperation('is_file', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function stat($path) {
return $this->basicOperation('stat', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function filetype($path) {
return $this->basicOperation('filetype', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function filesize($path) {
return $this->basicOperation('filesize', $path);
}
+ /**
+ * @param string $path
+ * @return bool|mixed
+ * @throws \OCP\Files\InvalidPathException
+ */
public function readfile($path) {
$this->assertPathLength($path);
@ob_end_clean();
@@ -284,18 +328,34 @@ class View {
return false;
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function isCreatable($path) {
return $this->basicOperation('isCreatable', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function isReadable($path) {
return $this->basicOperation('isReadable', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function isUpdatable($path) {
return $this->basicOperation('isUpdatable', $path);
}
+ /**
+ * @param string $path
+ * @return bool|mixed
+ */
public function isDeletable($path) {
$absolutePath = $this->getAbsolutePath($path);
$mount = Filesystem::getMountManager()->find($absolutePath);
@@ -305,10 +365,18 @@ class View {
return $this->basicOperation('isDeletable', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function isSharable($path) {
return $this->basicOperation('isSharable', $path);
}
+ /**
+ * @param string $path
+ * @return bool|mixed
+ */
public function file_exists($path) {
if ($path == '/') {
return true;
@@ -316,10 +384,19 @@ class View {
return $this->basicOperation('file_exists', $path);
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function filemtime($path) {
return $this->basicOperation('filemtime', $path);
}
+ /**
+ * @param string $path
+ * @param int|string $mtime
+ * @return bool
+ */
public function touch($path, $mtime = null) {
if (!is_null($mtime) and !is_numeric($mtime)) {
$mtime = strtotime($mtime);
@@ -347,10 +424,19 @@ class View {
return true;
}
+ /**
+ * @param string $path
+ * @return mixed
+ */
public function file_get_contents($path) {
return $this->basicOperation('file_get_contents', $path, array('read'));
}
+ /**
+ * @param bool $exists
+ * @param string $path
+ * @param bool $run
+ */
protected function emit_file_hooks_pre($exists, $path, &$run) {
if (!$exists) {
\OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_create, array(
@@ -369,6 +455,10 @@ class View {
));
}
+ /**
+ * @param bool $exists
+ * @param string $path
+ */
protected function emit_file_hooks_post($exists, $path) {
if (!$exists) {
\OC_Hook::emit(Filesystem::CLASSNAME, Filesystem::signal_post_create, array(
@@ -384,6 +474,11 @@ class View {
));
}
+ /**
+ * @param string $path
+ * @param mixed $data
+ * @return bool|mixed
+ */
public function file_put_contents($path, $data) {
if (is_resource($data)) { //not having to deal with streams in file_put_contents makes life easier
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
@@ -423,6 +518,10 @@ class View {
}
}
+ /**
+ * @param string $path
+ * @return bool|mixed
+ */
public function unlink($path) {
if ($path === '' || $path === '/') {
// do not allow deleting the root
@@ -446,8 +545,11 @@ class View {
}
/**
- * @param string $path1
- * @param string $path2
+ * Rename/move a file or folder from the source path to target path.
+ *
+ * @param string $path1 source path
+ * @param string $path2 target path
+ *
* @return bool|mixed
*/
public function rename($path1, $path2) {
@@ -489,7 +591,7 @@ class View {
$mount = $manager->find($absolutePath1 . $postFix1);
$storage1 = $mount->getStorage();
$internalPath1 = $mount->getInternalPath($absolutePath1 . $postFix1);
- list(, $internalPath2) = Filesystem::resolvePath($absolutePath2 . $postFix2);
+ list($storage2, $internalPath2) = Filesystem::resolvePath($absolutePath2 . $postFix2);
if ($internalPath1 === '' and $mount instanceof MoveableMount) {
if ($this->isTargetAllowed($absolutePath2)) {
/**
@@ -518,8 +620,10 @@ class View {
} else {
$source = $this->fopen($path1 . $postFix1, 'r');
$target = $this->fopen($path2 . $postFix2, 'w');
- list($count, $result) = \OC_Helper::streamCopy($source, $target);
- $this->touch($path2, $this->filemtime($path1));
+ list(, $result) = \OC_Helper::streamCopy($source, $target);
+ if ($result !== false) {
+ $this->touch($path2, $this->filemtime($path1));
+ }
// close open handle - especially $source is necessary because unlink below will
// throw an exception on windows because the file is locked
@@ -528,6 +632,11 @@ class View {
if ($result !== false) {
$result &= $storage1->unlink($internalPath1);
+ } else {
+ // delete partially written target file
+ $storage2->unlink($internalPath2);
+ // delete cache entry that was created by fopen
+ $storage2->getCache()->remove($internalPath2);
}
}
}
@@ -559,6 +668,15 @@ class View {
}
}
+ /**
+ * Copy a file/folder from the source path to target path
+ *
+ * @param string $path1 source path
+ * @param string $path2 target path
+ * @param bool $preserveMtime whether to preserve mtime on the copy
+ *
+ * @return bool|mixed
+ */
public function copy($path1, $path2, $preserveMtime = false) {
$postFix1 = (substr($path1, -1, 1) === '/') ? '/' : '';
$postFix2 = (substr($path2, -1, 1) === '/') ? '/' : '';
@@ -598,6 +716,11 @@ class View {
list(, $internalPath2) = Filesystem::resolvePath($absolutePath2 . $postFix2);
if ($storage) {
$result = $storage->copy($internalPath1, $internalPath2);
+ if (!$result) {
+ // delete partially written target file
+ $storage->unlink($internalPath2);
+ $storage->getCache()->remove($internalPath2);
+ }
} else {
$result = false;
}
@@ -615,14 +738,20 @@ class View {
}
}
} else {
+ list($storage2, $internalPath2) = Filesystem::resolvePath($absolutePath2 . $postFix2);
$source = $this->fopen($path1 . $postFix1, 'r');
$target = $this->fopen($path2 . $postFix2, 'w');
- list($count, $result) = \OC_Helper::streamCopy($source, $target);
- if($preserveMtime) {
+ list(, $result) = \OC_Helper::streamCopy($source, $target);
+ if($result && $preserveMtime) {
$this->touch($path2, $this->filemtime($path1));
}
fclose($source);
fclose($target);
+ if (!$result) {
+ // delete partially written target file
+ $storage2->unlink($internalPath2);
+ $storage2->getCache()->remove($internalPath2);
+ }
}
}
$this->updater->update($path2);
@@ -684,6 +813,11 @@ class View {
return $this->basicOperation('fopen', $path, $hooks, $mode);
}
+ /**
+ * @param string $path
+ * @return bool|string
+ * @throws \OCP\Files\InvalidPathException
+ */
public function toTmpFile($path) {
$this->assertPathLength($path);
if (Filesystem::isValidPath($path)) {
@@ -701,6 +835,12 @@ class View {
}
}
+ /**
+ * @param string $tmpFile
+ * @param string $path
+ * @return bool|mixed
+ * @throws \OCP\Files\InvalidPathException
+ */
public function fromTmpFile($tmpFile, $path) {
$this->assertPathLength($path);
if (Filesystem::isValidPath($path)) {
@@ -732,11 +872,23 @@ class View {
}
}
+
+ /**
+ * @param string $path
+ * @return mixed
+ * @throws \OCP\Files\InvalidPathException
+ */
public function getMimeType($path) {
$this->assertPathLength($path);
return $this->basicOperation('getMimeType', $path);
}
+ /**
+ * @param string $type
+ * @param string $path
+ * @param bool $raw
+ * @return bool|null|string
+ */
public function hash($type, $path, $raw = false) {
$postFix = (substr($path, -1, 1) === '/') ? '/' : '';
$absolutePath = Filesystem::normalizePath($this->getAbsolutePath($path));
@@ -762,6 +914,11 @@ class View {
return null;
}
+ /**
+ * @param string $path
+ * @return mixed
+ * @throws \OCP\Files\InvalidPathException
+ */
public function free_space($path = '/') {
$this->assertPathLength($path);
return $this->basicOperation('free_space', $path);
@@ -806,7 +963,7 @@ class View {
if (in_array('delete', $hooks) and $result) {
$this->updater->remove($path);
}
- if (in_array('write', $hooks)) {
+ if (in_array('write', $hooks) and $operation !== 'fopen') {
$this->updater->update($path);
}
if (in_array('touch', $hooks)) {
@@ -1373,4 +1530,49 @@ class View {
$mount
);
}
+
+ /**
+ * @return Updater
+ */
+ public function getUpdater() {
+ return $this->updater;
+ }
+
+ /**
+ * @param string $path
+ * @param string $fileName
+ * @throws InvalidPathException
+ */
+ public function verifyPath($path, $fileName) {
+
+ $l10n = \OC::$server->getL10N('lib');
+
+ // verify empty and dot files
+ $trimmed = trim($fileName);
+ if ($trimmed === '') {
+ throw new InvalidPathException($l10n->t('Empty filename is not allowed'));
+ }
+ if ($trimmed === '.' || $trimmed === '..') {
+ throw new InvalidPathException($l10n->t('Dot files are not allowed'));
+ }
+
+ // verify database - e.g. mysql only 3-byte chars
+ if (preg_match('%^(?:
+ \xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
+ | [\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
+ | \xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
+)*$%xs', $fileName)) {
+ throw new InvalidPathException($l10n->t('4-byte characters are not supported in file names'));
+ }
+
+ try {
+ /** @type \OCP\Files\Storage $storage */
+ list($storage, $internalPath) = $this->resolvePath($path);
+ $storage->verifyPath($internalPath, $fileName);
+ } catch (ReservedWordException $ex) {
+ throw new InvalidPathException($l10n->t('File name is a reserved word'));
+ } catch (InvalidCharacterInPathException $ex) {
+ throw new InvalidPathException($l10n->t('File name contains at least one invalid character'));
+ }
+ }
}
diff --git a/lib/private/group.php b/lib/private/group.php
index d6e6e17f881..abca464ddee 100644
--- a/lib/private/group.php
+++ b/lib/private/group.php
@@ -278,7 +278,8 @@ class OC_Group {
$displayNames
);
if ($diff) {
- $displayNames = array_merge($diff, $displayNames);
+ // A fix for LDAP users. array_merge loses keys...
+ $displayNames = $diff + $displayNames;
}
}
return $displayNames;
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 8dcf14fc1d2..e7ba3ac3750 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -87,6 +87,7 @@ class Manager extends PublicEmitter implements IGroupManager {
public function clearBackends() {
$this->backends = array();
$this->cachedGroups = array();
+ $this->cachedUserGroups = array();
}
/**
@@ -217,16 +218,7 @@ class Manager extends PublicEmitter implements IGroupManager {
* @return array with group ids
*/
public function getUserGroupIds($user) {
- $groupIds = array();
- $userId = $user->getUID();
- if (isset($this->cachedUserGroups[$userId])) {
- return array_keys($this->cachedUserGroups[$userId]);
- } else {
- foreach ($this->backends as $backend) {
- $groupIds = array_merge($groupIds, $backend->getUserGroups($userId));
- }
- }
- return $groupIds;
+ return array_keys($this->getUserGroups($user));
}
/**
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 6268bd3d42e..fb7049854bb 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -40,7 +40,8 @@ class OC_Helper {
'application/x-gimp' => 'image',
'application/x-photoshop' => 'image',
- 'application/x-font-ttf' => 'font',
+ 'application/font-sfnt' => 'font',
+ 'application/x-font' => 'font',
'application/font-woff' => 'font',
'application/vnd.ms-fontobject' => 'font',
@@ -288,12 +289,7 @@ class OC_Helper {
**/
public static function userAvatarSet($user) {
$avatar = new \OC_Avatar($user);
- $image = $avatar->get(1);
- if ($image instanceof \OC_Image) {
- return true;
- } else {
- return false;
- }
+ return $avatar->exists();
}
/**
@@ -578,13 +574,23 @@ class OC_Helper {
if (!$source or !$target) {
return array(0, false);
}
+ $bufSize = 8192;
$result = true;
$count = 0;
while (!feof($source)) {
- if (($c = fwrite($target, fread($source, 8192))) === false) {
+ $buf = fread($source, $bufSize);
+ $bytesWritten = fwrite($target, $buf);
+ if ($bytesWritten !== false) {
+ $count += $bytesWritten;
+ }
+ // note: strlen is expensive so only use it when necessary,
+ // on the last block
+ if ($bytesWritten === false
+ || ($bytesWritten < $bufSize && $bytesWritten < strlen($buf))
+ ) {
+ // write error, could be disk full ?
$result = false;
- } else {
- $count += $c;
+ break;
}
}
return array($count, $result);
diff --git a/lib/private/hook.php b/lib/private/hook.php
index c9ca58f779e..00fb4cb0ff5 100644
--- a/lib/private/hook.php
+++ b/lib/private/hook.php
@@ -52,7 +52,7 @@ class OC_Hook{
* @param string $signalclass class name of emitter
* @param string $signalname name of signal
* @param mixed $params default: array() array with additional data
- * @return bool, true if slots exists or false if not
+ * @return bool true if slots exists or false if not
*
* Emits a signal. To get data from the slot use references!
*
diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php
index 1f3482b3514..08c35e4ae08 100644
--- a/lib/private/httphelper.php
+++ b/lib/private/httphelper.php
@@ -214,7 +214,8 @@ class HTTPHelper {
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, count($fields));
- curl_setopt($ch, CURLOPT_POSTFIELDS, $fieldsString);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, (string)$fieldsString);
+ curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
if (is_readable($certBundle)) {
curl_setopt($ch, CURLOPT_CAINFO, $certBundle);
}
diff --git a/lib/private/image.php b/lib/private/image.php
index f5f9a04facc..317b6fde160 100644
--- a/lib/private/image.php
+++ b/lib/private/image.php
@@ -391,7 +391,7 @@ class OC_Image {
$rotate = 90;
break;
}
- if($flip) {
+ if($flip && function_exists('imageflip')) {
imageflip($this->resource, IMG_FLIP_HORIZONTAL);
}
if ($rotate) {
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 4f4a498b739..3956e503767 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -23,6 +23,8 @@
*
*/
+use OC\OCSClient;
+
/**
* This class provides the functionality needed to install, update and remove plugins/apps
*/
@@ -200,20 +202,21 @@ class OC_Installer{
/**
* update an app by it's id
- * @param integer $ocsid
+ *
+ * @param integer $ocsId
* @return bool
* @throws Exception
*/
- public static function updateAppByOCSId($ocsid) {
- $appdata = OC_OCSClient::getApplication($ocsid);
- $download = OC_OCSClient::getApplicationDownload($ocsid, 1);
+ public static function updateAppByOCSId($ocsId) {
+ $appData = OCSClient::getApplication($ocsId);
+ $download = OCSClient::getApplicationDownload($ocsId, 1);
if (isset($download['downloadlink']) && trim($download['downloadlink']) !== '') {
$download['downloadlink'] = str_replace(' ', '%20', $download['downloadlink']);
$info = array(
'source' => 'http',
'href' => $download['downloadlink'],
- 'appdata' => $appdata
+ 'appdata' => $appData
);
} else {
throw new \Exception('Could not fetch app info!');
@@ -241,7 +244,7 @@ class OC_Installer{
if(!isset($data['href'])) {
throw new \Exception($l->t("No href specified when installing app from http"));
}
- copy($data['href'], $path);
+ file_put_contents($path, \OC_Util::getUrlContent($data['href']));
}else{
if(!isset($data['path'])) {
throw new \Exception($l->t("No path specified when installing app from local file"));
@@ -283,7 +286,7 @@ class OC_Installer{
* @return array
* @throws \Exception
*/
- public static function checkAppsIntegrity($data = array(), $extractDir, $path, $isShipped=false) {
+ public static function checkAppsIntegrity($data, $extractDir, $path, $isShipped=false) {
$l = \OC::$server->getL10N('lib');
//load the info.xml file of the app
if(!is_file($extractDir.'/appinfo/info.xml')) {
@@ -308,7 +311,7 @@ class OC_Installer{
}
$info=OC_App::getAppInfo($extractDir.'/appinfo/info.xml', true);
// check the code for not allowed calls
- if(!$isShipped && !OC_Installer::checkCode($info['id'], $extractDir)) {
+ if(!$isShipped && !OC_Installer::checkCode($extractDir)) {
OC_Helper::rmdirr($extractDir);
throw new \Exception($l->t("App can't be installed because of not allowed code in the App"));
}
@@ -368,7 +371,7 @@ class OC_Installer{
if($ocsid<>'') {
- $ocsdata=OC_OCSClient::getApplication($ocsid);
+ $ocsdata=OCSClient::getApplication($ocsid);
$ocsversion= (string) $ocsdata['version'];
$currentversion=OC_App::getAppVersion($app);
if (version_compare($ocsversion, $currentversion, '>')) {
@@ -511,7 +514,7 @@ class OC_Installer{
OC_Appconfig::setValue($app, 'ocsid', $info['ocsid']);
}
- //set remote/public handelers
+ //set remote/public handlers
foreach($info['remote'] as $name=>$path) {
OCP\CONFIG::setAppValue('core', 'remote_'.$name, $app.'/'.$path);
}
@@ -529,59 +532,15 @@ class OC_Installer{
* @param string $folder the folder of the app to check
* @return boolean true for app is o.k. and false for app is not o.k.
*/
- public static function checkCode($appname, $folder) {
- $blacklist=array(
- // classes replaced by the public api
- 'OC_API::',
- 'OC_App::',
- 'OC_AppConfig::',
- 'OC_Avatar',
- 'OC_BackgroundJob::',
- 'OC_Config::',
- 'OC_DB::',
- 'OC_Files::',
- 'OC_Helper::',
- 'OC_Hook::',
- 'OC_Image::',
- 'OC_JSON::',
- 'OC_L10N::',
- 'OC_Log::',
- 'OC_Mail::',
- 'OC_Preferences::',
- 'OC_Request::',
- 'OC_Response::',
- 'OC_Template::',
- 'OC_User::',
- 'OC_Util::',
- );
-
+ public static function checkCode($folder) {
// is the code checker enabled?
- if(OC_Config::getValue('appcodechecker', false)) {
- // check if grep is installed
- $grep = \OC_Helper::findBinaryPath('grep');
- if (!$grep) {
- OC_Log::write('core',
- 'grep not installed. So checking the code of the app "'.$appname.'" was not possible',
- OC_Log::ERROR);
- return true;
- }
-
- // iterate the bad patterns
- foreach($blacklist as $bl) {
- $cmd = 'grep --include \\*.php -ri '.escapeshellarg($bl).' '.$folder.'';
- $result = exec($cmd);
- // bad pattern found
- if($result<>'') {
- OC_Log::write('core',
- 'App "'.$appname.'" is using a not allowed call "'.$bl.'". Installation refused.',
- OC_Log::ERROR);
- return false;
- }
- }
- return true;
-
- }else{
+ if(!OC_Config::getValue('appcodechecker', false)) {
return true;
}
+
+ $codeChecker = new \OC\App\CodeChecker();
+ $errors = $codeChecker->analyseFolder($folder);
+
+ return empty($errors);
}
}
diff --git a/lib/private/json.php b/lib/private/json.php
index f2719dd2bc7..9117abf7fb9 100644
--- a/lib/private/json.php
+++ b/lib/private/json.php
@@ -6,10 +6,15 @@
* See the COPYING-README file.
*/
+/**
+ * Class OC_JSON
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
class OC_JSON{
static protected $send_content_type_header = false;
/**
* set Content-Type header to jsonrequest
+ * @deprecated Use a AppFramework JSONResponse instead
*/
public static function setContentTypeHeader($type='application/json') {
if (!self::$send_content_type_header) {
@@ -20,9 +25,10 @@ class OC_JSON{
}
/**
- * Check if the app is enabled, send json error msg if not
- * @param string $app
- */
+ * Check if the app is enabled, send json error msg if not
+ * @param string $app
+ * @deprecated Use the AppFramework instead. It will automatically check if the app is enabled.
+ */
public static function checkAppEnabled($app) {
if( !OC_App::isEnabled($app)) {
$l = \OC::$server->getL10N('lib');
@@ -32,8 +38,9 @@ class OC_JSON{
}
/**
- * Check if the user is logged in, send json error msg if not
- */
+ * Check if the user is logged in, send json error msg if not
+ * @deprecated Use annotation based ACLs from the AppFramework instead
+ */
public static function checkLoggedIn() {
if( !OC_User::isLoggedIn()) {
$l = \OC::$server->getL10N('lib');
@@ -44,6 +51,7 @@ class OC_JSON{
/**
* Check an ajax get/post call if the request token is valid, send json error msg if not.
+ * @deprecated Use annotation based CSRF checks from the AppFramework instead
*/
public static function callCheck() {
if( !OC_Util::isCallRegistered()) {
@@ -54,8 +62,9 @@ class OC_JSON{
}
/**
- * Check if the user is a admin, send json error msg if not.
- */
+ * Check if the user is a admin, send json error msg if not.
+ * @deprecated Use annotation based ACLs from the AppFramework instead
+ */
public static function checkAdminUser() {
if( !OC_User::isAdminUser(OC_User::getUser())) {
$l = \OC::$server->getL10N('lib');
@@ -67,6 +76,7 @@ class OC_JSON{
/**
* Check is a given user exists - send json error msg if not
* @param string $user
+ * @deprecated Use a AppFramework JSONResponse instead
*/
public static function checkUserExists($user) {
if (!OCP\User::userExists($user)) {
@@ -77,10 +87,10 @@ class OC_JSON{
}
-
/**
- * Check if the user is a subadmin, send json error msg if not
- */
+ * Check if the user is a subadmin, send json error msg if not
+ * @deprecated Use annotation based ACLs from the AppFramework instead
+ */
public static function checkSubAdminUser() {
if(!OC_SubAdmin::isSubAdmin(OC_User::getUser())) {
$l = \OC::$server->getL10N('lib');
@@ -90,16 +100,18 @@ class OC_JSON{
}
/**
- * Send json error msg
- */
+ * Send json error msg
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function error($data = array()) {
$data['status'] = 'error';
self::encodedPrint($data);
}
/**
- * Send json success msg
- */
+ * Send json success msg
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function success($data = array()) {
$data['status'] = 'success';
self::encodedPrint($data);
@@ -115,8 +127,9 @@ class OC_JSON{
}
/**
- * Encode and print $data in json format
- */
+ * Encode and print $data in json format
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function encodedPrint($data, $setContentType=true) {
if($setContentType) {
self::setContentTypeHeader();
@@ -126,6 +139,7 @@ class OC_JSON{
/**
* Encode JSON
+ * @deprecated Use a AppFramework JSONResponse instead
*/
public static function encode($data) {
if (is_array($data)) {
diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index 6c66bee3e79..4fd4a617be8 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -80,6 +80,48 @@ class OC_L10N implements \OCP\IL10N {
}
/**
+ * @param $app
+ * @return string
+ */
+ public static function setLanguageFromRequest($app = null) {
+ if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
+ if (is_array($app)) {
+ $available = $app;
+ } else {
+ $available = self::findAvailableLanguages($app);
+ }
+
+ // E.g. make sure that 'de' is before 'de_DE'.
+ sort($available);
+
+ $preferences = preg_split('/,\s*/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
+ foreach ($preferences as $preference) {
+ list($preferred_language) = explode(';', $preference);
+ $preferred_language = str_replace('-', '_', $preferred_language);
+ foreach ($available as $available_language) {
+ if ($preferred_language === strtolower($available_language)) {
+ if (is_null($app)) {
+ self::$language = $available_language;
+ }
+ return $available_language;
+ }
+ }
+ foreach ($available as $available_language) {
+ if (substr($preferred_language, 0, 2) === $available_language) {
+ if (is_null($app)) {
+ self::$language = $available_language;
+ }
+ return $available_language;
+ }
+ }
+ }
+ }
+
+ // Last try: English
+ return 'en';
+ }
+
+ /**
* @param $transFile
* @param bool $mergeTranslations
* @return bool
@@ -358,24 +400,15 @@ class OC_L10N implements \OCP\IL10N {
self::$language = $lang;
}
-
/**
- * find the best language
- *
- * @param array|string $app details below
- *
- * If $app is an array, ownCloud assumes that these are the available
- * languages. Otherwise ownCloud tries to find the files in the l10n
- * folder.
+ * The code (en, de, ...) of the language that is used for this OC_L10N object
*
- * If nothing works it returns 'en'
* @return string language
*/
- public function getLanguageCode($app=null) {
- return self::findLanguage($app);
+ public function getLanguageCode() {
+ return $this->lang ? $this->lang : self::findLanguage();
}
-
/**
* find the best language
* @param array|string $app details below
@@ -412,41 +445,7 @@ class OC_L10N implements \OCP\IL10N {
return $default_language;
}
- if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
- if(is_array($app)) {
- $available = $app;
- } else {
- $available = self::findAvailableLanguages($app);
- }
-
- // E.g. make sure that 'de' is before 'de_DE'.
- sort($available);
-
- $preferences = preg_split('/,\s*/', strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']));
- foreach($preferences as $preference) {
- list($preferred_language) = explode(';', $preference);
- $preferred_language = str_replace('-', '_', $preferred_language);
- foreach($available as $available_language) {
- if ($preferred_language === strtolower($available_language)) {
- if (is_null($app)) {
- self::$language = $available_language;
- }
- return $available_language;
- }
- }
- foreach($available as $available_language) {
- if (substr($preferred_language, 0, 2) === $available_language) {
- if (is_null($app)) {
- self::$language = $available_language;
- }
- return $available_language;
- }
- }
- }
- }
-
- // Last try: English
- return 'en';
+ return self::setLanguageFromRequest($app);
}
/**
@@ -515,7 +514,7 @@ class OC_L10N implements \OCP\IL10N {
* @throws \Punic\Exception\ValueNotInList
*/
public function getDateFormat() {
- $locale = self::findLanguage();
+ $locale = $this->getLanguageCode();
return Punic\Calendar::getDateFormat('short', $locale);
}
@@ -523,7 +522,7 @@ class OC_L10N implements \OCP\IL10N {
* @return int
*/
public function getFirstWeekDay() {
- $locale = self::findLanguage();
+ $locale = $this->getLanguageCode();
return Punic\Calendar::getFirstWeekday($locale);
}
}
diff --git a/lib/private/legacy/preferences.php b/lib/private/legacy/preferences.php
deleted file mode 100644
index 907aafbc915..00000000000
--- a/lib/private/legacy/preferences.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-/**
- * ownCloud
- *
- * @author Frank Karlitschek
- * @author Jakob Sack
- * @copyright 2012 Frank Karlitschek frank@owncloud.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-/**
- * This class provides an easy way for storing user preferences.
- * @deprecated use \OCP\IConfig methods instead
- */
-class OC_Preferences{
- /**
- * Get the available keys for an app
- * @param string $user user
- * @param string $app the app we are looking for
- * @return array an array of key names
- * @deprecated use getUserKeys of \OCP\IConfig instead
- *
- * This function gets all keys of an app of an user. Please note that the
- * values are not returned.
- */
- public static function getKeys( $user, $app ) {
- return \OC::$server->getConfig()->getUserKeys($user, $app);
- }
-
- /**
- * Gets the preference
- * @param string $user user
- * @param string $app app
- * @param string $key key
- * @param string $default = null, default value if the key does not exist
- * @return string the value or $default
- * @deprecated use getUserValue of \OCP\IConfig instead
- *
- * This function gets a value from the preferences table. If the key does
- * not exist the default value will be returned
- */
- public static function getValue( $user, $app, $key, $default = null ) {
- return \OC::$server->getConfig()->getUserValue($user, $app, $key, $default);
- }
-
- /**
- * sets a value in the preferences
- * @param string $user user
- * @param string $app app
- * @param string $key key
- * @param string $value value
- * @param string $preCondition only set value if the key had a specific value before
- * @return bool true if value was set, otherwise false
- * @deprecated use setUserValue of \OCP\IConfig instead
- *
- * Adds a value to the preferences. If the key did not exist before, it
- * will be added automagically.
- */
- public static function setValue( $user, $app, $key, $value, $preCondition = null ) {
- try {
- \OC::$server->getConfig()->setUserValue($user, $app, $key, $value, $preCondition);
- return true;
- } catch(\OCP\PreConditionNotMetException $e) {
- return false;
- }
- }
-
- /**
- * Deletes a key
- * @param string $user user
- * @param string $app app
- * @param string $key key
- * @return bool true
- * @deprecated use deleteUserValue of \OCP\IConfig instead
- *
- * Deletes a key.
- */
- public static function deleteKey( $user, $app, $key ) {
- \OC::$server->getConfig()->deleteUserValue($user, $app, $key);
- return true;
- }
-
- /**
- * Remove user from preferences
- * @param string $user user
- * @return bool
- * @deprecated use deleteUser of \OCP\IConfig instead
- *
- * Removes all keys in preferences belonging to the user.
- */
- public static function deleteUser( $user ) {
- \OC::$server->getConfig()->deleteAllUserValues($user);
- return true;
- }
-
- /**
- * Remove app from all users
- * @param string $app app
- * @return bool
- * @deprecated use deleteAppFromAllUsers of \OCP\IConfig instead
- *
- * Removes all keys in preferences belonging to the app.
- */
- public static function deleteAppFromAllUsers( $app ) {
- \OC::$server->getConfig()->deleteAppFromAllUsers($app);
- return true;
- }
-}
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php
index c8ae61032aa..62c2da6febe 100644
--- a/lib/private/log/owncloud.php
+++ b/lib/private/log/owncloud.php
@@ -68,8 +68,9 @@ class OC_Log_Owncloud {
$timezone = new DateTimeZone('UTC');
}
$time = new DateTime(null, $timezone);
- $reqId = \OC_Request::getRequestID();
- $remoteAddr = \OC_Request::getRemoteAddress();
+ $request = \OC::$server->getRequest();
+ $reqId = $request->getId();
+ $remoteAddr = $request->getRemoteAddress();
// remove username/passwords from URLs before writing the to the log file
$time = $time->format($format);
if($minLevel == OC_Log::DEBUG) {
diff --git a/lib/private/memcache/apcu.php b/lib/private/memcache/apcu.php
index 7f780f32718..1043690a361 100644
--- a/lib/private/memcache/apcu.php
+++ b/lib/private/memcache/apcu.php
@@ -14,6 +14,8 @@ class APCu extends APC {
return false;
} elseif (!ini_get('apc.enable_cli') && \OC::$CLI) {
return false;
+ } elseif (version_compare(phpversion('apc'), '4.0.6') === -1) {
+ return false;
} else {
return true;
}
diff --git a/lib/private/memcache/arraycache.php b/lib/private/memcache/arraycache.php
new file mode 100644
index 00000000000..9456c0f80c6
--- /dev/null
+++ b/lib/private/memcache/arraycache.php
@@ -0,0 +1,71 @@
+<?php
+/**
+ * Copyright (c) 2015 Joas Schilling <nickvergessen@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Memcache;
+
+class ArrayCache extends Cache {
+ /** @var array Array with the cached data */
+ protected $cachedData = array();
+
+ /**
+ * {@inheritDoc}
+ */
+ public function get($key) {
+ if ($this->hasKey($key)) {
+ return $this->cachedData[$key];
+ }
+ return null;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function set($key, $value, $ttl = 0) {
+ $this->cachedData[$key] = $value;
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function hasKey($key) {
+ return isset($this->cachedData[$key]);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function remove($key) {
+ unset($this->cachedData[$key]);
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function clear($prefix = '') {
+ if ($prefix === '') {
+ $this->cachedData = [];
+ return true;
+ }
+
+ foreach ($this->cachedData as $key => $value) {
+ if (strpos($key, $prefix) === 0) {
+ $this->remove($key);
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ static public function isAvailable() {
+ return true;
+ }
+}
diff --git a/lib/private/memcache/cache.php b/lib/private/memcache/cache.php
index 03671b3f240..c606d94fa51 100644
--- a/lib/private/memcache/cache.php
+++ b/lib/private/memcache/cache.php
@@ -8,7 +8,7 @@
namespace OC\Memcache;
-abstract class Cache implements \ArrayAccess {
+abstract class Cache implements \ArrayAccess, \OCP\ICache {
/**
* @var string $prefix
*/
diff --git a/lib/private/memcache/factory.php b/lib/private/memcache/factory.php
index 1e663eecfe1..f70f8c7c27a 100644
--- a/lib/private/memcache/factory.php
+++ b/lib/private/memcache/factory.php
@@ -11,77 +11,96 @@ namespace OC\Memcache;
use \OCP\ICacheFactory;
class Factory implements ICacheFactory {
+ const NULL_CACHE = '\\OC\\Memcache\\Null';
+
/**
* @var string $globalPrefix
*/
private $globalPrefix;
/**
+ * @var string $localCacheClass
+ */
+ private $localCacheClass;
+
+ /**
+ * @var string $distributedCacheClass
+ */
+ private $distributedCacheClass;
+
+ /**
* @param string $globalPrefix
+ * @param string|null $localCacheClass
+ * @param string|null $distributedCacheClass
*/
- public function __construct($globalPrefix) {
+ public function __construct($globalPrefix,
+ $localCacheClass = null, $distributedCacheClass = null)
+ {
$this->globalPrefix = $globalPrefix;
+
+ if (!($localCacheClass && $localCacheClass::isAvailable())) {
+ $localCacheClass = self::NULL_CACHE;
+ }
+ if (!($distributedCacheClass && $distributedCacheClass::isAvailable())) {
+ $distributedCacheClass = $localCacheClass;
+ }
+ $this->localCacheClass = $localCacheClass;
+ $this->distributedCacheClass = $distributedCacheClass;
}
/**
- * get a cache instance, or Null backend if no backend available
+ * create a distributed cache instance
*
* @param string $prefix
* @return \OC\Memcache\Cache
*/
- function create($prefix = '') {
- $prefix = $this->globalPrefix . '/' . $prefix;
- if (XCache::isAvailable()) {
- return new XCache($prefix);
- } elseif (APCu::isAvailable()) {
- return new APCu($prefix);
- } elseif (APC::isAvailable()) {
- return new APC($prefix);
- } elseif (Redis::isAvailable()) {
- return new Redis($prefix);
- } elseif (Memcached::isAvailable()) {
- return new Memcached($prefix);
- } else {
- return new Null($prefix);
- }
+ public function createDistributed($prefix = '') {
+ return new $this->distributedCacheClass($this->globalPrefix . '/' . $prefix);
+ }
+
+ /**
+ * create a local cache instance
+ *
+ * @param string $prefix
+ * @return \OC\Memcache\Cache
+ */
+ public function createLocal($prefix = '') {
+ return new $this->localCacheClass($this->globalPrefix . '/' . $prefix);
+ }
+
+ /**
+ * @see \OC\Memcache\Factory::createDistributed()
+ * @param string $prefix
+ * @return \OC\Memcache\Cache
+ */
+ public function create($prefix = '') {
+ return $this->createDistributed($prefix);
}
/**
- * check if there is a memcache backend available
+ * check memcache availability
*
* @return bool
*/
public function isAvailable() {
- return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable() || Redis::isAvailable() || Memcached::isAvailable();
+ return ($this->distributedCacheClass !== self::NULL_CACHE);
}
/**
- * get a in-server cache instance, will return null if no backend is available
- *
+ * @see \OC\Memcache\Factory::createLocal()
* @param string $prefix
- * @return null|Cache
+ * @return \OC\Memcache\Cache|null
*/
public function createLowLatency($prefix = '') {
- $prefix = $this->globalPrefix . '/' . $prefix;
- if (XCache::isAvailable()) {
- return new XCache($prefix);
- } elseif (APCu::isAvailable()) {
- return new APCu($prefix);
- } elseif (APC::isAvailable()) {
- return new APC($prefix);
- } else {
- return null;
- }
+ return $this->createLocal($prefix);
}
/**
- * check if there is a in-server backend available
+ * check local memcache availability
*
* @return bool
*/
public function isAvailableLowLatency() {
- return XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable();
+ return ($this->localCacheClass !== self::NULL_CACHE);
}
-
-
}
diff --git a/lib/private/mimetypes.list.php b/lib/private/mimetypes.list.php
index 4f11829859a..265fffa7db3 100644
--- a/lib/private/mimetypes.list.php
+++ b/lib/private/mimetypes.list.php
@@ -104,9 +104,10 @@ return array(
'oga' => array('audio/ogg', null),
'ogg' => array('audio/ogg', null),
'ogv' => array('video/ogg', null),
- 'otf' => array('font/opentype', null),
+ 'otf' => array('application/font-sfnt', null),
'pages' => array('application/x-iwork-pages-sffpages', null),
'pdf' => array('application/pdf', null),
+ 'pfb' => array('application/x-font', null),
'php' => array('application/x-php', null),
'pl' => array('application/x-perl', null),
'png' => array('image/png', null),
@@ -137,7 +138,7 @@ return array(
'tgz' => array('application/x-compressed', null),
'tiff' => array('image/tiff', null),
'tif' => array('image/tiff', null),
- 'ttf' => array('application/x-font-ttf', null),
+ 'ttf' => array('application/font-sfnt', null),
'txt' => array('text/plain', null),
'vcard' => array('text/vcard', null),
'vcf' => array('text/vcard', null),
diff --git a/lib/private/naturalsort.php b/lib/private/naturalsort.php
index 6e259630f79..57947f56afa 100644
--- a/lib/private/naturalsort.php
+++ b/lib/private/naturalsort.php
@@ -12,6 +12,20 @@ namespace OC;
class NaturalSort {
private static $instance;
private $collator;
+ private $cache = array();
+
+ /**
+ * Instantiate a new \OC\NaturalSort instance.
+ * @param object $injectedCollator
+ */
+ public function __construct($injectedCollator = null) {
+ // inject an instance of \Collator('en_US') to force using the php5-intl Collator
+ // or inject an instance of \OC\NaturalSort_DefaultCollator to force using Owncloud's default collator
+ if (isset($injectedCollator)) {
+ $this->collator = $injectedCollator;
+ \OC_Log::write('core', 'forced use of '.get_class($injectedCollator), \OC_Log::DEBUG);
+ }
+ }
/**
* Split the given string in chunks of numbers and strings
@@ -21,13 +35,15 @@ class NaturalSort {
private function naturalSortChunkify($t) {
// Adapted and ported to PHP from
// http://my.opera.com/GreyWyvern/blog/show.dml/1671288
+ if (isset($this->cache[$t])) {
+ return $this->cache[$t];
+ }
$tz = array();
$x = 0;
$y = -1;
$n = null;
- $length = strlen($t);
- while ($x < $length) {
+ while (isset($t[$x])) {
$c = $t[$x];
// only include the dot in strings
$m = ((!$n && $c === '.') || ($c >= '0' && $c <= '9'));
@@ -40,6 +56,7 @@ class NaturalSort {
$tz[$y] .= $c;
$x++;
}
+ $this->cache[$t] = $tz;
return $tz;
}
@@ -75,14 +92,13 @@ class NaturalSort {
// instead of ["test.txt", "test (2).txt"]
$aa = self::naturalSortChunkify($a);
$bb = self::naturalSortChunkify($b);
- $alen = count($aa);
- $blen = count($bb);
- for ($x = 0; $x < $alen && $x < $blen; $x++) {
+ for ($x = 0; isset($aa[$x]) && isset($bb[$x]); $x++) {
$aChunk = $aa[$x];
$bChunk = $bb[$x];
if ($aChunk !== $bChunk) {
- if (is_numeric($aChunk) && is_numeric($bChunk)) {
+ // test first character (character comparison, not number comparison)
+ if ($aChunk[0] >= '0' && $aChunk[0] <= '9' && $bChunk[0] >= '0' && $bChunk[0] <= '9') {
$aNum = (int)$aChunk;
$bNum = (int)$bChunk;
return $aNum - $bNum;
@@ -90,7 +106,7 @@ class NaturalSort {
return self::getCollator()->compare($aChunk, $bChunk);
}
}
- return $alen - $blen;
+ return count($aa) - count($bb);
}
/**
diff --git a/lib/private/naturalsort_defaultcollator.php b/lib/private/naturalsort_defaultcollator.php
index e1007f8d7b4..63136aac749 100644
--- a/lib/private/naturalsort_defaultcollator.php
+++ b/lib/private/naturalsort_defaultcollator.php
@@ -11,9 +11,13 @@ namespace OC;
class NaturalSort_DefaultCollator {
public function compare($a, $b) {
- if ($a === $b) {
- return 0;
+ $result = strcasecmp($a, $b);
+ if ($result === 0) {
+ if ($a === $b) {
+ return 0;
+ }
+ return ($a > $b) ? -1 : 1;
}
- return ($a < $b) ? -1 : 1;
+ return ($result < 0) ? -1 : 1;
}
}
diff --git a/lib/private/ocs.php b/lib/private/ocs.php
index 214b28fa22c..d43811e339b 100644
--- a/lib/private/ocs.php
+++ b/lib/private/ocs.php
@@ -76,7 +76,6 @@ class OC_OCS {
$method='get';
}elseif($_SERVER['REQUEST_METHOD'] == 'PUT') {
$method='put';
- parse_str(file_get_contents("php://input"), $put_vars);
}elseif($_SERVER['REQUEST_METHOD'] == 'POST') {
$method='post';
}else{
@@ -121,7 +120,7 @@ class OC_OCS {
* @param int|string $itemsperpage
* @return string xml/json
*/
- private static function generateXml($format, $status, $statuscode,
+ public static function generateXml($format, $status, $statuscode,
$message, $data=array(), $tag='', $tagattribute='', $dimension=-1, $itemscount='', $itemsperpage='') {
if($format=='json') {
$json=array();
diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index 7ce6723128b..f27ab487efc 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -21,19 +21,22 @@
*
*/
+namespace OC;
+
/**
* This class provides an easy way for apps to store config values in the
* database.
*/
-class OC_OCSClient{
+class OCSClient {
/**
* Returns whether the AppStore is enabled (i.e. because the AppStore is disabled for EE)
+ *
* @return bool
*/
- protected static function isAppstoreEnabled() {
- if(OC::$server->getConfig()->getSystemValue('appstoreenabled', true) === false OR OC_Util::getEditionString() !== '') {
+ public static function isAppStoreEnabled() {
+ if (\OC::$server->getConfig()->getSystemValue('appstoreenabled', true) === false ) {
return false;
}
@@ -42,53 +45,44 @@ class OC_OCSClient{
/**
* Get the url of the OCS AppStore server.
+ *
* @return string of the AppStore server
*
* This function returns the url of the OCS AppStore server. It´s possible
* to set it in the config file or it will fallback to the default
*/
private static function getAppStoreURL() {
- return OC::$server->getConfig()->getSystemValue('appstoreurl', 'https://api.owncloud.com/v1');
- }
-
- /**
- * Get the content of an OCS url call.
- * @return string of the response
- * This function calls an OCS server and returns the response. It also sets a sane timeout
- * @param string $url
- */
- private static function getOCSresponse($url) {
- $data = \OC_Util::getUrlContent($url);
- return($data);
+ return \OC::$server->getConfig()->getSystemValue('appstoreurl', 'https://api.owncloud.com/v1');
}
/**
* Get all the categories from the OCS server
+ *
* @return array|null an array of category ids or null
* @note returns NULL if config value appstoreenabled is set to false
* This function returns a list of all the application categories on the OCS server
*/
public static function getCategories() {
- if(!self::isAppstoreEnabled()) {
+ if (!self::isAppStoreEnabled()) {
return null;
}
- $url=OC_OCSClient::getAppStoreURL().'/content/categories';
- $xml=OC_OCSClient::getOCSresponse($url);
- if($xml==false) {
+ $url = self::getAppStoreURL() . '/content/categories';
+ $xml = \OC::$server->getHTTPHelper()->getUrlContent($url);
+ if ($xml == false) {
return null;
}
$loadEntities = libxml_disable_entity_loader(true);
- $data = simplexml_load_string($xml);
+ $data = simplexml_load_string($xml);
libxml_disable_entity_loader($loadEntities);
- $tmp=$data->data;
- $cats=array();
+ $tmp = $data->data;
+ $cats = array();
- foreach($tmp->category as $value) {
+ foreach ($tmp->category as $value) {
- $id= (int) $value->id;
- $name= (string) $value->name;
- $cats[$id]=$name;
+ $id = (int)$value->id;
+ $name = (string)$value->name;
+ $cats[$id] = $name;
}
@@ -97,6 +91,7 @@ class OC_OCSClient{
/**
* Get all the applications from the OCS server
+ *
* @return array|null an array of application data or null
*
* This function returns a list of all the applications on the OCS server
@@ -105,24 +100,24 @@ class OC_OCSClient{
* @param string $filter
*/
public static function getApplications($categories, $page, $filter) {
- if(!self::isAppstoreEnabled()) {
- return(array());
+ if (!self::isAppStoreEnabled()) {
+ return (array());
}
- if(is_array($categories)) {
- $categoriesstring=implode('x', $categories);
- }else{
- $categoriesstring=$categories;
+ if (is_array($categories)) {
+ $categoriesString = implode('x', $categories);
+ } else {
+ $categoriesString = $categories;
}
- $version='&version='.implode('x', \OC_Util::getVersion());
- $filterurl='&filter='.urlencode($filter);
- $url=OC_OCSClient::getAppStoreURL().'/content/data?categories='.urlencode($categoriesstring)
- .'&sortmode=new&page='.urlencode($page).'&pagesize=100'.$filterurl.$version;
- $apps=array();
- $xml=OC_OCSClient::getOCSresponse($url);
+ $version = '&version=' . implode('x', \OC_Util::getVersion());
+ $filterUrl = '&filter=' . urlencode($filter);
+ $url = self::getAppStoreURL() . '/content/data?categories=' . urlencode($categoriesString)
+ . '&sortmode=new&page=' . urlencode($page) . '&pagesize=100' . $filterUrl . $version;
+ $apps = array();
+ $xml = \OC::$server->getHTTPHelper()->getUrlContent($url);
- if($xml==false) {
+ if ($xml == false) {
return null;
}
$loadEntities = libxml_disable_entity_loader(true);
@@ -131,25 +126,25 @@ class OC_OCSClient{
$tmp = $data->data->content;
$tmpCount = count($tmp);
- for($i = 0; $i < $tmpCount; $i++) {
- $app=array();
- $app['id']=(string)$tmp[$i]->id;
- $app['name']=(string)$tmp[$i]->name;
- $app['label']=(string)$tmp[$i]->label;
- $app['version']=(string)$tmp[$i]->version;
- $app['type']=(string)$tmp[$i]->typeid;
- $app['typename']=(string)$tmp[$i]->typename;
- $app['personid']=(string)$tmp[$i]->personid;
- $app['license']=(string)$tmp[$i]->license;
- $app['detailpage']=(string)$tmp[$i]->detailpage;
- $app['preview']=(string)$tmp[$i]->smallpreviewpic1;
- $app['preview-full']=(string)$tmp[$i]->previewpic1;
- $app['changed']=strtotime($tmp[$i]->changed);
- $app['description']=(string)$tmp[$i]->description;
- $app['score']=(string)$tmp[$i]->score;
+ for ($i = 0; $i < $tmpCount; $i++) {
+ $app = array();
+ $app['id'] = (string)$tmp[$i]->id;
+ $app['name'] = (string)$tmp[$i]->name;
+ $app['label'] = (string)$tmp[$i]->label;
+ $app['version'] = (string)$tmp[$i]->version;
+ $app['type'] = (string)$tmp[$i]->typeid;
+ $app['typename'] = (string)$tmp[$i]->typename;
+ $app['personid'] = (string)$tmp[$i]->personid;
+ $app['license'] = (string)$tmp[$i]->license;
+ $app['detailpage'] = (string)$tmp[$i]->detailpage;
+ $app['preview'] = (string)$tmp[$i]->smallpreviewpic1;
+ $app['preview-full'] = (string)$tmp[$i]->previewpic1;
+ $app['changed'] = strtotime($tmp[$i]->changed);
+ $app['description'] = (string)$tmp[$i]->description;
+ $app['score'] = (string)$tmp[$i]->score;
$app['downloads'] = (int)$tmp[$i]->downloads;
- $apps[]=$app;
+ $apps[] = $app;
}
return $apps;
}
@@ -157,53 +152,55 @@ class OC_OCSClient{
/**
* Get an the applications from the OCS server
+ *
* @param string $id
* @return array|null an array of application data or null
*
* This function returns an applications from the OCS server
*/
public static function getApplication($id) {
- if(!self::isAppstoreEnabled()) {
+ if (!self::isAppStoreEnabled()) {
return null;
}
- $url=OC_OCSClient::getAppStoreURL().'/content/data/'.urlencode($id);
- $xml=OC_OCSClient::getOCSresponse($url);
+ $url = self::getAppStoreURL() . '/content/data/' . urlencode($id);
+ $xml = \OC::$server->getHTTPHelper()->getUrlContent($url);
- if($xml==false) {
- OC_Log::write('core', 'Unable to parse OCS content for app ' . $id, OC_Log::FATAL);
+ if ($xml == false) {
+ \OC_Log::write('core', 'Unable to parse OCS content for app ' . $id, \OC_Log::FATAL);
return null;
}
$loadEntities = libxml_disable_entity_loader(true);
$data = simplexml_load_string($xml);
libxml_disable_entity_loader($loadEntities);
- $tmp=$data->data->content;
+ $tmp = $data->data->content;
if (is_null($tmp)) {
- OC_Log::write('core', 'Invalid OCS content returned for app ' . $id, OC_Log::FATAL);
+ \OC_Log::write('core', 'Invalid OCS content returned for app ' . $id, \OC_Log::FATAL);
return null;
}
- $app=array();
- $app['id']=$tmp->id;
- $app['name']=$tmp->name;
- $app['version']=$tmp->version;
- $app['type']=$tmp->typeid;
- $app['label']=$tmp->label;
- $app['typename']=$tmp->typename;
- $app['personid']=$tmp->personid;
- $app['detailpage']=$tmp->detailpage;
- $app['preview1']=$tmp->smallpreviewpic1;
- $app['preview2']=$tmp->smallpreviewpic2;
- $app['preview3']=$tmp->smallpreviewpic3;
- $app['changed']=strtotime($tmp->changed);
- $app['description']=$tmp->description;
- $app['detailpage']=$tmp->detailpage;
- $app['score']=$tmp->score;
+ $app = array();
+ $app['id'] = $tmp->id;
+ $app['name'] = $tmp->name;
+ $app['version'] = $tmp->version;
+ $app['type'] = $tmp->typeid;
+ $app['label'] = $tmp->label;
+ $app['typename'] = $tmp->typename;
+ $app['personid'] = $tmp->personid;
+ $app['detailpage'] = $tmp->detailpage;
+ $app['preview1'] = $tmp->smallpreviewpic1;
+ $app['preview2'] = $tmp->smallpreviewpic2;
+ $app['preview3'] = $tmp->smallpreviewpic3;
+ $app['changed'] = strtotime($tmp->changed);
+ $app['description'] = $tmp->description;
+ $app['detailpage'] = $tmp->detailpage;
+ $app['score'] = $tmp->score;
return $app;
}
/**
* Get the download url for an application from the OCS server
+ *
* @return array|null an array of application data or null
*
* This function returns an download url for an applications from the OCS server
@@ -211,26 +208,26 @@ class OC_OCSClient{
* @param integer $item
*/
public static function getApplicationDownload($id, $item) {
- if(!self::isAppstoreEnabled()) {
+ if (!self::isAppStoreEnabled()) {
return null;
}
- $url=OC_OCSClient::getAppStoreURL().'/content/download/'.urlencode($id).'/'.urlencode($item);
- $xml=OC_OCSClient::getOCSresponse($url);
+ $url = self::getAppStoreURL() . '/content/download/' . urlencode($id) . '/' . urlencode($item);
+ $xml = \OC::$server->getHTTPHelper()->getUrlContent($url);
- if($xml==false) {
- OC_Log::write('core', 'Unable to parse OCS content', OC_Log::FATAL);
+ if ($xml == false) {
+ \OC_Log::write('core', 'Unable to parse OCS content', \OC_Log::FATAL);
return null;
}
$loadEntities = libxml_disable_entity_loader(true);
$data = simplexml_load_string($xml);
libxml_disable_entity_loader($loadEntities);
- $tmp=$data->data->content;
- $app=array();
- if(isset($tmp->downloadlink)) {
- $app['downloadlink']=$tmp->downloadlink;
- }else{
- $app['downloadlink']='';
+ $tmp = $data->data->content;
+ $app = array();
+ if (isset($tmp->downloadlink)) {
+ $app['downloadlink'] = $tmp->downloadlink;
+ } else {
+ $app['downloadlink'] = '';
}
return $app;
}
diff --git a/lib/private/preferences.php b/lib/private/preferences.php
deleted file mode 100644
index cd4a9fd1c19..00000000000
--- a/lib/private/preferences.php
+++ /dev/null
@@ -1,181 +0,0 @@
-<?php
-/**
- * ownCloud
- *
- * @author Frank Karlitschek
- * @author Jakob Sack
- * @copyright 2012 Frank Karlitschek frank@owncloud.org
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-/*
- *
- * The following SQL statement is just a help for developers and will not be
- * executed!
- *
- * CREATE TABLE `preferences` (
- * `userid` VARCHAR( 255 ) NOT NULL ,
- * `appid` VARCHAR( 255 ) NOT NULL ,
- * `configkey` VARCHAR( 255 ) NOT NULL ,
- * `configvalue` VARCHAR( 255 ) NOT NULL
- * )
- *
- */
-
-namespace OC;
-
-use OCP\IDBConnection;
-use OCP\PreConditionNotMetException;
-
-
-/**
- * This class provides an easy way for storing user preferences.
- * @deprecated use \OCP\IConfig methods instead
- */
-class Preferences {
-
- /**
- * 3 dimensional array with the following structure:
- * [ $userId =>
- * [ $appId =>
- * [ $key => $value ]
- * ]
- * ]
- *
- * @var array $cache
- */
- protected $cache = array();
-
- /** @var \OCP\IConfig */
- protected $config;
-
- /**
- * @param \OCP\IDBConnection $conn
- */
- public function __construct(IDBConnection $conn) {
- $this->config = \OC::$server->getConfig();
- }
-
- /**
- * Get the available keys for an app
- * @param string $user user
- * @param string $app the app we are looking for
- * @return array an array of key names
- * @deprecated use getUserKeys of \OCP\IConfig instead
- *
- * This function gets all keys of an app of an user. Please note that the
- * values are not returned.
- */
- public function getKeys($user, $app) {
- return $this->config->getUserKeys($user, $app);
- }
-
- /**
- * Gets the preference
- * @param string $user user
- * @param string $app app
- * @param string $key key
- * @param string $default = null, default value if the key does not exist
- * @return string the value or $default
- * @deprecated use getUserValue of \OCP\IConfig instead
- *
- * This function gets a value from the preferences table. If the key does
- * not exist the default value will be returned
- */
- public function getValue($user, $app, $key, $default = null) {
- return $this->config->getUserValue($user, $app, $key, $default);
- }
-
- /**
- * sets a value in the preferences
- * @param string $user user
- * @param string $app app
- * @param string $key key
- * @param string $value value
- * @param string $preCondition only set value if the key had a specific value before
- * @return bool true if value was set, otherwise false
- * @deprecated use setUserValue of \OCP\IConfig instead
- *
- * Adds a value to the preferences. If the key did not exist before, it
- * will be added automagically.
- */
- public function setValue($user, $app, $key, $value, $preCondition = null) {
- try {
- $this->config->setUserValue($user, $app, $key, $value, $preCondition);
- return true;
- } catch(PreConditionNotMetException $e) {
- return false;
- }
- }
-
- /**
- * Gets the preference for an array of users
- * @param string $app
- * @param string $key
- * @param array $users
- * @return array Mapped values: userid => value
- * @deprecated use getUserValueForUsers of \OCP\IConfig instead
- */
- public function getValueForUsers($app, $key, $users) {
- return $this->config->getUserValueForUsers($app, $key, $users);
- }
-
- /**
- * Gets the users for a preference
- * @param string $app
- * @param string $key
- * @param string $value
- * @return array
- * @deprecated use getUsersForUserValue of \OCP\IConfig instead
- */
- public function getUsersForValue($app, $key, $value) {
- return $this->config->getUsersForUserValue($app, $key, $value);
- }
-
- /**
- * Deletes a key
- * @param string $user user
- * @param string $app app
- * @param string $key key
- * @deprecated use deleteUserValue of \OCP\IConfig instead
- *
- * Deletes a key.
- */
- public function deleteKey($user, $app, $key) {
- $this->config->deleteUserValue($user, $app, $key);
- }
-
- /**
- * Remove user from preferences
- * @param string $user user
- * @deprecated use deleteAllUserValues of \OCP\IConfig instead
- *
- * Removes all keys in preferences belonging to the user.
- */
- public function deleteUser($user) {
- $this->config->deleteAllUserValues($user);
- }
-
- /**
- * Remove app from all users
- * @param string $app app
- * @deprecated use deleteAppFromAllUsers of \OCP\IConfig instead
- *
- * Removes all keys in preferences belonging to the app.
- */
- public function deleteAppFromAllUsers($app) {
- $this->config->deleteAppFromAllUsers($app);
- }
-}
diff --git a/lib/private/preview.php b/lib/private/preview.php
index c7ef00652aa..6af1586293f 100644
--- a/lib/private/preview.php
+++ b/lib/private/preview.php
@@ -14,6 +14,7 @@
namespace OC;
use OC\Preview\Provider;
+use OCP\Files\FileInfo;
use OCP\Files\NotFoundException;
class Preview {
@@ -327,21 +328,21 @@ class Preview {
* deletes all previews of a file
*/
public function deleteAllPreviews() {
- $file = $this->getFile();
-
- $fileInfo = $this->getFileInfo($file);
-
$toDelete = $this->getChildren();
- $toDelete[] = $fileInfo;
+ $toDelete[] = $this->getFileInfo();
foreach ($toDelete as $delete) {
- if ($delete !== null && $delete !== false) {
+ if ($delete instanceof FileInfo) {
/** @var \OCP\Files\FileInfo $delete */
$fileId = $delete->getId();
- $previewPath = $this->getPreviewPath($fileId);
- $this->userView->deleteAll($previewPath);
- $this->userView->rmdir($previewPath);
+ // getId() might return null, e.g. when the file is a
+ // .ocTransferId*.part file from chunked file upload.
+ if (!empty($fileId)) {
+ $previewPath = $this->getPreviewPath($fileId);
+ $this->userView->deleteAll($previewPath);
+ $this->userView->rmdir($previewPath);
+ }
}
}
}
@@ -712,6 +713,7 @@ class Preview {
* - OC\Preview\Illustrator
* - OC\Preview\Postscript
* - OC\Preview\Photoshop
+ * - OC\Preview\Font
*/
if(empty(self::$enabledProviders)) {
self::$enabledProviders = \OC::$server->getConfig()->getSystemValue('enabledPreviewProviders', array(
@@ -771,8 +773,8 @@ class Preview {
'PDF' => 'OC\Preview\PDF',
'AI' => 'OC\Preview\Illustrator',
'PSD' => 'OC\Preview\Photoshop',
- // Requires adding 'eps' => array('application/postscript', null), to lib/private/mimetypes.list.php
'EPS' => 'OC\Preview\Postscript',
+ 'TTF' => 'OC\Preview\Font',
);
foreach ($imagickProviders as $queryFormat => $provider) {
diff --git a/lib/private/preview/font.php b/lib/private/preview/font.php
new file mode 100644
index 00000000000..58d64e8264d
--- /dev/null
+++ b/lib/private/preview/font.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * @copyright Olivier Paroz 2015 <owncloud@interfasys.ch>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Preview;
+
+// .otf, .ttf and .pfb
+class Font extends Bitmap {
+ /**
+ * {@inheritDoc}
+ */
+ public function getMimeType() {
+ return '/application\/(?:font-sfnt|x-font$)/';
+ }
+} \ No newline at end of file
diff --git a/lib/private/repair.php b/lib/private/repair.php
index c74283896fd..101af66e304 100644
--- a/lib/private/repair.php
+++ b/lib/private/repair.php
@@ -13,7 +13,7 @@ use OC\Hooks\Emitter;
use OC\Repair\AssetCache;
use OC\Repair\CleanTags;
use OC\Repair\Collation;
-use OC\Repair\EnableFilesApp;
+use OC\Repair\DropOldTables;
use OC\Repair\FillETags;
use OC\Repair\InnoDB;
use OC\Repair\RepairConfig;
@@ -85,7 +85,7 @@ class Repair extends BasicEmitter {
new AssetCache(),
new FillETags(\OC_DB::getConnection()),
new CleanTags(\OC_DB::getConnection()),
- new EnableFilesApp(\OC::$server->getConfig()),
+ new DropOldTables(\OC_DB::getConnection()),
);
}
diff --git a/lib/private/repair/repairlegacystorages.php b/lib/private/repair/repairlegacystorages.php
index ab123afeca6..027cb68eb1b 100644
--- a/lib/private/repair/repairlegacystorages.php
+++ b/lib/private/repair/repairlegacystorages.php
@@ -143,79 +143,105 @@ class RepairLegacyStorages extends BasicEmitter {
$dataDirId = 'local::' . $dataDir;
$count = 0;
+ $hasWarnings = false;
$this->connection->beginTransaction();
- try {
- // note: not doing a direct UPDATE with the REPLACE function
- // because regexp search/extract is needed and it is not guaranteed
- // to work on all database types
- $sql = 'SELECT `id`, `numeric_id` FROM `*PREFIX*storages`'
- . ' WHERE `id` LIKE ?'
- . ' ORDER BY `id`';
- $result = $this->connection->executeQuery($sql, array($dataDirId . '%'));
- while ($row = $result->fetch()) {
- $currentId = $row['id'];
- // one entry is the datadir itself
- if ($currentId === $dataDirId) {
- continue;
- }
+ // note: not doing a direct UPDATE with the REPLACE function
+ // because regexp search/extract is needed and it is not guaranteed
+ // to work on all database types
+ $sql = 'SELECT `id`, `numeric_id` FROM `*PREFIX*storages`'
+ . ' WHERE `id` LIKE ?'
+ . ' ORDER BY `id`';
+ $result = $this->connection->executeQuery($sql, array($dataDirId . '%'));
+
+ while ($row = $result->fetch()) {
+ $currentId = $row['id'];
+ // one entry is the datadir itself
+ if ($currentId === $dataDirId) {
+ continue;
+ }
+ try {
if ($this->fixLegacyStorage($currentId, (int)$row['numeric_id'])) {
$count++;
}
}
+ catch (\OC\RepairException $e) {
+ $hasWarnings = true;
+ $this->emit(
+ '\OC\Repair',
+ 'warning',
+ array('Could not repair legacy storage ' . $currentId . ' automatically.')
+ );
+ }
+ }
- // check for md5 ids, not in the format "prefix::"
- $sql = 'SELECT COUNT(*) AS "c" FROM `*PREFIX*storages`'
- . ' WHERE `id` NOT LIKE \'%::%\'';
- $result = $this->connection->executeQuery($sql);
- $row = $result->fetch();
- // find at least one to make sure it's worth
- // querying the user list
- if ((int)$row['c'] > 0) {
- $userManager = \OC_User::getManager();
-
- // use chunks to avoid caching too many users in memory
- $limit = 30;
- $offset = 0;
-
- do {
- // query the next page of users
- $results = $userManager->search('', $limit, $offset);
- $storageIds = array();
- $userIds = array();
- foreach ($results as $uid => $userObject) {
- $storageId = $dataDirId . $uid . '/';
- if (strlen($storageId) <= 64) {
- // skip short storage ids as they were handled in the previous section
- continue;
- }
- $storageIds[$uid] = $storageId;
+ // check for md5 ids, not in the format "prefix::"
+ $sql = 'SELECT COUNT(*) AS "c" FROM `*PREFIX*storages`'
+ . ' WHERE `id` NOT LIKE \'%::%\'';
+ $result = $this->connection->executeQuery($sql);
+ $row = $result->fetch();
+
+ // find at least one to make sure it's worth
+ // querying the user list
+ if ((int)$row['c'] > 0) {
+ $userManager = \OC_User::getManager();
+
+ // use chunks to avoid caching too many users in memory
+ $limit = 30;
+ $offset = 0;
+
+ do {
+ // query the next page of users
+ $results = $userManager->search('', $limit, $offset);
+ $storageIds = array();
+ $userIds = array();
+ foreach ($results as $uid => $userObject) {
+ $storageId = $dataDirId . $uid . '/';
+ if (strlen($storageId) <= 64) {
+ // skip short storage ids as they were handled in the previous section
+ continue;
}
+ $storageIds[$uid] = $storageId;
+ }
- if (count($storageIds) > 0) {
- // update the storages of these users
- foreach ($storageIds as $uid => $storageId) {
- $numericId = \OC\Files\Cache\Storage::getNumericStorageId($storageId);
+ if (count($storageIds) > 0) {
+ // update the storages of these users
+ foreach ($storageIds as $uid => $storageId) {
+ $numericId = \OC\Files\Cache\Storage::getNumericStorageId($storageId);
+ try {
if (!is_null($numericId) && $this->fixLegacyStorage($storageId, (int)$numericId)) {
$count++;
}
}
+ catch (\OC\RepairException $e) {
+ $hasWarnings = true;
+ $this->emit(
+ '\OC\Repair',
+ 'warning',
+ array('Could not repair legacy storage ' . $storageId . ' automatically.')
+ );
+ }
}
- $offset += $limit;
- } while (count($results) >= $limit);
- }
+ }
+ $offset += $limit;
+ } while (count($results) >= $limit);
+ }
- $this->emit('\OC\Repair', 'info', array('Updated ' . $count . ' legacy home storage ids'));
+ $this->emit('\OC\Repair', 'info', array('Updated ' . $count . ' legacy home storage ids'));
- $this->connection->commit();
- }
- catch (\OC\RepairException $e) {
- $this->connection->rollback();
- throw $e;
- }
+ $this->connection->commit();
- $this->config->setAppValue('core', 'repairlegacystoragesdone', 'yes');
+ if ($hasWarnings) {
+ $this->emit(
+ '\OC\Repair',
+ 'warning',
+ array('Some legacy storages could not be repaired. Please manually fix them then re-run ./occ maintenance:repair')
+ );
+ } else {
+ // if all were done, no need to redo the repair during next upgrade
+ $this->config->setAppValue('core', 'repairlegacystoragesdone', 'yes');
+ }
}
}
diff --git a/lib/private/request.php b/lib/private/request.php
deleted file mode 100644
index 3bf7d94d9cf..00000000000
--- a/lib/private/request.php
+++ /dev/null
@@ -1,342 +0,0 @@
-<?php
-/**
- * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-class OC_Request {
-
- const USER_AGENT_IE = '/MSIE/';
- // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent
- const USER_AGENT_ANDROID_MOBILE_CHROME = '#Android.*Chrome/[.0-9]*#';
- const USER_AGENT_FREEBOX = '#^Mozilla/5\.0$#';
- const REGEX_LOCALHOST = '/^(127\.0\.0\.1|localhost)$/';
- static protected $reqId;
-
- /**
- * Returns the remote address, if the connection came from a trusted proxy and `forwarded_for_headers` has been configured
- * then the IP address specified in this header will be returned instead.
- * Do always use this instead of $_SERVER['REMOTE_ADDR']
- * @return string IP address
- */
- public static function getRemoteAddress() {
- $remoteAddress = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
- $trustedProxies = \OC::$server->getConfig()->getSystemValue('trusted_proxies', array());
-
- if(is_array($trustedProxies) && in_array($remoteAddress, $trustedProxies)) {
- $forwardedForHeaders = \OC::$server->getConfig()->getSystemValue('forwarded_for_headers', array());
-
- foreach($forwardedForHeaders as $header) {
- if (array_key_exists($header, $_SERVER) === true) {
- foreach (explode(',', $_SERVER[$header]) as $IP) {
- $IP = trim($IP);
- if (filter_var($IP, FILTER_VALIDATE_IP) !== false) {
- return $IP;
- }
- }
- }
- }
- }
-
- return $remoteAddress;
- }
-
- /**
- * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging
- * @return string
- */
- public static function getRequestID() {
- if(self::$reqId === null) {
- self::$reqId = hash('md5', microtime().\OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate(20));
- }
- return self::$reqId;
- }
-
- /**
- * Check overwrite condition
- * @param string $type
- * @return bool
- */
- private static function isOverwriteCondition($type = '') {
- $regex = '/' . OC_Config::getValue('overwritecondaddr', '') . '/';
- return $regex === '//' or preg_match($regex, $_SERVER['REMOTE_ADDR']) === 1
- or ($type !== 'protocol' and OC_Config::getValue('forcessl', false));
- }
-
- /**
- * Strips a potential port from a domain (in format domain:port)
- * @param $host
- * @return string $host without appended port
- */
- public static function getDomainWithoutPort($host) {
- $pos = strrpos($host, ':');
- if ($pos !== false) {
- $port = substr($host, $pos + 1);
- if (is_numeric($port)) {
- $host = substr($host, 0, $pos);
- }
- }
- return $host;
- }
-
- /**
- * Checks whether a domain is considered as trusted from the list
- * of trusted domains. If no trusted domains have been configured, returns
- * true.
- * This is used to prevent Host Header Poisoning.
- * @param string $domainWithPort
- * @return bool true if the given domain is trusted or if no trusted domains
- * have been configured
- */
- public static function isTrustedDomain($domainWithPort) {
- // Extract port from domain if needed
- $domain = self::getDomainWithoutPort($domainWithPort);
-
- // FIXME: Empty config array defaults to true for now. - Deprecate this behaviour with ownCloud 8.
- $trustedList = \OC::$server->getConfig()->getSystemValue('trusted_domains', array());
- if (empty($trustedList)) {
- return true;
- }
-
- // FIXME: Workaround for older instances still with port applied. Remove for ownCloud 9.
- if(in_array($domainWithPort, $trustedList)) {
- return true;
- }
-
- // Always allow access from localhost
- if (preg_match(self::REGEX_LOCALHOST, $domain) === 1) {
- return true;
- }
-
- return in_array($domain, $trustedList);
- }
-
- /**
- * Returns the unverified server host from the headers without checking
- * whether it is a trusted domain
- * @return string the server host
- *
- * Returns the server host, even if the website uses one or more
- * reverse proxies
- */
- public static function insecureServerHost() {
- $host = null;
- if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
- if (strpos($_SERVER['HTTP_X_FORWARDED_HOST'], ",") !== false) {
- $parts = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
- $host = trim(current($parts));
- } else {
- $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
- }
- } else {
- if (isset($_SERVER['HTTP_HOST'])) {
- $host = $_SERVER['HTTP_HOST'];
- } else if (isset($_SERVER['SERVER_NAME'])) {
- $host = $_SERVER['SERVER_NAME'];
- }
- }
- return $host;
- }
-
- /**
- * Returns the overwritehost setting from the config if set and
- * if the overwrite condition is met
- * @return string|null overwritehost value or null if not defined or the defined condition
- * isn't met
- */
- public static function getOverwriteHost() {
- if(OC_Config::getValue('overwritehost', '') !== '' and self::isOverwriteCondition()) {
- return OC_Config::getValue('overwritehost');
- }
- return null;
- }
-
- /**
- * Returns the server host from the headers, or the first configured
- * trusted domain if the host isn't in the trusted list
- * @return string the server host
- *
- * Returns the server host, even if the website uses one or more
- * reverse proxies
- */
- public static function serverHost() {
- if (OC::$CLI && defined('PHPUNIT_RUN')) {
- return 'localhost';
- }
-
- // overwritehost is always trusted
- $host = self::getOverwriteHost();
- if ($host !== null) {
- return $host;
- }
-
- // get the host from the headers
- $host = self::insecureServerHost();
-
- // Verify that the host is a trusted domain if the trusted domains
- // are defined
- // If no trusted domain is provided the first trusted domain is returned
- if (self::isTrustedDomain($host)) {
- return $host;
- } else {
- $trustedList = \OC_Config::getValue('trusted_domains', array(''));
- return $trustedList[0];
- }
- }
-
- /**
- * Returns the server protocol
- * @return string the server protocol
- *
- * Returns the server protocol. It respects reverse proxy servers and load balancers
- */
- public static function serverProtocol() {
- if(OC_Config::getValue('overwriteprotocol', '') !== '' and self::isOverwriteCondition('protocol')) {
- return OC_Config::getValue('overwriteprotocol');
- }
- if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
- $proto = strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']);
- // Verify that the protocol is always HTTP or HTTPS
- // default to http if an invalid value is provided
- return $proto === 'https' ? 'https' : 'http';
- }
- if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {
- return 'https';
- }
- return 'http';
- }
-
- /**
- * Returns the request uri
- * @return string the request uri
- *
- * Returns the request uri, even if the website uses one or more
- * reverse proxies
- * @return string
- */
- public static function requestUri() {
- $uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
- if (OC_Config::getValue('overwritewebroot', '') !== '' and self::isOverwriteCondition()) {
- $uri = self::scriptName() . substr($uri, strlen($_SERVER['SCRIPT_NAME']));
- }
- return $uri;
- }
-
- /**
- * Returns the script name
- * @return string the script name
- *
- * Returns the script name, even if the website uses one or more
- * reverse proxies
- */
- public static function scriptName() {
- $name = $_SERVER['SCRIPT_NAME'];
- $overwriteWebRoot = OC_Config::getValue('overwritewebroot', '');
- if ($overwriteWebRoot !== '' and self::isOverwriteCondition()) {
- $serverroot = str_replace("\\", '/', substr(__DIR__, 0, -strlen('lib/private/')));
- $suburi = str_replace("\\", "/", substr(realpath($_SERVER["SCRIPT_FILENAME"]), strlen($serverroot)));
- $name = '/' . ltrim($overwriteWebRoot . $suburi, '/');
- }
- return $name;
- }
-
- /**
- * get Path info from request
- * @return string Path info or false when not found
- */
- public static function getPathInfo() {
- if (array_key_exists('PATH_INFO', $_SERVER)) {
- $path_info = $_SERVER['PATH_INFO'];
- }else{
- $path_info = self::getRawPathInfo();
- // following is taken from \Sabre\DAV\URLUtil::decodePathSegment
- $path_info = rawurldecode($path_info);
- $encoding = mb_detect_encoding($path_info, array('UTF-8', 'ISO-8859-1'));
-
- switch($encoding) {
-
- case 'ISO-8859-1' :
- $path_info = utf8_encode($path_info);
-
- }
- // end copy
- }
- return $path_info;
- }
-
- /**
- * get Path info from request, not urldecoded
- * @throws Exception
- * @return string Path info or false when not found
- */
- public static function getRawPathInfo() {
- $requestUri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
- // remove too many leading slashes - can be caused by reverse proxy configuration
- if (strpos($requestUri, '/') === 0) {
- $requestUri = '/' . ltrim($requestUri, '/');
- }
-
- $requestUri = preg_replace('%/{2,}%', '/', $requestUri);
-
- // Remove the query string from REQUEST_URI
- if ($pos = strpos($requestUri, '?')) {
- $requestUri = substr($requestUri, 0, $pos);
- }
-
- $scriptName = $_SERVER['SCRIPT_NAME'];
- $path_info = $requestUri;
-
- // strip off the script name's dir and file name
- list($path, $name) = \Sabre\DAV\URLUtil::splitPath($scriptName);
- if (!empty($path)) {
- if( $path === $path_info || strpos($path_info, $path.'/') === 0) {
- $path_info = substr($path_info, strlen($path));
- } else {
- throw new Exception("The requested uri($requestUri) cannot be processed by the script '$scriptName')");
- }
- }
- if (strpos($path_info, '/'.$name) === 0) {
- $path_info = substr($path_info, strlen($name) + 1);
- }
- if (strpos($path_info, $name) === 0) {
- $path_info = substr($path_info, strlen($name));
- }
- if($path_info === '/'){
- return '';
- } else {
- return $path_info;
- }
- }
-
- /**
- * Check if the requester sent along an mtime
- * @return false or an mtime
- */
- static public function hasModificationTime () {
- if (isset($_SERVER['HTTP_X_OC_MTIME'])) {
- return $_SERVER['HTTP_X_OC_MTIME'];
- } else {
- return false;
- }
- }
-
- /**
- * Checks whether the user agent matches a given regex
- * @param string|array $agent agent name or array of agent names
- * @return boolean true if at least one of the given agent matches,
- * false otherwise
- */
- static public function isUserAgent($agent) {
- if (!is_array($agent)) {
- $agent = array($agent);
- }
- foreach ($agent as $regex) {
- if (preg_match($regex, $_SERVER['HTTP_USER_AGENT'])) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/lib/private/response.php b/lib/private/response.php
index cf18115111a..2bec5e3decd 100644
--- a/lib/private/response.php
+++ b/lib/private/response.php
@@ -158,11 +158,12 @@ class OC_Response {
* @param string $type disposition type, either 'attachment' or 'inline'
*/
static public function setContentDispositionHeader( $filename, $type = 'attachment' ) {
- if (OC_Request::isUserAgent(array(
- OC_Request::USER_AGENT_IE,
- OC_Request::USER_AGENT_ANDROID_MOBILE_CHROME,
- OC_Request::USER_AGENT_FREEBOX
- ))) {
+ if (\OC::$server->getRequest()->isUserAgent(
+ [
+ \OC\AppFramework\Http\Request::USER_AGENT_IE,
+ \OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME,
+ \OC\AppFramework\Http\Request::USER_AGENT_FREEBOX,
+ ])) {
header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' );
} else {
header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename )
@@ -188,36 +189,27 @@ class OC_Response {
}
}
- /*
+ /**
* This function adds some security related headers to all requests served via base.php
* The implementation of this function has to happen here to ensure that all third-party
* components (e.g. SabreDAV) also benefit from this headers.
*/
public static function addSecurityHeaders() {
- header('X-XSS-Protection: 1; mode=block'); // Enforce browser based XSS filters
- header('X-Content-Type-Options: nosniff'); // Disable sniffing the content type for IE
-
- // iFrame Restriction Policy
- $xFramePolicy = OC_Config::getValue('xframe_restriction', true);
- if ($xFramePolicy) {
- header('X-Frame-Options: Sameorigin'); // Disallow iFraming from other domains
- }
-
- // Content Security Policy
- // If you change the standard policy, please also change it in config.sample.php
- $policy = OC_Config::getValue('custom_csp_policy',
- 'default-src \'self\'; '
+ /**
+ * FIXME: Content Security Policy for legacy ownCloud components. This
+ * can be removed once \OCP\AppFramework\Http\Response from the AppFramework
+ * is used everywhere.
+ * @see \OCP\AppFramework\Http\Response::getHeaders
+ */
+ $policy = 'default-src \'self\'; '
. 'script-src \'self\' \'unsafe-eval\'; '
. 'style-src \'self\' \'unsafe-inline\'; '
. 'frame-src *; '
. 'img-src *; '
. 'font-src \'self\' data:; '
. 'media-src *; '
- . 'connect-src *');
+ . 'connect-src *';
header('Content-Security-Policy:' . $policy);
-
- // https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
- header('X-Robots-Tag: none');
}
}
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 3559b841926..25e897123d1 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -63,8 +63,9 @@ class Router implements IRouter {
} else {
$method = 'GET';
}
- $host = \OC_Request::serverHost();
- $schema = \OC_Request::serverProtocol();
+ $request = \OC::$server->getRequest();
+ $host = $request->getServerHost();
+ $schema = $request->getServerProtocol();
$this->context = new RequestContext($baseUrl, $method, $host, $schema);
// TODO cache
$this->root = $this->getCollection('root');
diff --git a/lib/private/security/securerandom.php b/lib/private/security/securerandom.php
index 2402e863fb0..b1169bff289 100644
--- a/lib/private/security/securerandom.php
+++ b/lib/private/security/securerandom.php
@@ -64,8 +64,7 @@ class SecureRandom implements ISecureRandom {
* Generate a random string of specified length.
* @param string $length The length of the generated string
* @param string $characters An optional list of characters to use if no characterlist is
- * specified 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./
- * is used.
+ * specified all valid base64 characters are used.
* @return string
* @throws \Exception If the generator is not initialized.
*/
diff --git a/lib/private/security/trusteddomainhelper.php b/lib/private/security/trusteddomainhelper.php
new file mode 100644
index 00000000000..da5e0ff0a12
--- /dev/null
+++ b/lib/private/security/trusteddomainhelper.php
@@ -0,0 +1,75 @@
+<?php
+/**
+ * Copyright (c) 2015 Lukas Reschke <lukas@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Security;
+use OC\AppFramework\Http\Request;
+use OCP\IConfig;
+
+/**
+ * Class TrustedDomain
+ *
+ * @package OC\Security
+ */
+class TrustedDomainHelper {
+ /** @var IConfig */
+ private $config;
+
+ /**
+ * @param IConfig $config
+ */
+ function __construct(IConfig $config) {
+ $this->config = $config;
+ }
+
+ /**
+ * Strips a potential port from a domain (in format domain:port)
+ * @param string $host
+ * @return string $host without appended port
+ */
+ private function getDomainWithoutPort($host) {
+ $pos = strrpos($host, ':');
+ if ($pos !== false) {
+ $port = substr($host, $pos + 1);
+ if (is_numeric($port)) {
+ $host = substr($host, 0, $pos);
+ }
+ }
+ return $host;
+ }
+
+ /**
+ * Checks whether a domain is considered as trusted from the list
+ * of trusted domains. If no trusted domains have been configured, returns
+ * true.
+ * This is used to prevent Host Header Poisoning.
+ * @param string $domainWithPort
+ * @return bool true if the given domain is trusted or if no trusted domains
+ * have been configured
+ */
+ public function isTrustedDomain($domainWithPort) {
+ $domain = $this->getDomainWithoutPort($domainWithPort);
+
+ // Read trusted domains from config
+ $trustedList = $this->config->getSystemValue('trusted_domains', []);
+ if(!is_array($trustedList)) {
+ return false;
+ }
+
+ // TODO: Workaround for older instances still with port applied. Remove for ownCloud 9.
+ if(in_array($domainWithPort, $trustedList)) {
+ return true;
+ }
+
+ // Always allow access from localhost
+ if (preg_match(Request::REGEX_LOCALHOST, $domain) === 1) {
+ return true;
+ }
+ return in_array($domain, $trustedList);
+ }
+
+}
diff --git a/lib/private/server.php b/lib/private/server.php
index 15c33e1905f..896abf04a40 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -7,10 +7,10 @@ use OC\AppFramework\Http\Request;
use OC\AppFramework\Db\Db;
use OC\AppFramework\Utility\SimpleContainer;
use OC\Cache\UserCache;
+use OC\Command\AsyncBus;
use OC\Diagnostics\NullQueryLogger;
use OC\Diagnostics\EventLogger;
use OC\Diagnostics\QueryLogger;
-use OC\Files\Config\StorageManager;
use OC\Security\CertificateManager;
use OC\Files\Node\Root;
use OC\Files\View;
@@ -18,6 +18,7 @@ use OC\Security\Crypto;
use OC\Security\Hasher;
use OC\Security\SecureRandom;
use OC\Diagnostics\NullEventLogger;
+use OC\Security\TrustedDomainHelper;
use OCP\IServerContainer;
use OCP\ISession;
use OC\Tagging\TagMapper;
@@ -42,48 +43,11 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('ContactsManager', function ($c) {
return new ContactsManager();
});
- $this->registerService('Request', function (Server $c) {
- if (isset($c['urlParams'])) {
- $urlParams = $c['urlParams'];
- } else {
- $urlParams = array();
- }
-
- if ($c->getSession()->exists('requesttoken')) {
- $requestToken = $c->getSession()->get('requesttoken');
- } else {
- $requestToken = false;
- }
-
- if (defined('PHPUNIT_RUN') && PHPUNIT_RUN
- && in_array('fakeinput', stream_get_wrappers())
- ) {
- $stream = 'fakeinput://data';
- } else {
- $stream = 'php://input';
- }
-
- return new Request(
- array(
- 'get' => $_GET,
- 'post' => $_POST,
- 'files' => $_FILES,
- 'server' => $_SERVER,
- 'env' => $_ENV,
- 'cookies' => $_COOKIE,
- 'method' => (isset($_SERVER) && isset($_SERVER['REQUEST_METHOD']))
- ? $_SERVER['REQUEST_METHOD']
- : null,
- 'urlParams' => $urlParams,
- 'requesttoken' => $requestToken,
- ), $stream
- );
- });
$this->registerService('PreviewManager', function ($c) {
return new PreviewManager();
});
$this->registerService('TagMapper', function(Server $c) {
- return new TagMapper($c->getDb());
+ return new TagMapper($c->getDatabaseConnection());
});
$this->registerService('TagManager', function (Server $c) {
$tagMapper = $c->query('TagMapper');
@@ -191,8 +155,12 @@ class Server extends SimpleContainer implements IServerContainer {
return new UserCache();
});
$this->registerService('MemCacheFactory', function ($c) {
+ $config = $c->getConfig();
$instanceId = \OC_Util::getInstanceId();
- return new \OC\Memcache\Factory($instanceId);
+ return new \OC\Memcache\Factory($instanceId,
+ $config->getSystemValue('memcache.local', null),
+ $config->getSystemValue('memcache.distributed', null)
+ );
});
$this->registerService('ActivityManager', function ($c) {
return new ActivityManager();
@@ -297,6 +265,53 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('IniWrapper', function ($c) {
return new IniGetWrapper();
});
+ $this->registerService('AsyncCommandBus', function (Server $c) {
+ $jobList = $c->getJobList();
+ return new AsyncBus($jobList);
+ });
+ $this->registerService('TrustedDomainHelper', function ($c) {
+ return new TrustedDomainHelper($this->getConfig());
+ });
+ $this->registerService('Request', function ($c) {
+ if (isset($this['urlParams'])) {
+ $urlParams = $this['urlParams'];
+ } else {
+ $urlParams = [];
+ }
+
+ if ($this->getSession()->exists('requesttoken')) {
+ $requestToken = $this->getSession()->get('requesttoken');
+ } else {
+ $requestToken = false;
+ }
+
+ if (defined('PHPUNIT_RUN') && PHPUNIT_RUN
+ && in_array('fakeinput', stream_get_wrappers())
+ ) {
+ $stream = 'fakeinput://data';
+ } else {
+ $stream = 'php://input';
+ }
+
+ return new Request(
+ [
+ 'get' => $_GET,
+ 'post' => $_POST,
+ 'files' => $_FILES,
+ 'server' => $_SERVER,
+ 'env' => $_ENV,
+ 'cookies' => $_COOKIE,
+ 'method' => (isset($_SERVER) && isset($_SERVER['REQUEST_METHOD']))
+ ? $_SERVER['REQUEST_METHOD']
+ : null,
+ 'urlParams' => $urlParams,
+ 'requesttoken' => $requestToken,
+ ],
+ $this->getSecureRandom(),
+ $this->getConfig(),
+ $stream
+ );
+ });
}
/**
@@ -614,7 +629,7 @@ class Server extends SimpleContainer implements IServerContainer {
/**
* Returns an instance of the db facade
- *
+ * @deprecated use getDatabaseConnection, will be removed in ownCloud 10
* @return \OCP\IDb
*/
function getDb() {
@@ -735,4 +750,20 @@ class Server extends SimpleContainer implements IServerContainer {
public function getIniWrapper() {
return $this->query('IniWrapper');
}
+
+ /**
+ * @return \OCP\Command\IBus
+ */
+ function getCommandBus(){
+ return $this->query('AsyncCommandBus');
+ }
+
+ /**
+ * Get the trusted domain helper
+ *
+ * @return TrustedDomainHelper
+ */
+ public function getTrustedDomainHelper() {
+ return $this->query('TrustedDomainHelper');
+ }
}
diff --git a/lib/private/setup.php b/lib/private/setup.php
index e3a29b6469d..44b6ad56cb8 100644
--- a/lib/private/setup.php
+++ b/lib/private/setup.php
@@ -6,17 +6,36 @@
* See the COPYING-README file.
*/
+namespace OC;
+
+use bantu\IniGetWrapper\IniGetWrapper;
+use Exception;
use OCP\IConfig;
+use OCP\IL10N;
-class OC_Setup {
- /** @var IConfig */
+class Setup {
+ /** @var \OCP\IConfig */
protected $config;
+ /** @var IniGetWrapper */
+ protected $iniWrapper;
+ /** @var IL10N */
+ protected $l10n;
+ /** @var \OC_Defaults */
+ protected $defaults;
/**
* @param IConfig $config
+ * @param IniGetWrapper $iniWrapper
+ * @param \OC_Defaults $defaults
*/
- function __construct(IConfig $config) {
+ function __construct(IConfig $config,
+ IniGetWrapper $iniWrapper,
+ IL10N $l10n,
+ \OC_Defaults $defaults) {
$this->config = $config;
+ $this->iniWrapper = $iniWrapper;
+ $this->l10n = $l10n;
+ $this->defaults = $defaults;
}
static $dbSetupClasses = array(
@@ -29,13 +48,6 @@ class OC_Setup {
);
/**
- * @return OC_L10N
- */
- public static function getTrans(){
- return \OC::$server->getL10N('lib');
- }
-
- /**
* Wrapper around the "class_exists" PHP function to be able to mock it
* @param string $name
* @return bool
@@ -56,10 +68,11 @@ class OC_Setup {
/**
* Get the available and supported databases of this instance
*
- * @throws Exception
+ * @param bool $allowAllDatabases
* @return array
+ * @throws Exception
*/
- public function getSupportedDatabases() {
+ public function getSupportedDatabases($allowAllDatabases = false) {
$availableDatabases = array(
'sqlite' => array(
'type' => 'class',
@@ -87,8 +100,12 @@ class OC_Setup {
'name' => 'MS SQL'
)
);
- $configuredDatabases = $this->config->getSystemValue('supportedDatabases',
- array('sqlite', 'mysql', 'pgsql'));
+ if ($allowAllDatabases) {
+ $configuredDatabases = array_keys($availableDatabases);
+ } else {
+ $configuredDatabases = $this->config->getSystemValue('supportedDatabases',
+ array('sqlite', 'mysql', 'pgsql'));
+ }
if(!is_array($configuredDatabases)) {
throw new Exception('Supported databases are not properly configured.');
}
@@ -113,11 +130,90 @@ class OC_Setup {
}
/**
+ * Gathers system information like database type and does
+ * a few system checks.
+ *
+ * @return array of system info, including an "errors" value
+ * in case of errors/warnings
+ */
+ public function getSystemInfo($allowAllDatabases = false) {
+ $databases = $this->getSupportedDatabases($allowAllDatabases);
+
+ $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
+
+ $errors = array();
+
+ // Create data directory to test whether the .htaccess works
+ // Notice that this is not necessarily the same data directory as the one
+ // that will effectively be used.
+ @mkdir($dataDir);
+ $htAccessWorking = true;
+ if (is_dir($dataDir) && is_writable($dataDir)) {
+ // Protect data directory here, so we can test if the protection is working
+ \OC\Setup::protectDataDirectory();
+
+ try {
+ $htAccessWorking = \OC_Util::isHtaccessWorking();
+ } catch (\OC\HintException $e) {
+ $errors[] = array(
+ 'error' => $e->getMessage(),
+ 'hint' => $e->getHint()
+ );
+ $htAccessWorking = false;
+ }
+ }
+
+ if (\OC_Util::runningOnMac()) {
+ $errors[] = array(
+ 'error' => $this->l10n->t(
+ 'Mac OS X is not supported and %s will not work properly on this platform. ' .
+ 'Use it at your own risk! ',
+ $this->defaults->getName()
+ ),
+ 'hint' => $this->l10n->t('For the best results, please consider using a GNU/Linux server instead.')
+ );
+ }
+
+ if($this->iniWrapper->getString('open_basedir') !== '' && PHP_INT_SIZE === 4) {
+ $errors[] = array(
+ 'error' => $this->l10n->t(
+ 'It seems that this %s instance is running on a 32-bit PHP environment and the open_basedir has been configured in php.ini. ' .
+ 'This will lead to problems with files over 4 GB and is highly discouraged.',
+ $this->defaults->getName()
+ ),
+ 'hint' => $this->l10n->t('Please remove the open_basedir setting within your php.ini or switch to 64-bit PHP.')
+ );
+ }
+ if(!function_exists('curl_init') && PHP_INT_SIZE === 4) {
+ $errors[] = array(
+ 'error' => $this->l10n->t(
+ 'It seems that this %s instance is running on a 32-bit PHP environment and cURL is not installed. ' .
+ 'This will lead to problems with files over 4 GB and is highly discouraged.',
+ $this->defaults->getName()
+ ),
+ 'hint' => $this->l10n->t('Please install the cURL extension and restart your webserver.')
+ );
+ }
+
+ return array(
+ 'hasSQLite' => isset($databases['sqlite']),
+ 'hasMySQL' => isset($databases['mysql']),
+ 'hasPostgreSQL' => isset($databases['pgsql']),
+ 'hasOracle' => isset($databases['oci']),
+ 'hasMSSQL' => isset($databases['mssql']),
+ 'databases' => $databases,
+ 'directory' => $dataDir,
+ 'htaccessWorking' => $htAccessWorking,
+ 'errors' => $errors,
+ );
+ }
+
+ /**
* @param $options
* @return array
*/
- public static function install($options) {
- $l = self::getTrans();
+ public function install($options) {
+ $l = $this->l10n;
$error = array();
$dbType = $options['dbtype'];
@@ -129,7 +225,7 @@ class OC_Setup {
$error[] = $l->t('Set an admin password.');
}
if(empty($options['directory'])) {
- $options['directory'] = OC::$SERVERROOT."/data";
+ $options['directory'] = \OC::$SERVERROOT."/data";
}
if (!isset(self::$dbSetupClasses[$dbType])) {
@@ -142,7 +238,7 @@ class OC_Setup {
$class = self::$dbSetupClasses[$dbType];
/** @var \OC\Setup\AbstractDatabase $dbSetup */
- $dbSetup = new $class(self::getTrans(), 'db_structure.xml');
+ $dbSetup = new $class($l, 'db_structure.xml');
$error = array_merge($error, $dbSetup->validate($options));
// validate the data directory
@@ -157,15 +253,17 @@ class OC_Setup {
return $error;
}
+ $request = \OC::$server->getRequest();
+
//no errors, good
if(isset($options['trusted_domains'])
&& is_array($options['trusted_domains'])) {
$trustedDomains = $options['trusted_domains'];
} else {
- $trustedDomains = array(\OC_Request::getDomainWithoutPort(\OC_Request::serverHost()));
+ $trustedDomains = [$request->getInsecureServerHost()];
}
- if (OC_Util::runningOnWindows()) {
+ if (\OC_Util::runningOnWindows()) {
$dataDir = rtrim(realpath($dataDir), '\\');
}
@@ -180,14 +278,14 @@ class OC_Setup {
$secret = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(48);
//write the config file
- \OC::$server->getConfig()->setSystemValues([
+ $this->config->setSystemValues([
'passwordsalt' => $salt,
'secret' => $secret,
'trusted_domains' => $trustedDomains,
'datadirectory' => $dataDir,
- 'overwrite.cli.url' => \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost() . OC::$WEBROOT,
+ 'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT,
'dbtype' => $dbType,
- 'version' => implode('.', OC_Util::getVersion()),
+ 'version' => implode('.', \OC_Util::getVersion()),
]);
try {
@@ -208,27 +306,31 @@ class OC_Setup {
}
//create the user and group
+ $user = null;
try {
- OC_User::createUser($username, $password);
+ $user = \OC::$server->getUserManager()->createUser($username, $password);
+ if (!$user) {
+ $error[] = "User <$username> could not be created.";
+ }
} catch(Exception $exception) {
$error[] = $exception->getMessage();
}
if(count($error) == 0) {
- $appConfig = \OC::$server->getAppConfig();
- $appConfig->setValue('core', 'installedat', microtime(true));
- $appConfig->setValue('core', 'lastupdatedat', microtime(true));
+ $config = \OC::$server->getConfig();
+ $config->setAppValue('core', 'installedat', microtime(true));
+ $config->setAppValue('core', 'lastupdatedat', microtime(true));
- OC_Group::createGroup('admin');
- OC_Group::addToGroup($username, 'admin');
- OC_User::login($username, $password);
+ $group =\OC::$server->getGroupManager()->createGroup('admin');
+ $group->addUser($user);
+ \OC_User::login($username, $password);
//guess what this does
- OC_Installer::installShippedApps();
+ \OC_Installer::installShippedApps();
// create empty file in data dir, so we can later find
// out that this is indeed an ownCloud data directory
- file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.ocdata', '');
+ file_put_contents($config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/.ocdata', '');
// Update htaccess files for apache hosts
if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
@@ -237,7 +339,7 @@ class OC_Setup {
}
//and we are done
- OC_Config::setValue('installed', true);
+ $config->setSystemValue('installed', true);
}
return $error;
@@ -247,7 +349,7 @@ class OC_Setup {
* @return string Absolute path to htaccess
*/
private function pathToHtaccess() {
- return OC::$SERVERROOT.'/.htaccess';
+ return \OC::$SERVERROOT.'/.htaccess';
}
/**
@@ -271,14 +373,14 @@ class OC_Setup {
* @throws \OC\HintException If .htaccess does not include the current version
*/
public static function updateHtaccess() {
- $setupHelper = new OC_Setup(\OC::$server->getConfig());
+ $setupHelper = new \OC\Setup(\OC::$server->getConfig(), \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'), new \OC_Defaults());
if(!$setupHelper->isCurrentHtaccess()) {
throw new \OC\HintException('.htaccess file has the wrong version. Please upload the correct version. Maybe you forgot to replace it after updating?');
}
$content = "\n";
- $content.= "ErrorDocument 403 ".OC::$WEBROOT."/core/templates/403.php\n";//custom 403 error page
- $content.= "ErrorDocument 404 ".OC::$WEBROOT."/core/templates/404.php";//custom 404 error page
+ $content.= "ErrorDocument 403 ".\OC::$WEBROOT."/core/templates/403.php\n";//custom 403 error page
+ $content.= "ErrorDocument 404 ".\OC::$WEBROOT."/core/templates/404.php";//custom 404 error page
@file_put_contents($setupHelper->pathToHtaccess(), $content, FILE_APPEND); //suppress errors in case we don't have permissions for it
}
@@ -293,10 +395,11 @@ class OC_Setup {
$content.= "# line below if for Apache 2.2\n";
$content.= "<ifModule !mod_authz_core.c>\n";
$content.= "deny from all\n";
+ $content.= "Satisfy All\n";
$content.= "</ifModule>\n\n";
$content.= "# section for Apache 2.2 and 2.4\n";
$content.= "IndexIgnore *\n";
- file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/.htaccess', $content);
- file_put_contents(OC_Config::getValue('datadirectory', OC::$SERVERROOT.'/data').'/index.html', '');
+ file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data').'/.htaccess', $content);
+ file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT.'/data').'/index.html', '');
}
}
diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php
index 6059af0196d..55b71ceeeac 100644
--- a/lib/private/share/helper.php
+++ b/lib/private/share/helper.php
@@ -221,4 +221,34 @@ class Helper extends \OC\Share\Constants {
return $expires;
}
+
+ /**
+ * Extracts the necessary remote name from a given link
+ *
+ * Strips away a potential file name, to allow
+ * - user
+ * - user@localhost
+ * - user@http://localhost
+ * - user@http://localhost/
+ * - user@http://localhost/index.php
+ * - user@http://localhost/index.php/s/{shareToken}
+ *
+ * @param string $shareWith
+ * @return string
+ */
+ public static function fixRemoteURLInShareWith($shareWith) {
+ if (strpos($shareWith, '@')) {
+ list($user, $remote) = explode('@', $shareWith, 2);
+
+ $remote = str_replace('\\', '/', $remote);
+ if ($fileNamePosition = strpos($remote, '/index.php')) {
+ $remote = substr($remote, 0, $fileNamePosition);
+ }
+ $remote = rtrim($remote, '/');
+
+ $shareWith = $user . '@' . $remote;
+ }
+
+ return rtrim($shareWith, '/');
+ }
}
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index bd21bdd4b3a..974ebf41f93 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -724,7 +724,7 @@ class Share extends \OC\Share\Constants {
$token = \OC::$server->getSecureRandom()->getMediumStrengthGenerator()->generate(self::TOKEN_LENGTH, \OCP\Security\ISecureRandom::CHAR_LOWER . \OCP\Security\ISecureRandom::CHAR_UPPER .
\OCP\Security\ISecureRandom::CHAR_DIGITS);
- $shareWith = rtrim($shareWith, '/');
+ $shareWith = Helper::fixRemoteURLInShareWith($shareWith);
$shareId = self::put($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, null, $token, $itemSourceName);
$send = false;
@@ -1166,13 +1166,20 @@ class Share extends \OC\Share\Constants {
* @return null
*/
protected static function unshareItem(array $item, $newParent = null) {
+
+ $shareType = (int)$item['share_type'];
+ $shareWith = null;
+ if ($shareType !== \OCP\Share::SHARE_TYPE_LINK) {
+ $shareWith = $item['share_with'];
+ }
+
// Pass all the vars we have for now, they may be useful
$hookParams = array(
'id' => $item['id'],
'itemType' => $item['item_type'],
'itemSource' => $item['item_source'],
- 'shareType' => (int)$item['share_type'],
- 'shareWith' => $item['share_with'],
+ 'shareType' => $shareType,
+ 'shareWith' => $shareWith,
'itemParent' => $item['parent'],
'uidOwner' => $item['uid_owner'],
);
@@ -1850,7 +1857,7 @@ class Share extends \OC\Share\Constants {
$sourceId = ($itemType === 'file' || $itemType === 'folder') ? $fileSource : $itemSource;
$sourceExists = self::getItemSharedWithBySource($itemType, $sourceId, self::FORMAT_NONE, null, true, $user);
- $shareType = ($isGroupShare) ? self::$shareTypeGroupUserUnique : $shareType;
+ $userShareType = ($isGroupShare) ? self::$shareTypeGroupUserUnique : $shareType;
if ($sourceExists) {
$fileTarget = $sourceExists['file_target'];
@@ -1863,12 +1870,12 @@ class Share extends \OC\Share\Constants {
} elseif(!$sourceExists && !$isGroupShare) {
- $itemTarget = Helper::generateTarget($itemType, $itemSource, $shareType, $user,
+ $itemTarget = Helper::generateTarget($itemType, $itemSource, $userShareType, $user,
$uidOwner, $suggestedItemTarget, $parent);
if (isset($fileSource)) {
if ($parentFolder) {
if ($parentFolder === true) {
- $fileTarget = Helper::generateTarget('file', $filePath, $shareType, $user,
+ $fileTarget = Helper::generateTarget('file', $filePath, $userShareType, $user,
$uidOwner, $suggestedFileTarget, $parent);
if ($fileTarget != $groupFileTarget) {
$parentFolders[$user]['folder'] = $fileTarget;
@@ -1878,7 +1885,7 @@ class Share extends \OC\Share\Constants {
$parent = $parentFolder[$user]['id'];
}
} else {
- $fileTarget = Helper::generateTarget('file', $filePath, $shareType,
+ $fileTarget = Helper::generateTarget('file', $filePath, $userShareType,
$user, $uidOwner, $suggestedFileTarget, $parent);
}
} else {
@@ -1909,7 +1916,7 @@ class Share extends \OC\Share\Constants {
'itemType' => $itemType,
'itemSource' => $itemSource,
'itemTarget' => $itemTarget,
- 'shareType' => $shareType,
+ 'shareType' => $userShareType,
'shareWith' => $user,
'uidOwner' => $uidOwner,
'permissions' => $permissions,
diff --git a/lib/private/tagging/tagmapper.php b/lib/private/tagging/tagmapper.php
index 6c9bec7aa52..5dc465c67ea 100644
--- a/lib/private/tagging/tagmapper.php
+++ b/lib/private/tagging/tagmapper.php
@@ -24,7 +24,7 @@ namespace OC\Tagging;
use \OCP\AppFramework\Db\Mapper,
\OCP\AppFramework\Db\DoesNotExistException,
- \OCP\IDb;
+ \OCP\IDBConnection;
/**
* Mapper for Tag entity
@@ -34,9 +34,9 @@ class TagMapper extends Mapper {
/**
* Constructor.
*
- * @param IDb $db Instance of the Db abstraction layer.
+ * @param IDBConnection $db Instance of the Db abstraction layer.
*/
- public function __construct(IDb $db) {
+ public function __construct(IDBConnection $db) {
parent::__construct($db, 'vcategory', 'OC\Tagging\Tag');
}
diff --git a/lib/private/tagmanager.php b/lib/private/tagmanager.php
index 6c7eeab87eb..c0ba56a2da8 100644
--- a/lib/private/tagmanager.php
+++ b/lib/private/tagmanager.php
@@ -76,6 +76,11 @@ class TagManager implements \OCP\ITagManager {
*/
public function load($type, $defaultTags = array(), $includeShared = false, $userId = null) {
if (is_null($userId)) {
+ $user = $this->userSession->getUser();
+ if ($user === null) {
+ // nothing we can do without a user
+ return null;
+ }
$userId = $this->userSession->getUser()->getUId();
}
return new Tags($this->mapper, $userId, $type, $defaultTags, $includeShared);
diff --git a/lib/private/tags.php b/lib/private/tags.php
index 4d737e47e07..200ec8c2771 100644
--- a/lib/private/tags.php
+++ b/lib/private/tags.php
@@ -247,7 +247,7 @@ class Tags implements \OCP\ITags {
* Throws an exception if the tag could not be found.
*
* @param string $tag Tag id or name.
- * @return array An array of object ids or false on error.
+ * @return array|false An array of object ids or false on error.
*/
public function getIdsForTag($tag) {
$result = null;
@@ -337,7 +337,7 @@ class Tags implements \OCP\ITags {
* Add a new tag.
*
* @param string $name A string with a name of the tag
- * @return false|string the id of the added tag or false on error.
+ * @return false|int the id of the added tag or false on error.
*/
public function add($name) {
$name = trim($name);
@@ -575,7 +575,7 @@ class Tags implements \OCP\ITags {
/**
* Get favorites for an object type
*
- * @return array An array of object ids.
+ * @return array|false An array of object ids.
*/
public function getFavorites() {
try {
diff --git a/lib/private/template.php b/lib/private/template.php
index d407eb8384c..b0d212c6f53 100644
--- a/lib/private/template.php
+++ b/lib/private/template.php
@@ -215,6 +215,7 @@ class OC_Template extends \OC\Template\Base {
* @param Exception $exception
*/
public static function printExceptionErrorPage(Exception $exception) {
+ $request = \OC::$server->getRequest();
$content = new \OC_Template('', 'exception', 'error', false);
$content->assign('errorMsg', $exception->getMessage());
$content->assign('errorCode', $exception->getCode());
@@ -222,8 +223,8 @@ class OC_Template extends \OC\Template\Base {
$content->assign('line', $exception->getLine());
$content->assign('trace', $exception->getTraceAsString());
$content->assign('debugMode', defined('DEBUG') && DEBUG === true);
- $content->assign('remoteAddr', OC_Request::getRemoteAddress());
- $content->assign('requestID', OC_Request::getRequestID());
+ $content->assign('remoteAddr', $request->getRemoteAddress());
+ $content->assign('requestID', $request->getId());
$content->printPage();
die();
}
diff --git a/lib/private/template/cssresourcelocator.php b/lib/private/template/cssresourcelocator.php
index cb129261b51..7fcb3d02ba9 100644
--- a/lib/private/template/cssresourcelocator.php
+++ b/lib/private/template/cssresourcelocator.php
@@ -9,7 +9,10 @@
namespace OC\Template;
class CSSResourceLocator extends ResourceLocator {
- public function doFind( $style ) {
+ /**
+ * @param string $style
+ */
+ public function doFind($style) {
if (strpos($style, '3rdparty') === 0
&& $this->appendIfExist($this->thirdpartyroot, $style.'.css')
|| $this->appendIfExist($this->serverroot, $style.'.css')
@@ -21,14 +24,13 @@ class CSSResourceLocator extends ResourceLocator {
$style = substr($style, strpos($style, '/')+1);
$app_path = \OC_App::getAppPath($app);
$app_url = \OC_App::getAppWebPath($app);
- if ($this->appendIfExist($app_path, $style.'.css', $app_url)
- ) {
- return;
- }
- throw new \Exception('css file not found: style:'.$style);
+ $this->append($app_path, $style.'.css', $app_url);
}
- public function doFindTheme( $style ) {
+ /**
+ * @param string $style
+ */
+ public function doFindTheme($style) {
$theme_dir = 'themes/'.$this->theme.'/';
$this->appendIfExist($this->serverroot, $theme_dir.'apps/'.$style.'.css')
|| $this->appendIfExist($this->serverroot, $theme_dir.$style.'.css')
diff --git a/lib/private/template/jsresourcelocator.php b/lib/private/template/jsresourcelocator.php
index 5a6672429cf..6ddc5e6ad7d 100644
--- a/lib/private/template/jsresourcelocator.php
+++ b/lib/private/template/jsresourcelocator.php
@@ -9,7 +9,10 @@
namespace OC\Template;
class JSResourceLocator extends ResourceLocator {
- public function doFind( $script ) {
+ /**
+ * @param string $script
+ */
+ public function doFind($script) {
$theme_dir = 'themes/'.$this->theme.'/';
if (strpos($script, '3rdparty') === 0
&& $this->appendIfExist($this->thirdpartyroot, $script.'.js')
@@ -25,16 +28,18 @@ class JSResourceLocator extends ResourceLocator {
$script = substr($script, strpos($script, '/')+1);
$app_path = \OC_App::getAppPath($app);
$app_url = \OC_App::getAppWebPath($app);
- if ($this->appendIfExist($app_path, $script.'.js', $app_url)) {
- return;
- }
+
// missing translations files fill be ignored
- if (strpos($script, "l10n/") === 0) {
+ if (strpos($script, 'l10n/') === 0) {
+ $this->appendIfExist($app_path, $script . '.js', $app_url);
return;
}
- throw new \Exception('js file not found: script:'.$script);
+ $this->append($app_path, $script . '.js', $app_url);
}
- public function doFindTheme( $script ) {
+ /**
+ * @param string $script
+ */
+ public function doFindTheme($script) {
}
}
diff --git a/lib/private/template/resourcelocator.php b/lib/private/template/resourcelocator.php
index 919665df704..cf64f331cc9 100644
--- a/lib/private/template/resourcelocator.php
+++ b/lib/private/template/resourcelocator.php
@@ -18,10 +18,17 @@ abstract class ResourceLocator {
protected $resources = array();
+ /** @var \OCP\ILogger */
+ protected $logger;
+
/**
+ * @param \OCP\ILogger $logger
* @param string $theme
+ * @param array $core_map
+ * @param array $party_map
*/
- public function __construct( $theme, $core_map, $party_map ) {
+ public function __construct(\OCP\ILogger $logger, $theme, $core_map, $party_map) {
+ $this->logger = $logger;
$this->theme = $theme;
$this->mapping = $core_map + $party_map;
$this->serverroot = key($core_map);
@@ -29,41 +36,82 @@ abstract class ResourceLocator {
$this->webroot = $this->mapping[$this->serverroot];
}
- abstract public function doFind( $resource );
- abstract public function doFindTheme( $resource );
+ /**
+ * @param string $resource
+ */
+ abstract public function doFind($resource);
+
+ /**
+ * @param string $resource
+ */
+ abstract public function doFindTheme($resource);
- public function find( $resources ) {
- try {
- foreach($resources as $resource) {
+ /**
+ * Finds the resources and adds them to the list
+ *
+ * @param array $resources
+ */
+ public function find($resources) {
+ foreach ($resources as $resource) {
+ try {
$this->doFind($resource);
+ } catch (ResourceNotFoundException $e) {
+ $resourceApp = substr($resource, 0, strpos($resource, '/'));
+ $this->logger->error('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
}
- if (!empty($this->theme)) {
- foreach($resources as $resource) {
+ }
+ if (!empty($this->theme)) {
+ foreach ($resources as $resource) {
+ try {
$this->doFindTheme($resource);
+ } catch (ResourceNotFoundException $e) {
+ $resourceApp = substr($resource, 0, strpos($resource, '/'));
+ $this->logger->error('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]);
}
}
- } catch (\Exception $e) {
- throw new \Exception($e->getMessage().' serverroot:'.$this->serverroot);
}
}
- /*
+ /**
* append the $file resource if exist at $root
+ *
* @param string $root path to check
* @param string $file the filename
- * @param string|null $webroot base for path, default map $root to $webroot
+ * @param string|null $webRoot base for path, default map $root to $webRoot
+ * @return bool True if the resource was found, false otherwise
*/
- protected function appendIfExist($root, $file, $webroot = null) {
+ protected function appendIfExist($root, $file, $webRoot = null) {
if (is_file($root.'/'.$file)) {
- if (!$webroot) {
- $webroot = $this->mapping[$root];
- }
- $this->resources[] = array($root, $webroot, $file);
+ $this->append($root, $file, $webRoot, false);
return true;
}
return false;
}
+ /**
+ * append the $file resource at $root
+ *
+ * @param string $root path to check
+ * @param string $file the filename
+ * @param string|null $webRoot base for path, default map $root to $webRoot
+ * @param bool $throw Throw an exception, when the route does not exist
+ * @throws ResourceNotFoundException Only thrown when $throw is true and the resource is missing
+ */
+ protected function append($root, $file, $webRoot = null, $throw = true) {
+ if (!$webRoot) {
+ $webRoot = $this->mapping[$root];
+ }
+ $this->resources[] = array($root, $webRoot, $file);
+
+ if ($throw && !is_file($root . '/' . $file)) {
+ throw new ResourceNotFoundException($file, $webRoot);
+ }
+ }
+
+ /**
+ * Returns the list of all resources that should be loaded
+ * @return array
+ */
public function getResources() {
return $this->resources;
}
diff --git a/lib/private/template/resourcenotfoundexception.php b/lib/private/template/resourcenotfoundexception.php
new file mode 100644
index 00000000000..8a728fce2f1
--- /dev/null
+++ b/lib/private/template/resourcenotfoundexception.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Joas Schilling
+ * @copyright 2015 Joas Schilling nickvergessen@owncloud.com
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Template;
+
+class ResourceNotFoundException extends \LogicException {
+ protected $resource;
+ protected $webPath;
+
+ /**
+ * @param string $resource
+ * @param string $webPath
+ */
+ public function __construct($resource, $webPath) {
+ parent::__construct('Resource not found');
+ $this->resource = $resource;
+ $this->webPath = $webPath;
+ }
+
+ /**
+ * @return string
+ */
+ public function getResourcePath() {
+ return $this->resource . '/' . $this->webPath;
+ }
+}
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 1a97eb26347..3220d9d969c 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -34,9 +34,9 @@ class OC_TemplateLayout extends OC_Template {
$this->config = \OC::$server->getConfig();
// Decide which page we show
- if( $renderAs == 'user' ) {
+ if($renderAs == 'user') {
parent::__construct( 'core', 'layout.user' );
- if(in_array(OC_APP::getCurrentApp(), array('settings','admin', 'help'))!==false) {
+ if(in_array(OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
$this->assign('bodyid', 'body-settings');
}else{
$this->assign('bodyid', 'body-user');
@@ -45,7 +45,8 @@ class OC_TemplateLayout extends OC_Template {
// Update notification
if($this->config->getSystemValue('updatechecker', true) === true &&
OC_User::isAdminUser(OC_User::getUser())) {
- $updater = new \OC\Updater(\OC::$server->getHTTPHelper(), \OC::$server->getAppConfig());
+ $updater = new \OC\Updater(\OC::$server->getHTTPHelper(),
+ \OC::$server->getConfig());
$data = $updater->check();
if(isset($data['version']) && $data['version'] != '' and $data['version'] !== Array()) {
@@ -72,9 +73,9 @@ class OC_TemplateLayout extends OC_Template {
}
}
$userDisplayName = OC_User::getDisplayName();
- $this->assign( 'user_displayname', $userDisplayName );
- $this->assign( 'user_uid', OC_User::getUser() );
- $this->assign( 'appsmanagement_active', strpos(OC_Request::requestUri(), OC_Helper::linkToRoute('settings_apps')) === 0 );
+ $this->assign('user_displayname', $userDisplayName);
+ $this->assign('user_uid', OC_User::getUser());
+ $this->assign('appsmanagement_active', strpos(\OC::$server->getRequest()->getRequestUri(), OC_Helper::linkToRoute('settings_apps')) === 0 );
$this->assign('enableAvatars', $this->config->getSystemValue('enable_avatars', true));
$this->assign('userAvatarSet', \OC_Helper::userAvatarSet(OC_User::getUser()));
} else if ($renderAs == 'error') {
@@ -134,7 +135,9 @@ class OC_TemplateLayout extends OC_Template {
// Read the selected theme from the config file
$theme = OC_Util::getTheme();
- $locator = new \OC\Template\CSSResourceLocator( $theme,
+ $locator = new \OC\Template\CSSResourceLocator(
+ OC::$server->getLogger(),
+ $theme,
array( OC::$SERVERROOT => OC::$WEBROOT ),
array( OC::$THIRDPARTYROOT => OC::$THIRDPARTYWEBROOT ));
$locator->find($styles);
@@ -149,7 +152,9 @@ class OC_TemplateLayout extends OC_Template {
// Read the selected theme from the config file
$theme = OC_Util::getTheme();
- $locator = new \OC\Template\JSResourceLocator( $theme,
+ $locator = new \OC\Template\JSResourceLocator(
+ OC::$server->getLogger(),
+ $theme,
array( OC::$SERVERROOT => OC::$WEBROOT ),
array( OC::$THIRDPARTYROOT => OC::$THIRDPARTYWEBROOT ));
$locator->find($scripts);
diff --git a/lib/private/tempmanager.php b/lib/private/tempmanager.php
index a3bb07f9d63..60b9c9dc0d4 100644
--- a/lib/private/tempmanager.php
+++ b/lib/private/tempmanager.php
@@ -132,12 +132,14 @@ class TempManager implements ITempManager {
$cutOfTime = time() - 3600;
$files = array();
$dh = opendir($this->tmpBaseDir);
- while (($file = readdir($dh)) !== false) {
- if (substr($file, 0, 7) === 'oc_tmp_') {
- $path = $this->tmpBaseDir . '/' . $file;
- $mtime = filemtime($path);
- if ($mtime < $cutOfTime) {
- $files[] = $path;
+ if ($dh) {
+ while (($file = readdir($dh)) !== false) {
+ if (substr($file, 0, 7) === 'oc_tmp_') {
+ $path = $this->tmpBaseDir . '/' . $file;
+ $mtime = filemtime($path);
+ if ($mtime < $cutOfTime) {
+ $files[] = $path;
+ }
}
}
}
diff --git a/lib/private/updater.php b/lib/private/updater.php
index fb41e2d36f0..302003e666c 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -9,6 +9,9 @@
namespace OC;
use OC\Hooks\BasicEmitter;
+use OC_App;
+use OC_Util;
+use OCP\IConfig;
/**
* Class that handles autoupdating of ownCloud
@@ -21,29 +24,27 @@ use OC\Hooks\BasicEmitter;
*/
class Updater extends BasicEmitter {
- /**
- * @var \OC\Log $log
- */
+ /** @var \OC\Log $log */
private $log;
- /**
- * @var \OC\HTTPHelper $helper;
- */
+ /** @var \OC\HTTPHelper $helper */
private $httpHelper;
- /**
- * @var \OCP\IAppConfig;
- */
+ /** @var IConfig */
private $config;
+ /** @var bool */
private $simulateStepEnabled;
+ /** @var bool */
private $updateStepEnabled;
/**
+ * @param HTTPHelper $httpHelper
+ * @param IConfig $config
* @param \OC\Log $log
*/
- public function __construct($httpHelper, $config, $log = null) {
+ public function __construct(HTTPHelper $httpHelper, IConfig $config, $log = null) {
$this->httpHelper = $httpHelper;
$this->log = $log;
$this->config = $config;
@@ -81,23 +82,23 @@ class Updater extends BasicEmitter {
public function check($updaterUrl = null) {
// Look up the cache - it is invalidated all 30 minutes
- if (($this->config->getValue('core', 'lastupdatedat') + 1800) > time()) {
- return json_decode($this->config->getValue('core', 'lastupdateResult'), true);
+ if (((int)$this->config->getAppValue('core', 'lastupdatedat') + 1800) > time()) {
+ return json_decode($this->config->getAppValue('core', 'lastupdateResult'), true);
}
if (is_null($updaterUrl)) {
$updaterUrl = 'https://apps.owncloud.com/updater.php';
}
- $this->config->setValue('core', 'lastupdatedat', time());
+ $this->config->setAppValue('core', 'lastupdatedat', time());
- if ($this->config->getValue('core', 'installedat', '') == '') {
- $this->config->setValue('core', 'installedat', microtime(true));
+ if ($this->config->getAppValue('core', 'installedat', '') == '') {
+ $this->config->setAppValue('core', 'installedat', microtime(true));
}
$version = \OC_Util::getVersion();
- $version['installed'] = $this->config->getValue('core', 'installedat');
- $version['updated'] = $this->config->getValue('core', 'lastupdatedat');
+ $version['installed'] = $this->config->getAppValue('core', 'installedat');
+ $version['updated'] = $this->config->getAppValue('core', 'lastupdatedat');
$version['updatechannel'] = \OC_Util::getChannel();
$version['edition'] = \OC_Util::getEditionString();
$version['build'] = \OC_Util::getBuild();
@@ -125,7 +126,7 @@ class Updater extends BasicEmitter {
}
// Cache the result
- $this->config->setValue('core', 'lastupdateResult', json_encode($data));
+ $this->config->setAppValue('core', 'lastupdateResult', json_encode($data));
return $tmp;
}
@@ -136,9 +137,9 @@ class Updater extends BasicEmitter {
* @return bool true if the operation succeeded, false otherwise
*/
public function upgrade() {
- \OC_Config::setValue('maintenance', true);
+ $this->config->setSystemValue('maintenance', true);
- $installedVersion = \OC_Config::getValue('version', '0.0.0');
+ $installedVersion = $this->config->getSystemValue('version', '0.0.0');
$currentVersion = implode('.', \OC_Util::getVersion());
if ($this->log) {
$this->log->debug('starting upgrade from ' . $installedVersion . ' to ' . $currentVersion, array('app' => 'core'));
@@ -151,7 +152,7 @@ class Updater extends BasicEmitter {
$this->emit('\OC\Updater', 'failure', array($exception->getMessage()));
}
- \OC_Config::setValue('maintenance', false);
+ $this->config->setSystemValue('maintenance', false);
$this->emit('\OC\Updater', 'maintenanceEnd');
}
@@ -172,6 +173,20 @@ class Updater extends BasicEmitter {
}
/**
+ * Forward messages emitted by the repair routine
+ *
+ * @param Repair $repair repair routine
+ */
+ private function emitRepairMessages(Repair $repair) {
+ $repair->listen('\OC\Repair', 'warning', function ($description) {
+ $this->emit('\OC\Updater', 'repairWarning', array($description));
+ });
+ $repair->listen('\OC\Repair', 'error', function ($description) {
+ $this->emit('\OC\Updater', 'repairError', array($description));
+ });
+ }
+
+ /**
* runs the update actions in maintenance mode, does not upgrade the source files
* except the main .htaccess file
*
@@ -190,7 +205,7 @@ class Updater extends BasicEmitter {
// Update htaccess files for apache hosts
if (isset($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache')) {
try {
- \OC_Setup::updateHtaccess();
+ \OC\Setup::updateHtaccess();
} catch (\Exception $e) {
throw new \Exception($e->getMessage());
}
@@ -199,10 +214,11 @@ class Updater extends BasicEmitter {
// create empty file in data dir, so we can later find
// out that this is indeed an ownCloud data directory
// (in case it didn't exist before)
- file_put_contents(\OC_Config::getValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', '');
+ file_put_contents($this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/.ocdata', '');
// pre-upgrade repairs
- $repair = new \OC\Repair(\OC\Repair::getBeforeUpgradeRepairSteps());
+ $repair = new Repair(Repair::getBeforeUpgradeRepairSteps());
+ $this->emitRepairMessages($repair);
$repair->run();
// simulate DB upgrade
@@ -217,22 +233,19 @@ class Updater extends BasicEmitter {
if ($this->updateStepEnabled) {
$this->doCoreUpgrade();
- $disabledApps = \OC_App::checkAppsRequirements();
- if (!empty($disabledApps)) {
- $this->emit('\OC\Updater', 'disabledApps', array($disabledApps));
- }
-
+ $this->checkAppsRequirements();
$this->doAppUpgrade();
// post-upgrade repairs
- $repair = new \OC\Repair(\OC\Repair::getRepairSteps());
+ $repair = new Repair(Repair::getRepairSteps());
+ $this->emitRepairMessages($repair);
$repair->run();
//Invalidate update feed
- $this->config->setValue('core', 'lastupdatedat', 0);
+ $this->config->setAppValue('core', 'lastupdatedat', 0);
// only set the final version if everything went well
- \OC_Config::setValue('version', implode('.', \OC_Util::getVersion()));
+ $this->config->setSystemValue('version', implode('.', \OC_Util::getVersion()));
}
}
@@ -257,14 +270,11 @@ class Updater extends BasicEmitter {
$apps = \OC_App::getEnabledApps();
foreach ($apps as $appId) {
- if ($version) {
- $info = \OC_App::getAppInfo($appId);
- $compatible = \OC_App::isAppCompatible($version, $info);
- } else {
- $compatible = true;
- }
+ $info = \OC_App::getAppInfo($appId);
+ $compatible = \OC_App::isAppCompatible($version, $info);
+ $isShipped = \OC_App::isShipped($appId);
- if ($compatible && \OC_App::shouldUpgrade($appId)) {
+ if ($compatible && $isShipped && \OC_App::shouldUpgrade($appId)) {
/**
* FIXME: The preupdate check is performed before the database migration, otherwise database changes
* are not possible anymore within it. - Consider this when touching the code.
@@ -291,15 +301,94 @@ class Updater extends BasicEmitter {
include \OC_App::getAppPath($appId) . '/appinfo/preupdate.php';
}
+
+ /**
+ * upgrades all apps within a major ownCloud upgrade. Also loads "priority"
+ * (types authentication, filesystem, logging, in that order) afterwards.
+ *
+ * @throws NeedsUpdateException
+ */
protected function doAppUpgrade() {
$apps = \OC_App::getEnabledApps();
+ $priorityTypes = array('authentication', 'filesystem', 'logging');
+ $pseudoOtherType = 'other';
+ $stacks = array($pseudoOtherType => array());
foreach ($apps as $appId) {
- if (\OC_App::shouldUpgrade($appId)) {
- \OC_App::updateApp($appId);
- $this->emit('\OC\Updater', 'appUpgrade', array($appId, \OC_App::getAppVersion($appId)));
+ $priorityType = false;
+ foreach ($priorityTypes as $type) {
+ if(!isset($stacks[$type])) {
+ $stacks[$type] = array();
+ }
+ if (\OC_App::isType($appId, $type)) {
+ $stacks[$type][] = $appId;
+ $priorityType = true;
+ break;
+ }
+ }
+ if (!$priorityType) {
+ $stacks[$pseudoOtherType][] = $appId;
+ }
+ }
+ foreach ($stacks as $type => $stack) {
+ foreach ($stack as $appId) {
+ if (\OC_App::shouldUpgrade($appId)) {
+ \OC_App::updateApp($appId);
+ $this->emit('\OC\Updater', 'appUpgrade', array($appId, \OC_App::getAppVersion($appId)));
+ }
+ if($type !== $pseudoOtherType) {
+ // load authentication, filesystem and logging apps after
+ // upgrading them. Other apps my need to rely on modifying
+ // user and/or filesystem aspects.
+ \OC_App::loadApp($appId, false);
+ }
}
}
}
+
+ /**
+ * check if the current enabled apps are compatible with the current
+ * ownCloud version. disable them if not.
+ * This is important if you upgrade ownCloud and have non ported 3rd
+ * party apps installed.
+ */
+ private function checkAppsRequirements() {
+ $isCoreUpgrade = $this->isCodeUpgrade();
+ $apps = OC_App::getEnabledApps();
+ $version = OC_Util::getVersion();
+ foreach ($apps as $app) {
+ // check if the app is compatible with this version of ownCloud
+ $info = OC_App::getAppInfo($app);
+ if(!OC_App::isAppCompatible($version, $info)) {
+ OC_App::disable($app);
+ $this->emit('\OC\Updater', 'incompatibleAppDisabled', array($app));
+ }
+ // no need to disable any app in case this is a non-core upgrade
+ if (!$isCoreUpgrade) {
+ continue;
+ }
+ // shipped apps will remain enabled
+ if (OC_App::isShipped($app)) {
+ continue;
+ }
+ // authentication and session apps will remain enabled as well
+ if (OC_App::isType($app, ['session', 'authentication'])) {
+ continue;
+ }
+
+ // disable any other 3rd party apps
+ \OC_App::disable($app);
+ $this->emit('\OC\Updater', 'thirdPartyAppDisabled', array($app));
+ }
+ }
+
+ private function isCodeUpgrade() {
+ $installedVersion = $this->config->getSystemValue('version', '0.0.0');
+ $currentVersion = implode('.', OC_Util::getVersion());
+ if (version_compare($currentVersion, $installedVersion, '>')) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/lib/private/urlgenerator.php b/lib/private/urlgenerator.php
index d263d25aeef..e87a6c354fb 100644
--- a/lib/private/urlgenerator.php
+++ b/lib/private/urlgenerator.php
@@ -32,8 +32,7 @@ class URLGenerator implements IURLGenerator {
/**
* Creates an url using a defined route
* @param string $route
- * @param array $parameters
- * @internal param array $args with param=>value, will be appended to the returned url
+ * @param array $parameters args with param=>value, will be appended to the returned url
* @return string the url
*
* Returns a url to the given route.
@@ -45,9 +44,8 @@ class URLGenerator implements IURLGenerator {
/**
* Creates an absolute url using a defined route
- * @param string $route
- * @param array $parameters
- * @internal param array $args with param=>value, will be appended to the returned url
+ * @param string $routeName
+ * @param array $arguments args with param=>value, will be appended to the returned url
* @return string the url
*
* Returns an absolute url to the given route.
@@ -172,7 +170,8 @@ class URLGenerator implements IURLGenerator {
? ''
: \OC::$WEBROOT;
- return \OC_Request::serverProtocol() . '://' . \OC_Request::serverHost(). $webRoot . $separator . $url;
+ $request = \OC::$server->getRequest();
+ return $request->getServerProtocol() . '://' . $request->getServerHost() . $webRoot . $separator . $url;
}
/**
diff --git a/lib/private/user.php b/lib/private/user.php
index d1fedffcaaf..27d24306be7 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -64,6 +64,7 @@ class OC_User {
/**
* registers backend
+ *
* @param string $backend name of the backend
* @deprecated Add classes by calling OC_User::useBackend() with a class instance instead
* @return bool
@@ -77,6 +78,7 @@ class OC_User {
/**
* gets available backends
+ *
* @deprecated
* @return array an array of backends
*
@@ -88,6 +90,7 @@ class OC_User {
/**
* gets used backends
+ *
* @deprecated
* @return array an array of backends
*
@@ -99,6 +102,7 @@ class OC_User {
/**
* Adds the backend to the list of used backends
+ *
* @param string|OC_User_Interface $backend default: database The backend to use for user management
* @return bool
*
@@ -171,6 +175,7 @@ class OC_User {
/**
* Create a new user
+ *
* @param string $uid The username of the user to create
* @param string $password The password of the new user
* @throws Exception
@@ -180,7 +185,7 @@ class OC_User {
* itself, not in its subclasses.
*
* Allowed characters in the username are: "a-z", "A-Z", "0-9" and "_.@-"
- * @deprecated Use \OC::$server->getUserManager->createUser($uid, $password)
+ * @deprecated Use \OC::$server->getUserManager()->createUser($uid, $password)
*/
public static function createUser($uid, $password) {
return self::getManager()->createUser($uid, $password);
@@ -188,6 +193,7 @@ class OC_User {
/**
* delete a user
+ *
* @param string $uid The username of the user to delete
* @return bool
*
@@ -205,6 +211,7 @@ class OC_User {
/**
* Try to login a user
+ *
* @param string $loginname The login name of the user to log in
* @param string $password The password of the user
* @return boolean|null
@@ -245,14 +252,14 @@ class OC_User {
$uid = $backend->getCurrentUserId();
$run = true;
- OC_Hook::emit( "OC_User", "pre_login", array( "run" => &$run, "uid" => $uid ));
+ OC_Hook::emit("OC_User", "pre_login", array("run" => &$run, "uid" => $uid));
- if($uid) {
+ if ($uid) {
self::setUserId($uid);
self::setDisplayName($uid);
self::getUserSession()->setLoginName($uid);
- OC_Hook::emit( "OC_User", "post_login", array( "uid" => $uid, 'password'=>'' ));
+ OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => ''));
return true;
}
return false;
@@ -286,11 +293,18 @@ class OC_User {
* Sets user id for session and triggers emit
*/
public static function setUserId($uid) {
- \OC::$server->getSession()->set('user_id', $uid);
+ $userSession = \OC::$server->getUserSession();
+ $userManager = \OC::$server->getUserManager();
+ if ($user = $userManager->get($uid)) {
+ $userSession->setUser($user);
+ } else {
+ \OC::$server->getSession()->set('user_id', $uid);
+ }
}
/**
* Sets user display name for session
+ *
* @param string $uid
* @param null $displayName
* @return bool Whether the display name could get set
@@ -320,13 +334,14 @@ class OC_User {
* Tries to login the user with HTTP Basic Authentication
*/
public static function tryBasicAuthLogin() {
- if(!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
+ if (!empty($_SERVER['PHP_AUTH_USER']) && !empty($_SERVER['PHP_AUTH_PW'])) {
\OC_User::login($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
}
}
/**
* Check if the user is logged in, considers also the HTTP basic credentials
+ *
* @return bool
*/
public static function isLoggedIn() {
@@ -339,6 +354,7 @@ class OC_User {
/**
* set incognito mode, e.g. if a user wants to open a public link
+ *
* @param bool $status
*/
public static function setIncognitoMode($status) {
@@ -347,6 +363,7 @@ class OC_User {
/**
* get incognito mode status
+ *
* @return bool
*/
public static function isIncognitoMode() {
@@ -366,11 +383,12 @@ class OC_User {
return $backend->getLogoutAttribute();
}
- return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . OC_Util::callRegister() . '"';
+ return 'href="' . link_to('', 'index.php') . '?logout=true&requesttoken=' . urlencode(OC_Util::callRegister()) . '"';
}
/**
* Check if the user is an admin user
+ *
* @param string $uid uid of the admin
* @return bool
*/
@@ -384,6 +402,7 @@ class OC_User {
/**
* get the user id of the user currently logged in.
+ *
* @return string uid or false
*/
public static function getUser() {
@@ -397,6 +416,7 @@ class OC_User {
/**
* get the display name of the user currently logged in.
+ *
* @param string $uid
* @return string uid or false
*/
@@ -420,6 +440,7 @@ class OC_User {
/**
* Autogenerate a password
+ *
* @return string
*
* generates a password
@@ -430,6 +451,7 @@ class OC_User {
/**
* Set password
+ *
* @param string $uid The username
* @param string $password The new password
* @param string $recoveryPassword for the encryption app to reset encryption keys
@@ -448,6 +470,7 @@ class OC_User {
/**
* Check whether user can change his avatar
+ *
* @param string $uid The username
* @return bool
*
@@ -464,6 +487,7 @@ class OC_User {
/**
* Check whether user can change his password
+ *
* @param string $uid The username
* @return bool
*
@@ -480,6 +504,7 @@ class OC_User {
/**
* Check whether user can change his display name
+ *
* @param string $uid The username
* @return bool
*
@@ -496,6 +521,7 @@ class OC_User {
/**
* Check if the password is correct
+ *
* @param string $uid The username
* @param string $password The password
* @return string|false user id a string on success, false otherwise
@@ -530,6 +556,7 @@ class OC_User {
/**
* Get a list of all users
+ *
* @return array an array of all uids
*
* Get a list of all users.
@@ -548,6 +575,7 @@ class OC_User {
/**
* Get a list of all users display name
+ *
* @param string $search
* @param int $limit
* @param int $offset
@@ -567,6 +595,7 @@ class OC_User {
/**
* check if a user exists
+ *
* @param string $uid the username
* @return boolean
*/
@@ -615,6 +644,7 @@ class OC_User {
/**
* Set cookie value to use in next page load
+ *
* @param string $username username to be set
* @param string $token
*/
@@ -631,6 +661,7 @@ class OC_User {
/**
* Returns the first active backend from self::$_usedBackends.
+ *
* @return OCP\Authentication\IApacheBackend|null if no backend active, otherwise OCP\Authentication\IApacheBackend
*/
private static function findFirstActiveUsedBackend() {
diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php
index 1fc89f8c2c2..85abd001ca8 100644
--- a/lib/private/user/manager.php
+++ b/lib/private/user/manager.php
@@ -163,10 +163,7 @@ class Manager extends PublicEmitter implements IUserManager {
}
}
- $remoteAddr = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '';
- $forwardedFor = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '';
-
- \OC::$server->getLogger()->warning('Login failed: \''. $loginname .'\' (Remote IP: \''. $remoteAddr .'\', X-Forwarded-For: \''. $forwardedFor .'\')', array('app' => 'core'));
+ \OC::$server->getLogger()->warning('Login failed: \''. $loginname .'\' (Remote IP: \''. \OC::$server->getRequest()->getRemoteAddress(). ')', ['app' => 'core']);
return false;
}
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index ffb26776f97..a7567952053 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -265,27 +265,30 @@ class Session implements IUserSession, Emitter {
* @param string $token
*/
public function setMagicInCookie($username, $token) {
- $secure_cookie = \OC_Config::getValue("forcessl", false); //TODO: DI for cookies and OC_Config
+ $secureCookie = \OC::$server->getRequest()->getServerProtocol() === 'https';
$expires = time() + \OC_Config::getValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15);
- setcookie("oc_username", $username, $expires, \OC::$WEBROOT, '', $secure_cookie);
- setcookie("oc_token", $token, $expires, \OC::$WEBROOT, '', $secure_cookie, true);
- setcookie("oc_remember_login", "1", $expires, \OC::$WEBROOT, '', $secure_cookie);
+ setcookie("oc_username", $username, $expires, \OC::$WEBROOT, '', $secureCookie, true);
+ setcookie("oc_token", $token, $expires, \OC::$WEBROOT, '', $secureCookie, true);
+ setcookie("oc_remember_login", "1", $expires, \OC::$WEBROOT, '', $secureCookie, true);
}
/**
* Remove cookie for "remember username"
*/
public function unsetMagicInCookie() {
+ //TODO: DI for cookies and OC_Config
+ $secureCookie = \OC_Config::getValue('forcessl', false);
+
unset($_COOKIE["oc_username"]); //TODO: DI
unset($_COOKIE["oc_token"]);
unset($_COOKIE["oc_remember_login"]);
- setcookie('oc_username', '', time() - 3600, \OC::$WEBROOT);
- setcookie('oc_token', '', time() - 3600, \OC::$WEBROOT);
- setcookie('oc_remember_login', '', time() - 3600, \OC::$WEBROOT);
+ setcookie('oc_username', '', time() - 3600, \OC::$WEBROOT, '',$secureCookie, true);
+ setcookie('oc_token', '', time() - 3600, \OC::$WEBROOT, '', $secureCookie, true);
+ setcookie('oc_remember_login', '', time() - 3600, \OC::$WEBROOT, '', $secureCookie, true);
// old cookies might be stored under /webroot/ instead of /webroot
// and Firefox doesn't like it!
- setcookie('oc_username', '', time() - 3600, \OC::$WEBROOT . '/');
- setcookie('oc_token', '', time() - 3600, \OC::$WEBROOT . '/');
- setcookie('oc_remember_login', '', time() - 3600, \OC::$WEBROOT . '/');
+ setcookie('oc_username', '', time() - 3600, \OC::$WEBROOT . '/', '', $secureCookie, true);
+ setcookie('oc_token', '', time() - 3600, \OC::$WEBROOT . '/', '', $secureCookie, true);
+ setcookie('oc_remember_login', '', time() - 3600, \OC::$WEBROOT . '/', '', $secureCookie, true);
}
}
diff --git a/lib/private/util.php b/lib/private/util.php
index c08cff81469..72802409da9 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -11,6 +11,10 @@ class OC_Util {
private static $rootMounted = false;
private static $fsSetup = false;
+ protected static function getAppManager() {
+ return \OC::$server->getAppManager();
+ }
+
private static function initLocalStorageRootFS() {
// mount local file backend as root
$configDataDirectory = OC_Config::getValue("datadirectory", OC::$SERVERROOT . "/data");
@@ -317,7 +321,7 @@ class OC_Util {
private static function loadVersion() {
$timestamp = filemtime(OC::$SERVERROOT . '/version.php');
if (!\OC::$server->getSession()->exists('OC_Version') or OC::$server->getSession()->get('OC_Version_Timestamp') != $timestamp) {
- require 'version.php';
+ require OC::$SERVERROOT . '/version.php';
$session = \OC::$server->getSession();
/** @var $timestamp int */
$session->set('OC_Version_Timestamp', $timestamp);
@@ -392,8 +396,7 @@ class OC_Util {
*/
public static function addTranslations($application, $languageCode = null) {
if (is_null($languageCode)) {
- $l = new \OC_L10N($application);
- $languageCode = $l->getLanguageCode($application);
+ $languageCode = \OC_L10N::findLanguage($application);
}
if (!empty($application)) {
$path = "$application/l10n/$languageCode";
@@ -494,7 +497,7 @@ class OC_Util {
}
$webServerRestart = false;
- $setup = new OC_Setup($config);
+ $setup = new \OC\Setup($config, \OC::$server->getIniWrapper(), \OC::$server->getL10N('lib'), new \OC_Defaults());
$availableDatabases = $setup->getSupportedDatabases();
if (empty($availableDatabases)) {
$errors[] = array(
@@ -504,11 +507,6 @@ class OC_Util {
$webServerRestart = true;
}
- //common hint for all file permissions error messages
- $permissionsHint = $l->t('Permissions can usually be fixed by '
- . '%sgiving the webserver write access to the root directory%s.',
- array('<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>'));
-
// Check if config folder is writable.
if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
$errors[] = array(
@@ -549,6 +547,10 @@ class OC_Util {
);
}
} else if (!is_writable($CONFIG_DATADIRECTORY) or !is_readable($CONFIG_DATADIRECTORY)) {
+ //common hint for all file permissions error messages
+ $permissionsHint = $l->t('Permissions can usually be fixed by '
+ . '%sgiving the webserver write access to the root directory%s.',
+ array('<a href="' . \OC_Helper::linkToDocs('admin-dir_permissions') . '" target="_blank">', '</a>'));
$errors[] = array(
'error' => 'Data directory (' . $CONFIG_DATADIRECTORY . ') not writable by ownCloud',
'hint' => $permissionsHint
@@ -571,7 +573,10 @@ class OC_Util {
// classes = class_exists
// functions = function_exists
// defined = defined
+ // ini = ini_get
// If the dependency is not found the missing module name is shown to the EndUser
+ // When adding new checks always verify that they pass on Travis as well
+ // for ini settings, see https://github.com/owncloud/administration/blob/master/travis-ci/custom.ini
$dependencies = array(
'classes' => array(
'ZipArchive' => 'zip',
@@ -591,24 +596,56 @@ class OC_Util {
),
'defined' => array(
'PDO::ATTR_DRIVER_NAME' => 'PDO'
- )
+ ),
+ 'ini' => [
+ 'mbstring.func_overload' => 0,
+ 'output_buffering' => false,
+ 'default_charset' => 'UTF-8',
+ ],
);
$missingDependencies = array();
+ $invalidIniSettings = [];
$moduleHint = $l->t('Please ask your server administrator to install the module.');
- foreach ($dependencies['classes'] as $class => $module) {
- if (!class_exists($class)) {
- $missingDependencies[] = $module;
+ /**
+ * FIXME: The dependency check does not work properly on HHVM on the moment
+ * and prevents installation. Once HHVM is more compatible with our
+ * approach to check for these values we should re-enable those
+ * checks.
+ */
+ if (!self::runningOnHhvm()) {
+ foreach ($dependencies['classes'] as $class => $module) {
+ if (!class_exists($class)) {
+ $missingDependencies[] = $module;
+ }
}
- }
- foreach ($dependencies['functions'] as $function => $module) {
- if (!function_exists($function)) {
- $missingDependencies[] = $module;
+ foreach ($dependencies['functions'] as $function => $module) {
+ if (!function_exists($function)) {
+ $missingDependencies[] = $module;
+ }
}
- }
- foreach ($dependencies['defined'] as $defined => $module) {
- if (!defined($defined)) {
- $missingDependencies[] = $module;
+ foreach ($dependencies['defined'] as $defined => $module) {
+ if (!defined($defined)) {
+ $missingDependencies[] = $module;
+ }
+ }
+ foreach ($dependencies['ini'] as $setting => $expected) {
+ $iniWrapper = \OC::$server->getIniWrapper();
+ if (is_bool($expected)) {
+ if ($iniWrapper->getBool($setting) !== $expected) {
+ $invalidIniSettings[] = [$setting, $expected];
+ }
+ }
+ if (is_int($expected)) {
+ if ($iniWrapper->getNumeric($setting) !== $expected) {
+ $invalidIniSettings[] = [$setting, $expected];
+ }
+ }
+ if (is_string($expected)) {
+ if (strtolower($iniWrapper->getString($setting)) !== strtolower($expected)) {
+ $invalidIniSettings[] = [$setting, $expected];
+ }
+ }
}
}
@@ -619,6 +656,16 @@ class OC_Util {
);
$webServerRestart = true;
}
+ foreach($invalidIniSettings as $setting) {
+ if(is_bool($setting[1])) {
+ $setting[1] = ($setting[1]) ? 'on' : 'off';
+ }
+ $errors[] = [
+ 'error' => $l->t('PHP setting "%s" is not set to "%s".', [$setting[0], var_export($setting[1], true)]),
+ 'hint' => $l->t('Adjusting this setting in php.ini will make ownCloud run again')
+ ];
+ $webServerRestart = true;
+ }
if (version_compare(phpversion(), '5.4.0', '<')) {
$errors[] = array(
@@ -655,7 +702,7 @@ class OC_Util {
);
}
- if ($webServerRestart) {
+ if (!\OC::$CLI && $webServerRestart) {
$errors[] = array(
'error' => $l->t('PHP modules have been installed, but they are still listed as missing?'),
'hint' => $l->t('Please ask your server administrator to restart the web server.')
@@ -818,8 +865,7 @@ class OC_Util {
$parameters['user_autofocus'] = true;
}
if (isset($_REQUEST['redirect_url'])) {
- $redirectUrl = $_REQUEST['redirect_url'];
- $parameters['redirect_url'] = urlencode($redirectUrl);
+ $parameters['redirect_url'] = $_REQUEST['redirect_url'];
}
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
@@ -851,8 +897,11 @@ class OC_Util {
// Check if we are a user
if (!OC_User::isLoggedIn()) {
header('Location: ' . OC_Helper::linkToAbsolute('', 'index.php',
- array('redirect_url' => OC_Request::requestUri())
- ));
+ [
+ 'redirect_url' => \OC::$server->getRequest()->getRequestUri()
+ ]
+ )
+ );
exit();
}
}
@@ -928,7 +977,7 @@ class OC_Util {
// find the first app that is enabled for the current user
foreach ($defaultApps as $defaultApp) {
$defaultApp = OC_App::cleanAppId(strip_tags($defaultApp));
- if (OC_App::isEnabled($defaultApp)) {
+ if (static::getAppManager()->isEnabledForUser($defaultApp)) {
$appId = $defaultApp;
break;
}
@@ -1201,16 +1250,6 @@ class OC_Util {
}
/**
- * Checks if a secure random number generator is available
- *
- * @return true
- * @deprecated Function will be removed in the future and does only return true.
- */
- public static function secureRNGAvailable() {
- return true;
- }
-
- /**
* Get URL content
* @param string $url Url to get content
* @deprecated Use \OC::$server->getHTTPHelper()->getUrlContent($url);
@@ -1273,6 +1312,32 @@ class OC_Util {
}
/**
+ * Clear a single file from the opcode cache
+ * This is useful for writing to the config file
+ * in case the opcode cache does not re-validate files
+ * Returns true if successful, false if unsuccessful:
+ * caller should fall back on clearing the entire cache
+ * with clearOpcodeCache() if unsuccessful
+ *
+ * @param string $path the path of the file to clear from the cache
+ * @return bool true if underlying function returns true, otherwise false
+ */
+ public static function deleteFromOpcodeCache($path) {
+ $ret = false;
+ if ($path) {
+ // APC >= 3.1.1
+ if (function_exists('apc_delete_file')) {
+ $ret = @apc_delete_file($path);
+ }
+ // Zend OpCache >= 7.0.0, PHP >= 5.5.0
+ if (function_exists('opcache_invalidate')) {
+ $ret = opcache_invalidate($path);
+ }
+ }
+ return $ret;
+ }
+
+ /**
* Clear the opcode cache if one exists
* This is necessary for writing to the config file
* in case the opcode cache does not re-validate files
@@ -1351,6 +1416,7 @@ class OC_Util {
*
* @param string $file file name to check
* @return bool true if the file name is valid, false otherwise
+ * @deprecated use \OC\Files\View::verifyPath()
*/
public static function isValidFileName($file) {
$trimmed = trim($file);
@@ -1399,11 +1465,4 @@ class OC_Util {
}
}
- /**
- * @return string
- */
- public static function isPhpCharSetUtf8() {
- return ini_get('default_charset') === 'UTF-8';
- }
-
}
diff --git a/lib/private/vobject/compoundproperty.php b/lib/private/vobject/compoundproperty.php
deleted file mode 100644
index 7fe42574bed..00000000000
--- a/lib/private/vobject/compoundproperty.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-/**
- * ownCloud - VObject Compound Property
- *
- * @author Thomas Tanghus
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace OC\VObject;
-
-/**
- * This class overrides \Sabre\VObject\Property::serialize() to not
- * double escape commas and semi-colons in compound properties.
-*/
-class CompoundProperty extends \Sabre\VObject\Property\Compound {
-
- /**
- * Turns the object back into a serialized blob.
- *
- * @return string
- */
- public function serialize() {
-
- $str = $this->name;
- if ($this->group) {
- $str = $this->group . '.' . $this->name;
- }
-
- foreach($this->parameters as $param) {
- $str.=';' . $param->serialize();
- }
- $src = array(
- "\n",
- );
- $out = array(
- '\n',
- );
- $str.=':' . str_replace($src, $out, $this->value);
-
- $out = '';
- while(strlen($str) > 0) {
- if (strlen($str) > 75) {
- $out .= mb_strcut($str, 0, 75, 'utf-8') . "\r\n";
- $str = ' ' . mb_strcut($str, 75, strlen($str), 'utf-8');
- } else {
- $out .= $str . "\r\n";
- $str = '';
- break;
- }
- }
-
- return $out;
-
- }
-
-}
diff --git a/lib/private/vobject/stringproperty.php b/lib/private/vobject/stringproperty.php
deleted file mode 100644
index a9d63a0a789..00000000000
--- a/lib/private/vobject/stringproperty.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * ownCloud - VObject String Property
- *
- * This class adds escaping of simple string properties.
- *
- * @author Thomas Tanghus
- * @author Evert Pot (http://www.rooftopsolutions.nl/)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace OC\VObject;
-
-/**
- * This class overrides \Sabre\VObject\Property::serialize() properly
- * escape commas and semi-colons in string properties.
-*/
-class StringProperty extends \Sabre\VObject\Property {
-
- /**
- * Turns the object back into a serialized blob.
- *
- * @return string
- */
- public function serialize() {
-
- $str = $this->name;
- if ($this->group) {
- $str = $this->group . '.' . $this->name;
- }
-
- foreach($this->parameters as $param) {
- $str.=';' . $param->serialize();
- }
-
- $src = array(
- '\\',
- "\n",
- ';',
- ',',
- );
- $out = array(
- '\\\\',
- '\n',
- '\;',
- '\,',
- );
- $value = strtr($this->value, array('\,' => ',', '\;' => ';', '\\\\' => '\\'));
- $str.=':' . str_replace($src, $out, $value);
-
- $out = '';
- while(strlen($str) > 0) {
- if (strlen($str) > 75) {
- $out .= mb_strcut($str, 0, 75, 'utf-8') . "\r\n";
- $str = ' ' . mb_strcut($str, 75, strlen($str), 'utf-8');
- } else {
- $out .= $str . "\r\n";
- $str = '';
- break;
- }
- }
-
- return $out;
-
- }
-
-}
diff --git a/lib/public/activity/iextension.php b/lib/public/activity/iextension.php
index 1b405ad8d3d..8dc1e186903 100644
--- a/lib/public/activity/iextension.php
+++ b/lib/public/activity/iextension.php
@@ -47,16 +47,6 @@ interface IExtension {
public function getNotificationTypes($languageCode);
/**
- * The extension can filter the types based on the filter if required.
- * In case no filter is to be applied false is to be returned unchanged.
- *
- * @param array $types
- * @param string $filter
- * @return array|false
- */
- public function filterNotificationTypes($types, $filter);
-
- /**
* For a given method additional types to be displayed in the settings can be returned.
* In case no additional types are to be added false is to be returned.
*
@@ -66,6 +56,15 @@ interface IExtension {
public function getDefaultTypes($method);
/**
+ * A string naming the css class for the icon to be used can be returned.
+ * If no icon is known for the given type false is to be returned.
+ *
+ * @param string $type
+ * @return string|false
+ */
+ public function getTypeIcon($type);
+
+ /**
* The extension can translate a given message to the requested languages.
* If no translation is available false is to be returned.
*
@@ -90,16 +89,7 @@ interface IExtension {
* @param string $text
* @return array|false
*/
- function getSpecialParameterList($app, $text);
-
- /**
- * A string naming the css class for the icon to be used can be returned.
- * If no icon is known for the given type false is to be returned.
- *
- * @param string $type
- * @return string|false
- */
- public function getTypeIcon($type);
+ public function getSpecialParameterList($app, $text);
/**
* The extension can define the parameter grouping by returning the index as integer.
@@ -128,6 +118,16 @@ interface IExtension {
public function isFilterValid($filterValue);
/**
+ * The extension can filter the types based on the filter if required.
+ * In case no filter is to be applied false is to be returned unchanged.
+ *
+ * @param array $types
+ * @param string $filter
+ * @return array|false
+ */
+ public function filterNotificationTypes($types, $filter);
+
+ /**
* For a given filter the extension can specify the sql query conditions including parameters for that query.
* In case the extension does not know the filter false is to be returned.
* The query condition and the parameters are to be returned as array with two elements.
diff --git a/lib/public/activity/imanager.php b/lib/public/activity/imanager.php
index a08670be4b0..4a07e6912b0 100644
--- a/lib/public/activity/imanager.php
+++ b/lib/public/activity/imanager.php
@@ -76,17 +76,16 @@ interface IManager {
function getNotificationTypes($languageCode);
/**
- * @param array $types
- * @param string $filter
+ * @param string $method
* @return array
*/
- function filterNotificationTypes($types, $filter);
+ function getDefaultTypes($method);
/**
- * @param string $method
- * @return array
+ * @param string $type
+ * @return string
*/
- function getDefaultTypes($method);
+ function getTypeIcon($type);
/**
* @param string $app
@@ -107,12 +106,6 @@ interface IManager {
function getSpecialParameterList($app, $text);
/**
- * @param string $type
- * @return string
- */
- function getTypeIcon($type);
-
- /**
* @param array $activity
* @return integer|false
*/
@@ -130,6 +123,13 @@ interface IManager {
function isFilterValid($filterValue);
/**
+ * @param array $types
+ * @param string $filter
+ * @return array
+ */
+ function filterNotificationTypes($types, $filter);
+
+ /**
* @param string $filter
* @return array
*/
diff --git a/lib/public/app/iappmanager.php b/lib/public/app/iappmanager.php
index ebd84a1ce9d..495b82e0bdf 100644
--- a/lib/public/app/iappmanager.php
+++ b/lib/public/app/iappmanager.php
@@ -9,6 +9,8 @@
namespace OCP\App;
+use OCP\IUser;
+
interface IAppManager {
/**
* Check if an app is enabled for user
@@ -48,4 +50,19 @@ interface IAppManager {
* @param string $appId
*/
public function disableApp($appId);
+
+ /**
+ * List all apps enabled for a user
+ *
+ * @param \OCP\IUser $user
+ * @return string[]
+ */
+ public function getEnabledAppsForUser(IUser $user);
+
+ /**
+ * List all installed apps
+ *
+ * @return string[]
+ */
+ public function getInstalledApps();
}
diff --git a/lib/public/appframework/apicontroller.php b/lib/public/appframework/apicontroller.php
index 5272f3ed529..b62e352c319 100644
--- a/lib/public/appframework/apicontroller.php
+++ b/lib/public/appframework/apicontroller.php
@@ -3,7 +3,7 @@
* ownCloud - App Framework
*
* @author Bernhard Posselt
- * @copyright 2012 Bernhard Posselt nukeawhale@gmail.com
+ * @copyright 2012 Bernhard Posselt <dev@bernhard-posselt.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -44,17 +44,17 @@ abstract class ApiController extends Controller {
* constructor of the controller
* @param string $appName the name of the app
* @param IRequest $request an instance of the request
- * @param string $corsMethods: comma seperated string of HTTP verbs which
+ * @param string $corsMethods: comma seperated string of HTTP verbs which
* should be allowed for websites or webapps when calling your API, defaults to
* 'PUT, POST, GET, DELETE, PATCH'
* @param string $corsAllowedHeaders: comma seperated string of HTTP headers
- * which should be allowed for websites or webapps when calling your API,
+ * which should be allowed for websites or webapps when calling your API,
* defaults to 'Authorization, Content-Type, Accept'
* @param int $corsMaxAge number in seconds how long a preflighted OPTIONS
* request should be cached, defaults to 1728000 seconds
*/
- public function __construct($appName,
- IRequest $request,
+ public function __construct($appName,
+ IRequest $request,
$corsMethods='PUT, POST, GET, DELETE, PATCH',
$corsAllowedHeaders='Authorization, Content-Type, Accept',
$corsMaxAge=1728000){
diff --git a/lib/public/appframework/db/mapper.php b/lib/public/appframework/db/mapper.php
index 03f0fe3aa75..5143547c8e8 100644
--- a/lib/public/appframework/db/mapper.php
+++ b/lib/public/appframework/db/mapper.php
@@ -26,7 +26,7 @@
namespace OCP\AppFramework\Db;
-use \OCP\IDb;
+use \OCP\IDBConnection;
/**
@@ -40,12 +40,12 @@ abstract class Mapper {
protected $db;
/**
- * @param IDb $db Instance of the Db abstraction layer
- * @param string $tableName the name of the table. set this to allow entity
+ * @param IDBConnection $db Instance of the Db abstraction layer
+ * @param string $tableName the name of the table. set this to allow entity
* @param string $entityClass the name of the entity that the sql should be
* mapped to queries without using sql
*/
- public function __construct(IDb $db, $tableName, $entityClass=null){
+ public function __construct(IDBConnection $db, $tableName, $entityClass=null){
$this->db = $db;
$this->tableName = '*PREFIX*' . $tableName;
@@ -70,10 +70,13 @@ abstract class Mapper {
/**
* Deletes an entity from the table
* @param Entity $entity the entity that should be deleted
+ * @return Entity the deleted entity
*/
public function delete(Entity $entity){
$sql = 'DELETE FROM `' . $this->tableName . '` WHERE `id` = ?';
- $this->execute($sql, array($entity->getId()));
+ $stmt = $this->execute($sql, [$entity->getId()]);
+ $stmt->closeCursor();
+ return $entity;
}
@@ -88,14 +91,14 @@ abstract class Mapper {
$properties = $entity->getUpdatedFields();
$values = '';
$columns = '';
- $params = array();
+ $params = [];
// build the fields
$i = 0;
foreach($properties as $property => $updated) {
$column = $entity->propertyToColumn($property);
$getter = 'get' . ucfirst($property);
-
+
$columns .= '`' . $column . '`';
$values .= '?';
@@ -105,17 +108,20 @@ abstract class Mapper {
$values .= ',';
}
- array_push($params, $entity->$getter());
+ $params[] = $entity->$getter();
$i++;
}
$sql = 'INSERT INTO `' . $this->tableName . '`(' .
$columns . ') VALUES(' . $values . ')';
-
- $this->execute($sql, $params);
- $entity->setId((int) $this->db->getInsertId($this->tableName));
+ $stmt = $this->execute($sql, $params);
+
+ $entity->setId((int) $this->db->lastInsertId($this->tableName));
+
+ $stmt->closeCursor();
+
return $entity;
}
@@ -147,7 +153,7 @@ abstract class Mapper {
unset($properties['id']);
$columns = '';
- $params = array();
+ $params = [];
// build the fields
$i = 0;
@@ -155,7 +161,7 @@ abstract class Mapper {
$column = $entity->propertyToColumn($property);
$getter = 'get' . ucfirst($property);
-
+
$columns .= '`' . $column . '` = ?';
// only append colon if there are more entries
@@ -163,15 +169,16 @@ abstract class Mapper {
$columns .= ',';
}
- array_push($params, $entity->$getter());
+ $params[] = $entity->$getter();
$i++;
}
- $sql = 'UPDATE `' . $this->tableName . '` SET ' .
+ $sql = 'UPDATE `' . $this->tableName . '` SET ' .
$columns . ' WHERE `id` = ?';
- array_push($params, $id);
+ $params[] = $id;
- $this->execute($sql, $params);
+ $stmt = $this->execute($sql, $params);
+ $stmt->closeCursor();
return $entity;
}
@@ -185,8 +192,8 @@ abstract class Mapper {
* @param int $offset from which row we want to start
* @return \PDOStatement the database query result
*/
- protected function execute($sql, array $params=array(), $limit=null, $offset=null){
- $query = $this->db->prepareQuery($sql, $limit, $offset);
+ protected function execute($sql, array $params=[], $limit=null, $offset=null){
+ $query = $this->db->prepare($sql, $limit, $offset);
$index = 1; // bindParam is 1 indexed
foreach($params as $param) {
@@ -199,18 +206,20 @@ abstract class Mapper {
case 'boolean':
$pdoConstant = \PDO::PARAM_BOOL;
break;
-
+
default:
$pdoConstant = \PDO::PARAM_STR;
break;
}
-
+
$query->bindValue($index, $param, $pdoConstant);
$index++;
}
- return $query->execute();
+ $query->execute();
+
+ return $query;
}
@@ -226,14 +235,16 @@ abstract class Mapper {
* @throws MultipleObjectsReturnedException if more than one item exist
* @return array the result as row
*/
- protected function findOneQuery($sql, array $params=array(), $limit=null, $offset=null){
- $result = $this->execute($sql, $params, $limit, $offset);
- $row = $result->fetch();
+ protected function findOneQuery($sql, array $params=[], $limit=null, $offset=null){
+ $stmt = $this->execute($sql, $params, $limit, $offset);
+ $row = $stmt->fetch();
if($row === false || $row === null){
+ $stmt->closeCursor();
throw new DoesNotExistException('No matching entry found');
}
- $row2 = $result->fetch();
+ $row2 = $stmt->fetch();
+ $stmt->closeCursor();
//MDB2 returns null, PDO and doctrine false when no row is available
if( ! ($row2 === false || $row2 === null )) {
throw new MultipleObjectsReturnedException('More than one result');
@@ -262,15 +273,17 @@ abstract class Mapper {
* @param int $offset from which row we want to start
* @return array all fetched entities
*/
- protected function findEntities($sql, array $params=array(), $limit=null, $offset=null) {
- $result = $this->execute($sql, $params, $limit, $offset);
+ protected function findEntities($sql, array $params=[], $limit=null, $offset=null) {
+ $stmt = $this->execute($sql, $params, $limit, $offset);
- $entities = array();
-
- while($row = $result->fetch()){
+ $entities = [];
+
+ while($row = $stmt->fetch()){
$entities[] = $this->mapRowToEntity($row);
}
+ $stmt->closeCursor();
+
return $entities;
}
@@ -286,7 +299,7 @@ abstract class Mapper {
* @throws MultipleObjectsReturnedException if more than one item exist
* @return Entity the entity
*/
- protected function findEntity($sql, array $params=array(), $limit=null, $offset=null){
+ protected function findEntity($sql, array $params=[], $limit=null, $offset=null){
return $this->mapRowToEntity($this->findOneQuery($sql, $params, $limit, $offset));
}
diff --git a/lib/public/appframework/http/contentsecuritypolicy.php b/lib/public/appframework/http/contentsecuritypolicy.php
new file mode 100644
index 00000000000..6778d1035be
--- /dev/null
+++ b/lib/public/appframework/http/contentsecuritypolicy.php
@@ -0,0 +1,258 @@
+<?php
+/**
+ * Copyright (c) 2015 Lukas Reschke lukas@owncloud.com
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP\AppFramework\Http;
+
+use OCP\AppFramework\Http;
+
+/**
+ * Class ContentSecurityPolicy is a simple helper which allows applications to
+ * modify the Content-Security-Policy sent by ownCloud. Per default only JavaScript,
+ * stylesheets, images, fonts, media and connections from the same domain
+ * ('self') are allowed.
+ *
+ * Even if a value gets modified above defaults will still get appended. Please
+ * notice that ownCloud ships already with sensible defaults and those policies
+ * should require no modification at all for most use-cases.
+ *
+ * @package OCP\AppFramework\Http
+ */
+class ContentSecurityPolicy {
+ /** @var bool Whether inline JS snippets are allowed */
+ private $inlineScriptAllowed = false;
+ /**
+ * @var bool Whether eval in JS scripts is allowed
+ * TODO: Disallow per default
+ * @link https://github.com/owncloud/core/issues/11925
+ */
+ private $evalScriptAllowed = true;
+ /** @var array Domains from which scripts can get loaded */
+ private $allowedScriptDomains = [
+ '\'self\'',
+ ];
+ /**
+ * @var bool Whether inline CSS is allowed
+ * TODO: Disallow per default
+ * @link https://github.com/owncloud/core/issues/13458
+ */
+ private $inlineStyleAllowed = true;
+ /** @var array Domains from which CSS can get loaded */
+ private $allowedStyleDomains = [
+ '\'self\'',
+ ];
+ /** @var array Domains from which images can get loaded */
+ private $allowedImageDomains = [
+ '\'self\'',
+ ];
+ /** @var array Domains to which connections can be done */
+ private $allowedConnectDomains = [
+ '\'self\'',
+ ];
+ /** @var array Domains from which media elements can be loaded */
+ private $allowedMediaDomains = [
+ '\'self\'',
+ ];
+ /** @var array Domains from which object elements can be loaded */
+ private $allowedObjectDomains = [];
+ /** @var array Domains from which iframes can be loaded */
+ private $allowedFrameDomains = [];
+ /** @var array Domains from which fonts can be loaded */
+ private $allowedFontDomains = [
+ '\'self\'',
+ ];
+ /** @var array Domains from which web-workers and nested browsing content can load elements */
+ private $allowedChildSrcDomains = [];
+
+ /**
+ * Whether inline JavaScript snippets are allowed or forbidden
+ * @param bool $state
+ * @return $this
+ */
+ public function allowInlineScript($state = false) {
+ $this->inlineScriptAllowed = $state;
+ return $this;
+ }
+
+ /**
+ * Whether eval in JavaScript is allowed or forbidden
+ * @param bool $state
+ * @return $this
+ */
+ public function allowEvalScript($state = true) {
+ $this->evalScriptAllowed= $state;
+ return $this;
+ }
+
+ /**
+ * Allows to execute JavaScript files from a specific domain. Use * to
+ * allow JavaScript from all domains.
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedScriptDomain($domain) {
+ $this->allowedScriptDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * Whether inline CSS snippets are allowed or forbidden
+ * @param bool $state
+ * @return $this
+ */
+ public function allowInlineStyle($state = true) {
+ $this->inlineStyleAllowed = $state;
+ return $this;
+ }
+
+ /**
+ * Allows to execute CSS files from a specific domain. Use * to allow
+ * CSS from all domains.
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedStyleDomain($domain) {
+ $this->allowedStyleDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * Allows using fonts from a specific domain. Use * to allow
+ * fonts from all domains.
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedFontDomain($domain) {
+ $this->allowedFontDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * Allows embedding images from a specific domain. Use * to allow
+ * images from all domains.
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedImageDomain($domain) {
+ $this->allowedImageDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * To which remote domains the JS connect to.
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedConnectDomain($domain) {
+ $this->allowedConnectDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * From whoch domains media elements can be embedded.
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedMediaDomain($domain) {
+ $this->allowedMediaDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * From which domains objects such as <object>, <embed> or <applet> are executed
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedObjectDomain($domain) {
+ $this->allowedObjectDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * Which domains can be embedded in an iframe
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedFrameDomain($domain) {
+ $this->allowedFrameDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * Domains from which web-workers and nested browsing content can load elements
+ * @param string $domain Domain to whitelist. Any passed value needs to be properly sanitized.
+ * @return $this
+ */
+ public function addAllowedChildSrcDomain($domain) {
+ $this->allowedChildSrcDomains[] = $domain;
+ return $this;
+ }
+
+ /**
+ * Get the generated Content-Security-Policy as a string
+ * @return string
+ */
+ public function buildPolicy() {
+ $policy = "default-src 'none';";
+
+ if(!empty($this->allowedScriptDomains)) {
+ $policy .= 'script-src ' . implode(' ', $this->allowedScriptDomains);
+ if($this->inlineScriptAllowed) {
+ $policy .= ' \'unsafe-inline\'';
+ }
+ if($this->evalScriptAllowed) {
+ $policy .= ' \'unsafe-eval\'';
+ }
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedStyleDomains)) {
+ $policy .= 'style-src ' . implode(' ', $this->allowedStyleDomains);
+ if($this->inlineStyleAllowed) {
+ $policy .= ' \'unsafe-inline\'';
+ }
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedImageDomains)) {
+ $policy .= 'img-src ' . implode(' ', $this->allowedImageDomains);
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedFontDomains)) {
+ $policy .= 'font-src ' . implode(' ', $this->allowedFontDomains);
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedConnectDomains)) {
+ $policy .= 'connect-src ' . implode(' ', $this->allowedConnectDomains);
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedMediaDomains)) {
+ $policy .= 'media-src ' . implode(' ', $this->allowedMediaDomains);
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedObjectDomains)) {
+ $policy .= 'object-src ' . implode(' ', $this->allowedObjectDomains);
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedFrameDomains)) {
+ $policy .= 'frame-src ' . implode(' ', $this->allowedFrameDomains);
+ $policy .= ';';
+ }
+
+ if(!empty($this->allowedChildSrcDomains)) {
+ $policy .= 'child-src ' . implode(' ', $this->allowedChildSrcDomains);
+ $policy .= ';';
+ }
+
+ return rtrim($policy, ';');
+ }
+}
diff --git a/lib/public/appframework/http/icallbackresponse.php b/lib/public/appframework/http/icallbackresponse.php
new file mode 100644
index 00000000000..4d50df7ac77
--- /dev/null
+++ b/lib/public/appframework/http/icallbackresponse.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * @author Bernhard Posselt
+ * @copyright 2015 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP\AppFramework\Http;
+
+
+/**
+ * Interface ICallbackResponse
+ *
+ * @package OCP\AppFramework\Http
+ */
+interface ICallbackResponse {
+
+ /**
+ * Outputs the content that should be printed
+ *
+ * @param IOutput $output a small wrapper that handles output
+ */
+ function callback(IOutput $output);
+
+}
diff --git a/lib/public/appframework/http/ioutput.php b/lib/public/appframework/http/ioutput.php
new file mode 100644
index 00000000000..191f84374dc
--- /dev/null
+++ b/lib/public/appframework/http/ioutput.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * @author Bernhard Posselt
+ * @copyright 2015 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP\AppFramework\Http;
+
+
+/**
+ * Very thin wrapper class to make output testable
+ */
+interface IOutput {
+
+ /**
+ * @param string $out
+ */
+ public function setOutput($out);
+
+ /**
+ * @param string $path
+ *
+ * @return bool false if an error occured
+ */
+ public function setReadfile($path);
+
+ /**
+ * @param string $header
+ */
+ public function setHeader($header);
+
+ /**
+ * @return int returns the current http response code
+ */
+ public function getHttpResponseCode();
+
+ /**
+ * @param int $code sets the http status code
+ */
+ public function setHttpResponseCode($code);
+
+ /**
+ * @param string $name
+ * @param string $value
+ * @param int $expire
+ * @param string $path
+ * @param string $domain
+ * @param bool $secure
+ * @param bool $httponly
+ */
+ public function setCookie($name, $value, $expire, $path, $domain, $secure, $httponly);
+
+}
diff --git a/lib/public/appframework/http/ocsresponse.php b/lib/public/appframework/http/ocsresponse.php
new file mode 100644
index 00000000000..590a256fe28
--- /dev/null
+++ b/lib/public/appframework/http/ocsresponse.php
@@ -0,0 +1,99 @@
+<?php
+/**
+ * ownCloud - App Framework
+ *
+ * @author Bernhard Posselt
+ * @copyright 2015 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\HTTP\JSONResponse class
+ */
+
+namespace OCP\AppFramework\Http;
+
+use OCP\AppFramework\Http;
+
+use OC_OCS;
+
+/**
+ * A renderer for OCS responses
+ */
+class OCSResponse extends Response {
+
+ private $data;
+ private $format;
+ private $statuscode;
+ private $message;
+ private $tag;
+ private $tagattribute;
+ private $dimension;
+ private $itemscount;
+ private $itemsperpage;
+
+ /**
+ * generates the xml or json response for the API call from an multidimenional data array.
+ * @param string $format
+ * @param string $status
+ * @param string $statuscode
+ * @param string $message
+ * @param array $data
+ * @param string $tag
+ * @param string $tagattribute
+ * @param int $dimension
+ * @param int|string $itemscount
+ * @param int|string $itemsperpage
+ */
+ public function __construct($format, $status, $statuscode, $message,
+ $data=[], $tag='', $tagattribute='',
+ $dimension=-1, $itemscount='',
+ $itemsperpage='') {
+ $this->format = $format;
+ $this->status = $status;
+ $this->statuscode = $statuscode;
+ $this->message = $message;
+ $this->data = $data;
+ $this->tag = $tag;
+ $this->tagattribute = $tagattribute;
+ $this->dimension = $dimension;
+ $this->itemscount = $itemscount;
+ $this->itemsperpage = $itemsperpage;
+
+ // set the correct header based on the format parameter
+ if ($format === 'json') {
+ $this->addHeader(
+ 'Content-Type', 'application/json; charset=utf-8'
+ );
+ } else {
+ $this->addHeader(
+ 'Content-Type', 'application/xml; charset=utf-8'
+ );
+ }
+ }
+
+
+ public function render() {
+ return OC_OCS::generateXml(
+ $this->format, $this->status, $this->statuscode, $this->message,
+ $this->data, $this->tag, $this->tagattribute, $this->dimension,
+ $this->itemscount, $this->itemsperpage
+ );
+ }
+
+
+} \ No newline at end of file
diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php
index 67e72cff6d9..751c48b4ca9 100644
--- a/lib/public/appframework/http/response.php
+++ b/lib/public/appframework/http/response.php
@@ -72,6 +72,9 @@ class Response {
*/
private $ETag;
+ /** @var ContentSecurityPolicy|null Used Content-Security-Policy */
+ private $contentSecurityPolicy = null;
+
/**
* Caches the response
@@ -186,13 +189,19 @@ class Response {
* @return array the headers
*/
public function getHeaders() {
- $mergeWith = array();
+ $mergeWith = [];
if($this->lastModified) {
$mergeWith['Last-Modified'] =
$this->lastModified->format(\DateTime::RFC2822);
}
+ // Build Content-Security-Policy and use default if none has been specified
+ if(is_null($this->contentSecurityPolicy)) {
+ $this->setContentSecurityPolicy(new ContentSecurityPolicy());
+ }
+ $this->headers['Content-Security-Policy'] = $this->contentSecurityPolicy->buildPolicy();
+
if($this->ETag) {
$mergeWith['ETag'] = '"' . $this->ETag . '"';
}
@@ -221,6 +230,25 @@ class Response {
return $this;
}
+ /**
+ * Set a Content-Security-Policy
+ * @param ContentSecurityPolicy $csp Policy to set for the response object
+ * @return $this
+ */
+ public function setContentSecurityPolicy(ContentSecurityPolicy $csp) {
+ $this->contentSecurityPolicy = $csp;
+ return $this;
+ }
+
+ /**
+ * Get the currently used Content-Security-Policy
+ * @return ContentSecurityPolicy|null Used Content-Security-Policy or null if
+ * none specified.
+ */
+ public function getContentSecurityPolicy() {
+ return $this->contentSecurityPolicy;
+ }
+
/**
* Get response status
diff --git a/lib/public/appframework/http/streamresponse.php b/lib/public/appframework/http/streamresponse.php
new file mode 100644
index 00000000000..ede1dc8b58e
--- /dev/null
+++ b/lib/public/appframework/http/streamresponse.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @author Bernhard Posselt
+ * @copyright 2015 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP\AppFramework\Http;
+
+use OCP\AppFramework\Http;
+
+/**
+ * Class StreamResponse
+ *
+ * @package OCP\AppFramework\Http
+ */
+class StreamResponse extends Response implements ICallbackResponse {
+ /** @var string */
+ private $filePath;
+
+ /**
+ * @param string $filePath the path to the file which should be streamed
+ */
+ public function __construct ($filePath) {
+ $this->filePath = $filePath;
+ }
+
+
+ /**
+ * Streams the file using readfile
+ *
+ * @param IOutput $output a small wrapper that handles output
+ */
+ public function callback (IOutput $output) {
+ // handle caching
+ if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) {
+ if (!file_exists($this->filePath)) {
+ $output->setHttpResponseCode(Http::STATUS_NOT_FOUND);
+ } elseif ($output->setReadfile($this->filePath) === false) {
+ $output->setHttpResponseCode(Http::STATUS_BAD_REQUEST);
+ }
+ }
+ }
+
+}
diff --git a/lib/public/appframework/ocscontroller.php b/lib/public/appframework/ocscontroller.php
new file mode 100644
index 00000000000..3e9907666bb
--- /dev/null
+++ b/lib/public/appframework/ocscontroller.php
@@ -0,0 +1,103 @@
+<?php
+/**
+ * ownCloud - App Framework
+ *
+ * @author Bernhard Posselt
+ * @copyright 2015 Bernhard Posselt <dev@bernhard-posselt.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\Controller class
+ */
+
+namespace OCP\AppFramework;
+
+use OCP\AppFramework\Http\DataResponse;
+use OCP\AppFramework\Http\OCSResponse;
+use OCP\IRequest;
+
+
+/**
+ * Base class to inherit your controllers from that are used for RESTful APIs
+ */
+abstract class OCSController extends ApiController {
+
+ /**
+ * constructor of the controller
+ * @param string $appName the name of the app
+ * @param IRequest $request an instance of the request
+ * @param string $corsMethods: comma seperated string of HTTP verbs which
+ * should be allowed for websites or webapps when calling your API, defaults to
+ * 'PUT, POST, GET, DELETE, PATCH'
+ * @param string $corsAllowedHeaders: comma seperated string of HTTP headers
+ * which should be allowed for websites or webapps when calling your API,
+ * defaults to 'Authorization, Content-Type, Accept'
+ * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS
+ * request should be cached, defaults to 1728000 seconds
+ */
+ public function __construct($appName,
+ IRequest $request,
+ $corsMethods='PUT, POST, GET, DELETE, PATCH',
+ $corsAllowedHeaders='Authorization, Content-Type, Accept',
+ $corsMaxAge=1728000){
+ parent::__construct($appName, $request, $corsMethods,
+ $corsAllowedHeaders, $corsMaxAge);
+ $this->registerResponder('json', function ($data) {
+ return $this->buildOCSResponse('json', $data);
+ });
+ $this->registerResponder('xml', function ($data) {
+ return $this->buildOCSResponse('xml', $data);
+ });
+ }
+
+
+ /**
+ * Unwrap data and build ocs response
+ * @param string $format json or xml
+ * @param array|DataResponse $data the data which should be transformed
+ */
+ private function buildOCSResponse($format, $data) {
+ if ($data instanceof DataResponse) {
+ $data = $data->getData();
+ }
+
+ $params = [
+ 'status' => 'OK',
+ 'statuscode' => 100,
+ 'message' => 'OK',
+ 'data' => [],
+ 'tag' => '',
+ 'tagattribute' => '',
+ 'dimension' => 'dynamic',
+ 'itemscount' => '',
+ 'itemsperpage' => ''
+ ];
+
+ foreach ($data as $key => $value) {
+ $params[$key] = $value;
+ }
+
+ return new OCSResponse(
+ $format, $params['status'], $params['statuscode'],
+ $params['message'], $params['data'], $params['tag'],
+ $params['tagattribute'], $params['dimension'],
+ $params['itemscount'], $params['itemsperpage']
+ );
+ }
+
+}
diff --git a/lib/public/command/ibus.php b/lib/public/command/ibus.php
new file mode 100644
index 00000000000..bbb89ee04e6
--- /dev/null
+++ b/lib/public/command/ibus.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP\Command;
+
+interface IBus {
+ /**
+ * Schedule a command to be fired
+ *
+ * @param \OCP\Command\ICommand | callable $command
+ */
+ public function push($command);
+
+ /**
+ * Require all commands using a trait to be run synchronous
+ *
+ * @param string $trait
+ */
+ public function requireSync($trait);
+}
diff --git a/lib/public/command/icommand.php b/lib/public/command/icommand.php
new file mode 100644
index 00000000000..6de61258a41
--- /dev/null
+++ b/lib/public/command/icommand.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Copyright (c) 2015 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OCP\Command;
+
+interface ICommand {
+ /**
+ * Run the command
+ */
+ public function handle();
+}
diff --git a/lib/private/connector/sabre/request.php b/lib/public/files/invalidcharacterinpathexception.php
index c98b28c4d74..4ae2eb01c19 100644
--- a/lib/private/connector/sabre/request.php
+++ b/lib/public/files/invalidcharacterinpathexception.php
@@ -1,10 +1,9 @@
<?php
-
/**
* ownCloud
*
- * @author Stefan Herbrechtsmeier
- * @copyright 2012 Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
+ * @author Thomas Müller
+ * @copyright 2013 Thomas Müller deepdiver@owncloud.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
@@ -21,30 +20,18 @@
*
*/
-class OC_Connector_Sabre_Request extends \Sabre\HTTP\Request {
- /**
- * Returns the requested uri
- *
- * @return string
- */
- public function getUri() {
- return OC_Request::requestUri();
- }
+/**
+ * Public interface of ownCloud for apps to use.
+ * Files/InvalidCharacterInPathException class
+ */
+
+// use OCP namespace for all classes that are considered public.
+// This means that they should be used by apps instead of the internal ownCloud classes
+namespace OCP\Files;
+
+/**
+ * Exception for invalid path
+ */
+class InvalidCharacterInPathException extends InvalidPathException {
- /**
- * Returns a specific item from the _SERVER array.
- *
- * Do not rely on this feature, it is for internal use only.
- *
- * @param string $field
- * @return string
- */
- public function getRawServerValue($field) {
- if($field == 'REQUEST_URI') {
- return $this->getUri();
- }
- else{
- return isset($this->_SERVER[$field])?$this->_SERVER[$field]:null;
- }
- }
}
diff --git a/lib/public/files/node.php b/lib/public/files/node.php
index c3434b4b609..74355d10e80 100644
--- a/lib/public/files/node.php
+++ b/lib/public/files/node.php
@@ -89,6 +89,8 @@ interface Node extends FileInfo {
* Get the internal file id for the file or folder
*
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getId();
@@ -106,6 +108,8 @@ interface Node extends FileInfo {
* Get the modified date of the file or folder as unix timestamp
*
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getMTime();
@@ -113,6 +117,8 @@ interface Node extends FileInfo {
* Get the size of the file or folder in bytes
*
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getSize();
@@ -122,6 +128,8 @@ interface Node extends FileInfo {
* every time the file or folder is changed the Etag will change to
*
* @return string
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getEtag();
@@ -135,6 +143,8 @@ interface Node extends FileInfo {
* - \OCP\Constants::PERMISSION_SHARE
*
* @return int
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function getPermissions();
@@ -142,6 +152,8 @@ interface Node extends FileInfo {
* Check if the file or folder is readable
*
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isReadable();
@@ -149,6 +161,8 @@ interface Node extends FileInfo {
* Check if the file or folder is writable
*
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isUpdateable();
@@ -156,6 +170,8 @@ interface Node extends FileInfo {
* Check if the file or folder is deletable
*
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isDeletable();
@@ -163,6 +179,8 @@ interface Node extends FileInfo {
* Check if the file or folder is shareable
*
* @return bool
+ * @throws InvalidPathException
+ * @throws NotFoundException
*/
public function isShareable();
diff --git a/lib/public/files/reservedwordexception.php b/lib/public/files/reservedwordexception.php
new file mode 100644
index 00000000000..25c618a8ded
--- /dev/null
+++ b/lib/public/files/reservedwordexception.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Thomas Müller
+ * @copyright 2013 Thomas Müller deepdiver@owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/**
+ * Public interface of ownCloud for apps to use.
+ * Files/ReservedWordException class
+ */
+
+// use OCP namespace for all classes that are considered public.
+// This means that they should be used by apps instead of the internal ownCloud classes
+namespace OCP\Files;
+
+/**
+ * Exception for invalid path
+ */
+class ReservedWordException extends InvalidPathException {
+
+}
diff --git a/lib/public/files/storage.php b/lib/public/files/storage.php
index 36d5b800df6..388ba5fa6ac 100644
--- a/lib/public/files/storage.php
+++ b/lib/public/files/storage.php
@@ -28,6 +28,7 @@
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
+use OCP\Files\InvalidPathException;
/**
* Provide a common interface to all different storage options
@@ -72,7 +73,7 @@ interface Storage {
* see http://php.net/manual/en/function.opendir.php
*
* @param string $path
- * @return resource
+ * @return resource|false
*/
public function opendir($path);
@@ -97,7 +98,7 @@ interface Storage {
* only the following keys are required in the result: size and mtime
*
* @param string $path
- * @return array
+ * @return array|false
*/
public function stat($path);
@@ -105,7 +106,7 @@ interface Storage {
* see http://php.net/manual/en/function.filetype.php
*
* @param string $path
- * @return bool
+ * @return string|false
*/
public function filetype($path);
@@ -114,7 +115,7 @@ interface Storage {
* The result for filesize when called on a folder is required to be 0
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function filesize($path);
@@ -179,7 +180,7 @@ interface Storage {
* see http://php.net/manual/en/function.filemtime.php
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function filemtime($path);
@@ -187,7 +188,7 @@ interface Storage {
* see http://php.net/manual/en/function.file_get_contents.php
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function file_get_contents($path);
@@ -231,7 +232,7 @@ interface Storage {
*
* @param string $path
* @param string $mode
- * @return resource
+ * @return resource|false
*/
public function fopen($path, $mode);
@@ -240,7 +241,7 @@ interface Storage {
* The mimetype for a folder is required to be "httpd/unix-directory"
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getMimeType($path);
@@ -250,7 +251,7 @@ interface Storage {
* @param string $type
* @param string $path
* @param bool $raw
- * @return string
+ * @return string|false
*/
public function hash($type, $path, $raw = false);
@@ -258,7 +259,7 @@ interface Storage {
* see http://php.net/manual/en/function.free_space.php
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function free_space($path);
@@ -266,7 +267,7 @@ interface Storage {
* search for occurrences of $query in file names
*
* @param string $query
- * @return array
+ * @return array|false
*/
public function search($query);
@@ -285,7 +286,7 @@ interface Storage {
* The local version of the file can be temporary and doesn't have to be persistent across requests
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getLocalFile($path);
@@ -294,7 +295,7 @@ interface Storage {
* The local version of the folder can be temporary and doesn't have to be persistent across requests
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getLocalFolder($path);
/**
@@ -313,7 +314,7 @@ interface Storage {
* get the ETag for a file or folder
*
* @param string $path
- * @return string
+ * @return string|false
*/
public function getETag($path);
@@ -342,7 +343,15 @@ interface Storage {
* For now the returned array can hold the parameter url - in future more attributes might follow.
*
* @param string $path
- * @return array
+ * @return array|false
*/
public function getDirectDownload($path);
+
+ /**
+ * @param string $path the path of the target folder
+ * @param string $fileName the name of the file itself
+ * @return void
+ * @throws InvalidPathException
+ */
+ public function verifyPath($path, $fileName);
}
diff --git a/lib/public/iappconfig.php b/lib/public/iappconfig.php
index cbd1a7e0573..3a976b4a263 100644
--- a/lib/public/iappconfig.php
+++ b/lib/public/iappconfig.php
@@ -58,7 +58,7 @@ interface IAppConfig {
*
* @param string|false $key
* @param string|false $app
- * @return array
+ * @return array|false
*/
public function getValues($app, $key);
diff --git a/lib/public/iavatar.php b/lib/public/iavatar.php
index 213d2e6cef5..fdb044f9e5c 100644
--- a/lib/public/iavatar.php
+++ b/lib/public/iavatar.php
@@ -21,6 +21,13 @@ interface IAvatar {
function get($size = 64);
/**
+ * Check if an avatar exists for the user
+ *
+ * @return bool
+ */
+ public function exists();
+
+ /**
* sets the users avatar
* @param Image $data mixed imagedata or path to set a new avatar
* @throws \Exception if the provided file is not a jpg or png image
diff --git a/lib/public/idb.php b/lib/public/idb.php
index 82a8a681500..e2f7edb6985 100644
--- a/lib/public/idb.php
+++ b/lib/public/idb.php
@@ -27,7 +27,7 @@ namespace OCP;
/**
* Small Facade for being able to inject the database connection for tests
*/
-interface IDb {
+interface IDb extends IDBConnection {
/**
diff --git a/lib/public/idbconnection.php b/lib/public/idbconnection.php
index 0d19b2cc71e..0d3274d90eb 100644
--- a/lib/public/idbconnection.php
+++ b/lib/public/idbconnection.php
@@ -35,7 +35,7 @@ namespace OCP;
*/
interface IDBConnection {
/**
- * Used to abstract the owncloud database access away
+ * Used to abstract the ownCloud database access away
* @param string $sql the sql query with ? placeholder for params
* @param int $limit the maximum number of rows
* @param int $offset from which row we want to start
diff --git a/lib/public/il10n.php b/lib/public/il10n.php
index 2c95ddfec18..c63c18209e4 100644
--- a/lib/public/il10n.php
+++ b/lib/public/il10n.php
@@ -75,15 +75,9 @@ interface IL10N {
/**
- * find the best language
- * @param array|string $app details below
- * @return string language
- *
- * If $app is an array, ownCloud assumes that these are the available
- * languages. Otherwise ownCloud tries to find the files in the l10n
- * folder.
+ * The code (en, de, ...) of the language that is used for this OC_L10N object
*
- * If nothing works it returns 'en'
+ * @return string language
*/
- public function getLanguageCode($app=null);
+ public function getLanguageCode();
}
diff --git a/lib/public/irequest.php b/lib/public/irequest.php
index 988b3aebd7b..025c8367d41 100644
--- a/lib/public/irequest.php
+++ b/lib/public/irequest.php
@@ -127,4 +127,76 @@ interface IRequest {
* @return bool true if CSRF check passed
*/
public function passesCSRFCheck();
+
+ /**
+ * Returns an ID for the request, value is not guaranteed to be unique and is mostly meant for logging
+ * If `mod_unique_id` is installed this value will be taken.
+ * @return string
+ */
+ public function getId();
+
+ /**
+ * Returns the remote address, if the connection came from a trusted proxy
+ * and `forwarded_for_headers` has been configured then the IP address
+ * specified in this header will be returned instead.
+ * Do always use this instead of $_SERVER['REMOTE_ADDR']
+ * @return string IP address
+ */
+ public function getRemoteAddress();
+
+ /**
+ * Returns the server protocol. It respects reverse proxy servers and load
+ * balancers.
+ * @return string Server protocol (http or https)
+ */
+ public function getServerProtocol();
+
+ /**
+ * Returns the request uri, even if the website uses one or more
+ * reverse proxies
+ * @return string
+ */
+ public function getRequestUri();
+
+ /**
+ * Get raw PathInfo from request (not urldecoded)
+ * @throws \Exception
+ * @return string Path info
+ */
+ public function getRawPathInfo();
+
+ /**
+ * Get PathInfo from request
+ * @throws \Exception
+ * @return string|false Path info or false when not found
+ */
+ public function getPathInfo();
+
+ /**
+ * Returns the script name, even if the website uses one or more
+ * reverse proxies
+ * @return string the script name
+ */
+ public function getScriptName();
+
+ /**
+ * Checks whether the user agent matches a given regex
+ * @param array $agent array of agent names
+ * @return bool true if at least one of the given agent matches, false otherwise
+ */
+ public function isUserAgent(array $agent);
+
+ /**
+ * Returns the unverified server host from the headers without checking
+ * whether it is a trusted domain
+ * @return string Server host
+ */
+ public function getInsecureServerHost();
+
+ /**
+ * Returns the server host from the headers, or the first configured
+ * trusted domain if the host isn't in the trusted list
+ * @return string Server host
+ */
+ public function getServerHost();
}
diff --git a/lib/public/iservercontainer.php b/lib/public/iservercontainer.php
index 193e2fdf105..ec23cc52345 100644
--- a/lib/public/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -144,6 +144,7 @@ interface IServerContainer {
/**
* Returns an instance of the db facade
+ * @deprecated use getDatabaseConnection, will be removed in ownCloud 10
* @return \OCP\IDb
*/
function getDb();
@@ -255,7 +256,7 @@ interface IServerContainer {
* @return \OCP\ICertificateManager
*/
function getCertificateManager($user = null);
-
+
/**
* Create a new event source
*
@@ -317,4 +318,9 @@ interface IServerContainer {
* @return \bantu\IniGetWrapper\IniGetWrapper
*/
function getIniWrapper();
+
+ /**
+ * @return \OCP\Command\IBus
+ */
+ function getCommandBus();
}
diff --git a/lib/public/itags.php b/lib/public/itags.php
index 238b12c6424..ec6da9eb512 100644
--- a/lib/public/itags.php
+++ b/lib/public/itags.php
@@ -97,7 +97,7 @@ interface ITags {
* Throws an exception if the tag could not be found.
*
* @param string|integer $tag Tag id or name.
- * @return array An array of object ids or false on error.
+ * @return array|false An array of object ids or false on error.
*/
public function getIdsForTag($tag);
@@ -123,7 +123,7 @@ interface ITags {
* Add a new tag.
*
* @param string $name A string with a name of the tag
- * @return int the id of the added tag or false if it already exists.
+ * @return int|false the id of the added tag or false if it already exists.
*/
public function add($name);
@@ -158,7 +158,7 @@ interface ITags {
/**
* Get favorites for an object type
*
- * @return array An array of object ids.
+ * @return array|false An array of object ids.
*/
public function getFavorites();
diff --git a/lib/public/json.php b/lib/public/json.php
index e7371ad63f3..5d9675e5ba4 100644
--- a/lib/public/json.php
+++ b/lib/public/json.php
@@ -23,7 +23,6 @@
/**
* Public interface of ownCloud for apps to use.
* JSON Class
- *
*/
// use OCP namespace for all classes that are considered public.
@@ -31,141 +30,142 @@
namespace OCP;
/**
- * This class provides convinient functions to generate and send JSON data. Usefull for Ajax calls
+ * This class provides convenient functions to generate and send JSON data. Useful for Ajax calls
+ * @deprecated Use a AppFramework JSONResponse instead
*/
class JSON {
/**
- * Encode and print $data in JSON format
- * @param array $data The data to use
- * @param string $setContentType the optional content type
- * @return string json formatted string.
- */
+ * Encode and print $data in JSON format
+ * @param array $data The data to use
+ * @param bool $setContentType the optional content type
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function encodedPrint( $data, $setContentType=true ) {
- return(\OC_JSON::encodedPrint( $data, $setContentType ));
+ \OC_JSON::encodedPrint($data, $setContentType);
}
/**
- * Check if the user is logged in, send json error msg if not.
- *
- * This method checks if a user is logged in. If not, a json error
- * response will be return and the method will exit from execution
- * of the script.
- * The returned json will be in the format:
- *
- * {"status":"error","data":{"message":"Authentication error."}}
- *
- * Add this call to the start of all ajax method files that requires
- * an authenticated user.
- *
- * @return string json formatted error string if not authenticated.
- */
+ * Check if the user is logged in, send json error msg if not.
+ *
+ * This method checks if a user is logged in. If not, a json error
+ * response will be return and the method will exit from execution
+ * of the script.
+ * The returned json will be in the format:
+ *
+ * {"status":"error","data":{"message":"Authentication error."}}
+ *
+ * Add this call to the start of all ajax method files that requires
+ * an authenticated user.
+ * @deprecated Use annotation based ACLs from the AppFramework instead
+ */
public static function checkLoggedIn() {
- return(\OC_JSON::checkLoggedIn());
+ \OC_JSON::checkLoggedIn();
}
/**
- * Check an ajax get/post call if the request token is valid.
- *
- * This method checks for a valid variable 'requesttoken' in $_GET,
- * $_POST and $_SERVER. If a valid token is not found, a json error
- * response will be return and the method will exit from execution
- * of the script.
- * The returned json will be in the format:
- *
- * {"status":"error","data":{"message":"Token expired. Please reload page."}}
- *
- * Add this call to the start of all ajax method files that creates,
- * updates or deletes anything.
- * In cases where you e.g. use an ajax call to load a dialog containing
- * a submittable form, you will need to add the requesttoken first as a
- * parameter to the ajax call, then assign it to the template and finally
- * add a hidden input field also named 'requesttoken' containing the value.
- *
- * @return \json|null json formatted error string if not valid.
- */
+ * Check an ajax get/post call if the request token is valid.
+ *
+ * This method checks for a valid variable 'requesttoken' in $_GET,
+ * $_POST and $_SERVER. If a valid token is not found, a json error
+ * response will be return and the method will exit from execution
+ * of the script.
+ * The returned json will be in the format:
+ *
+ * {"status":"error","data":{"message":"Token expired. Please reload page."}}
+ *
+ * Add this call to the start of all ajax method files that creates,
+ * updates or deletes anything.
+ * In cases where you e.g. use an ajax call to load a dialog containing
+ * a submittable form, you will need to add the requesttoken first as a
+ * parameter to the ajax call, then assign it to the template and finally
+ * add a hidden input field also named 'requesttoken' containing the value.
+ * @deprecated Use annotation based CSRF checks from the AppFramework instead
+ */
public static function callCheck() {
- return(\OC_JSON::callCheck());
+ \OC_JSON::callCheck();
}
/**
- * Send json success msg
- *
- * Return a json success message with optional extra data.
- * @see OCP\JSON::error() for the format to use.
- *
- * @param array $data The data to use
- * @return string json formatted string.
- */
+ * Send json success msg
+ *
+ * Return a json success message with optional extra data.
+ * @see OCP\JSON::error() for the format to use.
+ *
+ * @param array $data The data to use
+ * @return string json formatted string.
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function success( $data = array() ) {
- return(\OC_JSON::success( $data ));
+ \OC_JSON::success($data);
}
/**
- * Send json error msg
- *
- * Return a json error message with optional extra data for
- * error message or app specific data.
- *
- * Example use:
- *
- * $id = [some value]
- * OCP\JSON::error(array('data':array('message':'An error happened', 'id': $id)));
- *
- * Will return the json formatted string:
- *
- * {"status":"error","data":{"message":"An error happened", "id":[some value]}}
- *
- * @param array $data The data to use
- * @return string json formatted error string.
- */
+ * Send json error msg
+ *
+ * Return a json error message with optional extra data for
+ * error message or app specific data.
+ *
+ * Example use:
+ *
+ * $id = [some value]
+ * OCP\JSON::error(array('data':array('message':'An error happened', 'id': $id)));
+ *
+ * Will return the json formatted string:
+ *
+ * {"status":"error","data":{"message":"An error happened", "id":[some value]}}
+ *
+ * @param array $data The data to use
+ * @return string json formatted error string.
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function error( $data = array() ) {
- return(\OC_JSON::error( $data ));
+ \OC_JSON::error( $data );
}
/**
- * Set Content-Type header to jsonrequest
- * @param array $type The contwnt type header
- * @return string json formatted string.
- */
+ * Set Content-Type header to jsonrequest
+ * @param string $type The content type header
+ * @deprecated Use a AppFramework JSONResponse instead
+ */
public static function setContentTypeHeader( $type='application/json' ) {
- return(\OC_JSON::setContentTypeHeader( $type ));
+ \OC_JSON::setContentTypeHeader($type);
}
/**
- * Check if the App is enabled and send JSON error message instead
- *
- * This method checks if a specific app is enabled. If not, a json error
- * response will be return and the method will exit from execution
- * of the script.
- * The returned json will be in the format:
- *
- * {"status":"error","data":{"message":"Application is not enabled."}}
- *
- * Add this call to the start of all ajax method files that requires
- * a specific app to be enabled.
- *
- * @param string $app The app to check
- * @return string json formatted string if not enabled.
- */
+ * Check if the App is enabled and send JSON error message instead
+ *
+ * This method checks if a specific app is enabled. If not, a json error
+ * response will be return and the method will exit from execution
+ * of the script.
+ * The returned json will be in the format:
+ *
+ * {"status":"error","data":{"message":"Application is not enabled."}}
+ *
+ * Add this call to the start of all ajax method files that requires
+ * a specific app to be enabled.
+ *
+ * @param string $app The app to check
+ * @deprecated Use the AppFramework instead. It will automatically check if the app is enabled.
+ */
public static function checkAppEnabled( $app ) {
- return(\OC_JSON::checkAppEnabled( $app ));
+ \OC_JSON::checkAppEnabled($app);
}
/**
- * Check if the user is a admin, send json error msg if not
- *
- * This method checks if the current user has admin rights. If not, a json error
- * response will be return and the method will exit from execution
- * of the script.
- * The returned json will be in the format:
- *
- * {"status":"error","data":{"message":"Authentication error."}}
- *
- * Add this call to the start of all ajax method files that requires
- * administrative rights.
- *
- * @return string json formatted string if not admin user.
- */
+ * Check if the user is a admin, send json error msg if not
+ *
+ * This method checks if the current user has admin rights. If not, a json error
+ * response will be return and the method will exit from execution
+ * of the script.
+ * The returned json will be in the format:
+ *
+ * {"status":"error","data":{"message":"Authentication error."}}
+ *
+ * Add this call to the start of all ajax method files that requires
+ * administrative rights.
+ *
+ * @deprecated Use annotation based ACLs from the AppFramework instead
+ */
public static function checkAdminUser() {
\OC_JSON::checkAdminUser();
}
@@ -173,14 +173,17 @@ class JSON {
/**
* Encode JSON
* @param array $data
+ * @return string
+ * @deprecated Use a AppFramework JSONResponse instead
*/
public static function encode($data) {
- return(\OC_JSON::encode($data));
+ return \OC_JSON::encode($data);
}
/**
* Check is a given user exists - send json error msg if not
* @param string $user
+ * @deprecated Use a AppFramework JSONResponse instead
*/
public static function checkUserExists($user) {
\OC_JSON::checkUserExists($user);
diff --git a/lib/public/security/isecurerandom.php b/lib/public/security/isecurerandom.php
index 3de60f8d717..b4c488b7f37 100644
--- a/lib/public/security/isecurerandom.php
+++ b/lib/public/security/isecurerandom.php
@@ -53,9 +53,10 @@ interface ISecureRandom {
/**
* Generate a random string of specified length.
* @param string $length The length of the generated string
- * @param string $characters An optional list of characters to use
+ * @param string $characters An optional list of characters to use if no characterlist is
+ * specified all valid base64 characters are used.
* @return string
- * @throws \Exception
+ * @throws \Exception If the generator is not initialized.
*/
public function generate($length, $characters = '');
}
diff --git a/lib/public/share_backend.php b/lib/public/share_backend.php
index 1ae63d4c1db..0062648d82c 100644
--- a/lib/public/share_backend.php
+++ b/lib/public/share_backend.php
@@ -46,7 +46,7 @@ interface Share_Backend {
* Converts the shared item sources back into the item in the specified format
* @param array $items Shared items
* @param int $format
- * @return TODO
+ * @return array
*
* The items array is a 3-dimensional array with the item_source as the
* first key and the share id as the second key to an array with the share
diff --git a/lib/public/util.php b/lib/public/util.php
index 7f1974a421d..aa6cd5ba012 100644
--- a/lib/public/util.php
+++ b/lib/public/util.php
@@ -234,9 +234,10 @@ class Util {
/**
* Returns the server host, even if the website uses one or more reverse proxy
* @return string the server host
+ * @deprecated Use \OCP\IRequest::getServerHost
*/
public static function getServerHost() {
- return(\OC_Request::serverHost());
+ return \OC::$server->getRequest()->getServerHost();
}
/**
@@ -285,25 +286,28 @@ class Util {
/**
* Returns the server protocol. It respects reverse proxy servers and load balancers
* @return string the server protocol
+ * @deprecated Use \OCP\IRequest::getServerProtocol
*/
public static function getServerProtocol() {
- return(\OC_Request::serverProtocol());
+ return \OC::$server->getRequest()->getServerProtocol();
}
/**
* Returns the request uri, even if the website uses one or more reverse proxies
* @return string the request uri
+ * @deprecated Use \OCP\IRequest::getRequestUri
*/
public static function getRequestUri() {
- return(\OC_Request::requestUri());
+ return \OC::$server->getRequest()->getRequestUri();
}
/**
* Returns the script name, even if the website uses one or more reverse proxies
* @return string the script name
+ * @deprecated Use \OCP\IRequest::getScriptName
*/
public static function getScriptName() {
- return(\OC_Request::scriptName());
+ return \OC::$server->getRequest()->getScriptName();
}
/**
@@ -493,6 +497,7 @@ class Util {
* Returns whether the given file name is valid
* @param string $file file name to check
* @return bool true if the file name is valid, false otherwise
+ * @deprecated use \OC\Files\View::verifyPath()
*/
public static function isValidFileName($file) {
return \OC_Util::isValidFileName($file);
diff --git a/lib/repair/dropoldtables.php b/lib/repair/dropoldtables.php
new file mode 100644
index 00000000000..00d2a1bfab9
--- /dev/null
+++ b/lib/repair/dropoldtables.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Joas Schilling
+ * @copyright 2015 Joas Schilling nickvergessen@owncloud.com
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Repair;
+
+
+use OC\DB\Connection;
+use OC\Hooks\BasicEmitter;
+use OC\RepairStep;
+
+class DropOldTables extends BasicEmitter implements RepairStep {
+
+ /** @var Connection */
+ protected $connection;
+
+ /**
+ * @param Connection $connection
+ */
+ public function __construct(Connection $connection) {
+ $this->connection = $connection;
+ }
+
+ /**
+ * Returns the step's name
+ *
+ * @return string
+ */
+ public function getName() {
+ return 'Drop old database tables';
+ }
+
+ /**
+ * Run repair step.
+ * Must throw exception on error.
+ *
+ * @throws \Exception in case of failure
+ */
+ public function run() {
+ foreach ($this->oldDatabaseTables() as $tableName) {
+ if ($this->connection->tableExists($tableName)){
+ $this->emit('\OC\Repair', 'info', [
+ sprintf('Table %s has been deleted', $tableName)
+ ]);
+ $this->connection->dropTable($tableName);
+ }
+ }
+ }
+
+ /**
+ * Returns a list of outdated tables which are not used anymore
+ * @return array
+ */
+ protected function oldDatabaseTables() {
+ return [
+ 'calendar_calendars',
+ 'calendar_objects',
+ 'calendar_share_calendar',
+ 'calendar_share_event',
+ 'foldersize',
+ 'fscache',
+ 'locks',
+ 'log',
+ 'media_albums',
+ 'media_artists',
+ 'media_sessions',
+ 'media_songs',
+ 'media_users',
+ 'permissions',
+ 'pictures_images_cache',
+ 'queuedtasks',
+ 'sharing',
+ ];
+ }
+}
diff --git a/lib/repair/enablefilesapp.php b/lib/repair/enablefilesapp.php
deleted file mode 100644
index a3298cf76b3..00000000000
--- a/lib/repair/enablefilesapp.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Copyright (c) 2015 Morris Jobke <hey@morrisjobke.de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-namespace OC\Repair;
-
-use OC\Hooks\BasicEmitter;
-use OC\RepairStep;
-use OCP\IConfig;
-
-/**
- * Class EnableFilesApp - enables files app if disabled
- *
- * TODO: remove this with ownCloud 8.1 - this isn't possible anymore with 8.0
- *
- * @package OC\Repair
- */
-class EnableFilesApp extends BasicEmitter implements RepairStep {
-
- /** @var IConfig */
- protected $config;
-
- /**
- * @param IConfig $config
- */
- public function __construct(IConfig $config) {
- $this->config = $config;
- }
-
- /**
- * @return string
- */
- public function getName() {
- return 'Re-enable file app';
- }
-
- /**
- * Enables the files app if it is disabled
- */
- public function run() {
- if ($this->config->getAppValue('files', 'enabled', 'no') !== 'yes') {
- $this->config->setAppValue('files', 'enabled', 'yes');
- $this->emit('\OC\Repair', 'info', ['Files app was disabled - re-enabled']);
- }
- }
-}
diff --git a/lib/repair/repairmimetypes.php b/lib/repair/repairmimetypes.php
index e3f4402cfd5..06cd144bff4 100644
--- a/lib/repair/repairmimetypes.php
+++ b/lib/repair/repairmimetypes.php
@@ -2,6 +2,7 @@
/**
* Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
* Copyright (c) 2014 Jörn Dreyer jfd@owncloud.com
+ * Copyright (c) 2014 Olivier Paroz owncloud@oparoz.com
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
@@ -16,32 +17,32 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
public function getName() {
return 'Repair mime types';
}
-
- private function fixOfficeMimeTypes() {
- // update wrong mimetypes
- $wrongMimetypes = array(
- 'application/mspowerpoint' => 'application/vnd.ms-powerpoint',
- 'application/msexcel' => 'application/vnd.ms-excel',
- );
-
- $existsStmt = \OC_DB::prepare('
+
+ private static function existsStmt() {
+ return \OC_DB::prepare('
SELECT count(`mimetype`)
FROM `*PREFIX*mimetypes`
WHERE `mimetype` = ?
');
+ }
- $getIdStmt = \OC_DB::prepare('
+ private static function getIdStmt() {
+ return \OC_DB::prepare('
SELECT `id`
FROM `*PREFIX*mimetypes`
WHERE `mimetype` = ?
');
+ }
- $insertStmt = \OC_DB::prepare('
+ private static function insertStmt() {
+ return \OC_DB::prepare('
INSERT INTO `*PREFIX*mimetypes` ( `mimetype` )
VALUES ( ? )
');
+ }
- $updateWrongStmt = \OC_DB::prepare('
+ private static function updateWrongStmt() {
+ return \OC_DB::prepare('
UPDATE `*PREFIX*filecache`
SET `mimetype` = (
SELECT `id`
@@ -49,106 +50,125 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
WHERE `mimetype` = ?
) WHERE `mimetype` = ?
');
-
- $deleteStmt = \OC_DB::prepare('
+ }
+
+ private static function deleteStmt() {
+ return \OC_DB::prepare('
DELETE FROM `*PREFIX*mimetypes`
WHERE `id` = ?
');
-
+ }
+
+ private static function updateByNameStmt() {
+ return \OC_DB::prepare('
+ UPDATE `*PREFIX*filecache`
+ SET `mimetype` = (
+ SELECT `id`
+ FROM `*PREFIX*mimetypes`
+ WHERE `mimetype` = ?
+ ) WHERE `name` LIKE ?
+ ');
+ }
+
+ private function repairMimetypes($wrongMimetypes) {
foreach ($wrongMimetypes as $wrong => $correct) {
-
-
// do we need to remove a wrong mimetype?
- $result = \OC_DB::executeAudited($getIdStmt, array($wrong));
+ $result = \OC_DB::executeAudited(self::getIdStmt(), array($wrong));
$wrongId = $result->fetchOne();
if ($wrongId !== false) {
-
// do we need to insert the correct mimetype?
- $result = \OC_DB::executeAudited($existsStmt, array($correct));
+ $result = \OC_DB::executeAudited(self::existsStmt(), array($correct));
$exists = $result->fetchOne();
- if ( ! $exists ) {
- // insert mimetype
- \OC_DB::executeAudited($insertStmt, array($correct));
- }
-
- // change wrong mimetype to correct mimetype in filecache
- \OC_DB::executeAudited($updateWrongStmt, array($correct, $wrongId));
+ if ( ! is_null($correct) ) {
+ if ( ! $exists ) {
+ // insert mimetype
+ \OC_DB::executeAudited(self::insertStmt(), array($correct));
+ }
+ // change wrong mimetype to correct mimetype in filecache
+ \OC_DB::executeAudited(self::updateWrongStmt(), array($correct, $wrongId));
+ }
+
// delete wrong mimetype
- \OC_DB::executeAudited($deleteStmt, array($wrongId));
+ \OC_DB::executeAudited(self::deleteStmt(), array($wrongId));
}
-
}
-
- $updatedMimetypes = array(
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- );
-
- $updateByNameStmt = \OC_DB::prepare('
- UPDATE `*PREFIX*filecache`
- SET `mimetype` = (
- SELECT `id`
- FROM `*PREFIX*mimetypes`
- WHERE `mimetype` = ?
- ) WHERE `name` LIKE ?
- ');
-
- // separate doc from docx etc
+ }
+
+ private function updateMimetypes($updatedMimetypes) {
+
foreach ($updatedMimetypes as $extension => $mimetype ) {
- $result = \OC_DB::executeAudited($existsStmt, array($mimetype));
+ $result = \OC_DB::executeAudited(self::existsStmt(), array($mimetype));
$exists = $result->fetchOne();
if ( ! $exists ) {
// insert mimetype
- \OC_DB::executeAudited($insertStmt, array($mimetype));
+ \OC_DB::executeAudited(self::insertStmt(), array($mimetype));
}
// change mimetype for files with x extension
- \OC_DB::executeAudited($updateByNameStmt, array($mimetype, '%.'.$extension));
+ \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetype, '%.'.$extension));
}
}
- private function fixAPKMimeType() {
- $existsStmt = \OC_DB::prepare('
- SELECT count(`mimetype`)
- FROM `*PREFIX*mimetypes`
- WHERE `mimetype` = ?
- ');
+ private function fixOfficeMimeTypes() {
+ // update wrong mimetypes
+ $wrongMimetypes = array(
+ 'application/mspowerpoint' => 'application/vnd.ms-powerpoint',
+ 'application/msexcel' => 'application/vnd.ms-excel',
+ );
- $insertStmt = \OC_DB::prepare('
- INSERT INTO `*PREFIX*mimetypes` ( `mimetype` )
- VALUES ( ? )
- ');
+ self::repairMimetypes($wrongMimetypes);
+ $updatedMimetypes = array(
+ 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
+ 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
+ );
- $updateByNameStmt = \OC_DB::prepare('
- UPDATE `*PREFIX*filecache`
- SET `mimetype` = (
- SELECT `id`
- FROM `*PREFIX*mimetypes`
- WHERE `mimetype` = ?
- ) WHERE `name` LIKE ?
- ');
+ // separate doc from docx etc
+ self::updateMimetypes($updatedMimetypes);
+
+ }
+
+ private function fixApkMimeType() {
+ $updatedMimetypes = array(
+ 'apk' => 'application/vnd.android.package-archive',
+ );
- $mimeTypeExtension = 'apk';
- $mimeTypeName = 'application/vnd.android.package-archive';
+ self::updateMimetypes($updatedMimetypes);
+ }
+
+ private function fixFontsMimeTypes() {
+ // update wrong mimetypes
+ $wrongMimetypes = array(
+ 'font' => null,
+ 'font/opentype' => 'application/font-sfnt',
+ 'application/x-font-ttf' => 'application/font-sfnt',
+ );
- $result = \OC_DB::executeAudited($existsStmt, array($mimeTypeName));
- $exists = $result->fetchOne();
+ self::repairMimetypes($wrongMimetypes);
+
+ $updatedMimetypes = array(
+ 'ttf' => 'application/font-sfnt',
+ 'otf' => 'application/font-sfnt',
+ 'pfb' => 'application/x-font',
+ );
- if ( ! $exists ) {
- // insert mimetype
- \OC_DB::executeAudited($insertStmt, array($mimeTypeName));
- }
+ self::updateMimetypes($updatedMimetypes);
+ }
+
+ private function fixPostscriptMimeType() {
+ $updatedMimetypes = array(
+ 'eps' => 'application/postscript',
+ 'ps' => 'application/postscript',
+ );
- // change mimetype for files with x extension
- \OC_DB::executeAudited($updateByNameStmt, array($mimeTypeName, '%.'.$mimeTypeExtension));
+ self::updateMimetypes($updatedMimetypes);
}
/**
@@ -158,10 +178,17 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep {
if ($this->fixOfficeMimeTypes()) {
$this->emit('\OC\Repair', 'info', array('Fixed office mime types'));
}
-
- if ($this->fixAPKMimeType()) {
+
+ if ($this->fixApkMimeType()) {
$this->emit('\OC\Repair', 'info', array('Fixed APK mime type'));
}
+
+ if ($this->fixFontsMimeTypes()) {
+ $this->emit('\OC\Repair', 'info', array('Fixed fonts mime types'));
+ }
+
+ if ($this->fixPostscriptMimeType()) {
+ $this->emit('\OC\Repair', 'info', array('Fixed Postscript mime types'));
+ }
}
-}
-
+} \ No newline at end of file