aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/nl.js4
-rw-r--r--lib/l10n/nl.json4
-rw-r--r--lib/private/AppFramework/Http/Request.php2
-rw-r--r--lib/private/Files/Storage/FailedStorage.php2
-rw-r--r--lib/private/Files/Storage/Local.php6
-rw-r--r--lib/private/L10N/L10N.php7
-rw-r--r--lib/private/Lockdown/Filesystem/NullStorage.php2
-rw-r--r--lib/private/Mail/Mailer.php2
-rw-r--r--lib/private/Mail/Message.php4
-rw-r--r--lib/private/Repair/NC13/RepairInvalidPaths.php4
-rw-r--r--lib/private/Route/Route.php11
-rw-r--r--lib/public/L10N/IFactory.php9
12 files changed, 34 insertions, 23 deletions
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js
index 88d88563f63..aa1cce13fc6 100644
--- a/lib/l10n/nl.js
+++ b/lib/l10n/nl.js
@@ -12,6 +12,7 @@ OC.L10N.register(
"%1$s, %2$s and %3$s" : "%1$s, %2$s en %3$s",
"%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s en %4$s",
"%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s en %5$s",
+ "Education Edition" : "Onderwijs Editie",
"Enterprise bundle" : "Zakelijke bundel",
"Groupware bundle" : "Groupware bundel",
"Social sharing bundle" : "Sociaal delen bundel",
@@ -121,6 +122,9 @@ OC.L10N.register(
"Expiration date is in the past" : "De vervaldatum ligt in het verleden",
"Can’t set expiration date more than %s days in the future" : "Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen",
"%s shared »%s« with you" : "%s deelde »%s« met jou",
+ "%s shared »%s« with you." : "%s deelde »%s« met jou.",
+ "Click the button below to open it." : "Klik de onderstaande button om te openen.",
+ "Open »%s«" : "Open »%s«",
"%s via %s" : "%s via %s",
"The requested share does not exist anymore" : "De vezochte share bestaat niet meer",
"Could not find category \"%s\"" : "Kon categorie \"%s\" niet vinden",
diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json
index 55e7f71d6c6..8591ef441d3 100644
--- a/lib/l10n/nl.json
+++ b/lib/l10n/nl.json
@@ -10,6 +10,7 @@
"%1$s, %2$s and %3$s" : "%1$s, %2$s en %3$s",
"%1$s, %2$s, %3$s and %4$s" : "%1$s, %2$s, %3$s en %4$s",
"%1$s, %2$s, %3$s, %4$s and %5$s" : "%1$s, %2$s, %3$s, %4$s en %5$s",
+ "Education Edition" : "Onderwijs Editie",
"Enterprise bundle" : "Zakelijke bundel",
"Groupware bundle" : "Groupware bundel",
"Social sharing bundle" : "Sociaal delen bundel",
@@ -119,6 +120,9 @@
"Expiration date is in the past" : "De vervaldatum ligt in het verleden",
"Can’t set expiration date more than %s days in the future" : "Kan de vervaldatum niet meer dan %s dagen in de toekomst instellen",
"%s shared »%s« with you" : "%s deelde »%s« met jou",
+ "%s shared »%s« with you." : "%s deelde »%s« met jou.",
+ "Click the button below to open it." : "Klik de onderstaande button om te openen.",
+ "Open »%s«" : "Open »%s«",
"%s via %s" : "%s via %s",
"The requested share does not exist anymore" : "De vezochte share bestaat niet meer",
"Could not find category \"%s\"" : "Kon categorie \"%s\" niet vinden",
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 956744e5d5e..7e21434c734 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -432,7 +432,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// 'application/json' must be decoded manually.
if (strpos($this->getHeader('Content-Type'), 'application/json') !== false) {
$params = json_decode(file_get_contents($this->inputStream), true);
- if(count($params) > 0) {
+ if($params !== null && count($params) > 0) {
$this->items['params'] = $params;
if($this->method === 'POST') {
$this->items['post'] = $params;
diff --git a/lib/private/Files/Storage/FailedStorage.php b/lib/private/Files/Storage/FailedStorage.php
index d2aae33bb21..d4046b62fee 100644
--- a/lib/private/Files/Storage/FailedStorage.php
+++ b/lib/private/Files/Storage/FailedStorage.php
@@ -184,7 +184,7 @@ class FailedStorage extends Common {
return true;
}
- public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);
}
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index c19427e5f9b..0577093712e 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -412,6 +412,12 @@ class Local extends \OC\Files\Storage\Common {
*/
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')) {
+ if ($sourceStorage->instanceOfStorage(Jail::class)) {
+ /**
+ * @var \OC\Files\Storage\Wrapper\Jail $sourceStorage
+ */
+ $sourceInternalPath = $sourceStorage->getUnjailedPath($sourceInternalPath);
+ }
/**
* @var \OC\Files\Storage\Local $sourceStorage
*/
diff --git a/lib/private/L10N/L10N.php b/lib/private/L10N/L10N.php
index b933048982f..620c99dd1ec 100644
--- a/lib/private/L10N/L10N.php
+++ b/lib/private/L10N/L10N.php
@@ -25,6 +25,7 @@ namespace OC\L10N;
use OCP\IL10N;
use OCP\L10N\IFactory;
use Punic\Calendar;
+use Symfony\Component\Translation\PluralizationRules;
class L10N implements IL10N {
@@ -191,8 +192,12 @@ class L10N implements IL10N {
*/
public function getPluralFormFunction() {
if (is_null($this->pluralFormFunction)) {
- $this->pluralFormFunction = $this->factory->createPluralFunction($this->pluralFormString);
+ $lang = $this->getLanguageCode();
+ $this->pluralFormFunction = function($n) use ($lang) {
+ return PluralizationRules::get($n, $lang);
+ };
}
+
return $this->pluralFormFunction;
}
diff --git a/lib/private/Lockdown/Filesystem/NullStorage.php b/lib/private/Lockdown/Filesystem/NullStorage.php
index 831d8a8b2a0..3f3aad3df03 100644
--- a/lib/private/Lockdown/Filesystem/NullStorage.php
+++ b/lib/private/Lockdown/Filesystem/NullStorage.php
@@ -157,7 +157,7 @@ class NullStorage extends Common {
return false;
}
- public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
}
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index e438f75d2ce..d232587df63 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -170,7 +170,7 @@ class Mailer implements IMailer {
}
list($name, $domain) = explode('@', $email, 2);
- $domain = idn_to_ascii($domain);
+ $domain = idn_to_ascii($domain, 0,INTL_IDNA_VARIANT_UTS46);
return $name.'@'.$domain;
}
diff --git a/lib/private/Mail/Message.php b/lib/private/Mail/Message.php
index 5ffc050360a..2d3c49d0ce1 100644
--- a/lib/private/Mail/Message.php
+++ b/lib/private/Mail/Message.php
@@ -58,11 +58,11 @@ class Message {
foreach($addresses as $email => $readableName) {
if(!is_numeric($email)) {
list($name, $domain) = explode('@', $email, 2);
- $domain = idn_to_ascii($domain);
+ $domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46);
$convertedAddresses[$name.'@'.$domain] = $readableName;
} else {
list($name, $domain) = explode('@', $readableName, 2);
- $domain = idn_to_ascii($domain);
+ $domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46);
$convertedAddresses[$email] = $name.'@'.$domain;
}
}
diff --git a/lib/private/Repair/NC13/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php
index 29a0e1ed157..8e6a4ca0e37 100644
--- a/lib/private/Repair/NC13/RepairInvalidPaths.php
+++ b/lib/private/Repair/NC13/RepairInvalidPaths.php
@@ -92,11 +92,11 @@ class RepairInvalidPaths implements IRepairStep {
$this->getIdQuery = $builder->select('fileid')
->from('filecache')
->where($builder->expr()->eq('storage', $builder->createParameter('storage')))
- ->andWhere($builder->expr()->eq('path', $builder->createParameter('path')));
+ ->andWhere($builder->expr()->eq('path_hash', $builder->createParameter('path_hash')));
}
$this->getIdQuery->setParameter('storage', $storage, IQueryBuilder::PARAM_INT);
- $this->getIdQuery->setParameter('path', $path);
+ $this->getIdQuery->setParameter('path_hash', md5($path));
return $this->getIdQuery->execute()->fetchColumn();
}
diff --git a/lib/private/Route/Route.php b/lib/private/Route/Route.php
index 3a953af9011..7fa630a89fa 100644
--- a/lib/private/Route/Route.php
+++ b/lib/private/Route/Route.php
@@ -148,11 +148,12 @@ class Route extends SymfonyRoute implements IRoute {
* @return void
*/
public function actionInclude($file) {
- $function = create_function('$param',
- 'unset($param["_route"]);'
- .'$_GET=array_merge($_GET, $param);'
- .'unset($param);'
- .'require_once "'.$file.'";');
+ $function = function($param) use ($file) {
+ unset($param["_route"]);
+ $_GET=array_merge($_GET, $param);
+ unset($param);
+ require_once "$file";
+ } ;
$this->action($function);
}
}
diff --git a/lib/public/L10N/IFactory.php b/lib/public/L10N/IFactory.php
index b5f93c2389c..9820082c72e 100644
--- a/lib/public/L10N/IFactory.php
+++ b/lib/public/L10N/IFactory.php
@@ -60,13 +60,4 @@ interface IFactory {
* @since 9.0.0
*/
public function languageExists($app, $lang);
-
- /**
- * Creates a function from the plural string
- *
- * @param string $string
- * @return string Unique function name
- * @since 9.0.0
- */
- public function createPluralFunction($string);
}