summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n/fr.js1
-rw-r--r--lib/l10n/fr.json1
-rw-r--r--lib/private/Notification/Manager.php36
-rw-r--r--lib/private/legacy/util.php4
-rw-r--r--lib/public/Notification/IManager.php12
5 files changed, 44 insertions, 10 deletions
diff --git a/lib/l10n/fr.js b/lib/l10n/fr.js
index eaeb1f50b1e..7a95348d341 100644
--- a/lib/l10n/fr.js
+++ b/lib/l10n/fr.js
@@ -229,6 +229,7 @@ OC.L10N.register(
"Your data directory is invalid" : "Votre répertoire n'est pas valide",
"Ensure there is a file called \".ocdata\" in the root of the data directory." : "Assurez-vous que le répertoire de données contient un fichier \".ocdata\" à sa racine.",
"Action \"%s\" not supported or implemented." : "Action \"%s\" non supportée ou implémentée.",
+ "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Paramètres manquants pour compléter la requête. Paramètres manquants : \"%s\"",
"Could not obtain lock type %d on \"%s\"." : "Impossible d'obtenir le verrouillage de type %d sur \"%s\".",
"Storage unauthorized. %s" : "Espace de stockage non autorisé. %s",
"Storage incomplete configuration. %s" : "Configuration de l'espace de stockage incomplète. %s",
diff --git a/lib/l10n/fr.json b/lib/l10n/fr.json
index 50416a619a8..77835280ed9 100644
--- a/lib/l10n/fr.json
+++ b/lib/l10n/fr.json
@@ -227,6 +227,7 @@
"Your data directory is invalid" : "Votre répertoire n'est pas valide",
"Ensure there is a file called \".ocdata\" in the root of the data directory." : "Assurez-vous que le répertoire de données contient un fichier \".ocdata\" à sa racine.",
"Action \"%s\" not supported or implemented." : "Action \"%s\" non supportée ou implémentée.",
+ "Parameters missing in order to complete the request. Missing Parameters: \"%s\"" : "Paramètres manquants pour compléter la requête. Paramètres manquants : \"%s\"",
"Could not obtain lock type %d on \"%s\"." : "Impossible d'obtenir le verrouillage de type %d sur \"%s\".",
"Storage unauthorized. %s" : "Espace de stockage non autorisé. %s",
"Storage incomplete configuration. %s" : "Configuration de l'espace de stockage incomplète. %s",
diff --git a/lib/private/Notification/Manager.php b/lib/private/Notification/Manager.php
index bf0e8abadbb..4c3f7a2453c 100644
--- a/lib/private/Notification/Manager.php
+++ b/lib/private/Notification/Manager.php
@@ -53,6 +53,9 @@ class Manager implements IManager {
/** @var \Closure[] */
protected $notifiersInfoClosures;
+ /** @var bool */
+ protected $preparingPushNotification;
+
/**
* Manager constructor.
*
@@ -66,6 +69,7 @@ class Manager implements IManager {
$this->appsClosures = [];
$this->notifiersClosures = [];
$this->notifiersInfoClosures = [];
+ $this->preparingPushNotification = false;
}
/**
@@ -95,7 +99,7 @@ class Manager implements IManager {
/**
* @return IApp[]
*/
- protected function getApps() {
+ protected function getApps(): array {
if (!empty($this->apps)) {
return $this->apps;
}
@@ -115,7 +119,7 @@ class Manager implements IManager {
/**
* @return INotifier[]
*/
- protected function getNotifiers() {
+ protected function getNotifiers(): array {
if (!empty($this->notifiers)) {
return $this->notifiers;
}
@@ -135,7 +139,7 @@ class Manager implements IManager {
/**
* @return array[]
*/
- public function listNotifiers() {
+ public function listNotifiers(): array {
if (!empty($this->notifiersInfo)) {
return $this->notifiersInfo;
}
@@ -143,7 +147,7 @@ class Manager implements IManager {
$this->notifiersInfo = [];
foreach ($this->notifiersInfoClosures as $closure) {
$notifier = $closure();
- if (!is_array($notifier) || count($notifier) !== 2 || !isset($notifier['id']) || !isset($notifier['name'])) {
+ if (!\is_array($notifier) || \count($notifier) !== 2 || !isset($notifier['id'], $notifier['name'])) {
throw new \InvalidArgumentException('The given notifier information is invalid');
}
if (isset($this->notifiersInfo[$notifier['id']])) {
@@ -159,7 +163,7 @@ class Manager implements IManager {
* @return INotification
* @since 8.2.0
*/
- public function createNotification() {
+ public function createNotification(): INotification {
return new Notification($this->validator);
}
@@ -167,11 +171,27 @@ class Manager implements IManager {
* @return bool
* @since 8.2.0
*/
- public function hasNotifiers() {
+ public function hasNotifiers(): bool {
return !empty($this->notifiersClosures);
}
/**
+ * @param bool $preparingPushNotification
+ * @since 14.0.0
+ */
+ public function setPreparingPushNotification($preparingPushNotification) {
+ $this->preparingPushNotification = $preparingPushNotification;
+ }
+
+ /**
+ * @return bool
+ * @since 14.0.0
+ */
+ public function isPreparingPushNotification(): bool {
+ return $this->preparingPushNotification;
+ }
+
+ /**
* @param INotification $notification
* @throws \InvalidArgumentException When the notification is not valid
* @since 8.2.0
@@ -198,7 +218,7 @@ class Manager implements IManager {
* @throws \InvalidArgumentException When the notification was not prepared by a notifier
* @since 8.2.0
*/
- public function prepare(INotification $notification, $languageCode) {
+ public function prepare(INotification $notification, $languageCode): INotification {
$notifiers = $this->getNotifiers();
foreach ($notifiers as $notifier) {
@@ -235,7 +255,7 @@ class Manager implements IManager {
* @param INotification $notification
* @return int
*/
- public function getCount(INotification $notification) {
+ public function getCount(INotification $notification): int {
$apps = $this->getApps();
$count = 0;
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index 5e9a46d44a9..b285eb382e7 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -1378,7 +1378,7 @@ class OC_Util {
}
// Zend OpCache >= 7.0.0, PHP >= 5.5.0
if (function_exists('opcache_invalidate')) {
- $ret = opcache_invalidate($path);
+ $ret = @opcache_invalidate($path);
}
}
return $ret;
@@ -1412,7 +1412,7 @@ class OC_Util {
}
// Opcache (PHP >= 5.5)
if (function_exists('opcache_reset')) {
- opcache_reset();
+ @opcache_reset();
}
}
diff --git a/lib/public/Notification/IManager.php b/lib/public/Notification/IManager.php
index cbc48142cbb..003e5f1bad1 100644
--- a/lib/public/Notification/IManager.php
+++ b/lib/public/Notification/IManager.php
@@ -62,4 +62,16 @@ interface IManager extends IApp, INotifier {
* @since 9.0.0
*/
public function hasNotifiers();
+
+ /**
+ * @param bool $preparingPushNotification
+ * @since 14.0.0
+ */
+ public function setPreparingPushNotification($preparingPushNotification);
+
+ /**
+ * @return bool
+ * @since 14.0.0
+ */
+ public function isPreparingPushNotification();
}