diff options
Diffstat (limited to 'apps/files_reminders')
-rw-r--r-- | apps/files_reminders/l10n/fr.js | 11 | ||||
-rw-r--r-- | apps/files_reminders/l10n/fr.json | 11 | ||||
-rw-r--r-- | apps/files_reminders/l10n/sc.js | 19 | ||||
-rw-r--r-- | apps/files_reminders/l10n/sc.json | 17 | ||||
-rw-r--r-- | apps/files_reminders/l10n/tr.js | 4 | ||||
-rw-r--r-- | apps/files_reminders/l10n/tr.json | 4 | ||||
-rw-r--r-- | apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php | 6 | ||||
-rw-r--r-- | apps/files_reminders/lib/Db/ReminderMapper.php | 22 |
8 files changed, 30 insertions, 64 deletions
diff --git a/apps/files_reminders/l10n/fr.js b/apps/files_reminders/l10n/fr.js index 5db5e281323..2047eabb255 100644 --- a/apps/files_reminders/l10n/fr.js +++ b/apps/files_reminders/l10n/fr.js @@ -5,15 +5,18 @@ OC.L10N.register( "Reminder for {name}" : "Rappel pour {name}", "View file" : "Voir le fichier", "View folder" : "Voir le dossier", + "Files reminder" : "Rappel des fichiers", + "The \"files_reminders\" app can work properly." : "L'application « files_reminders » peut fonctionner correctement.", + "The \"files_reminders\" app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "L'application « files_reminders » a besoin de l'application de notifications pour fonctionner correctement. Vous devez activer les notifications ou désactiver « files_reminder ».", "Set file reminders" : "Définir des rappels pour des fichiers", "**📣 File reminders**\n\nSet file reminders.\n\nNote: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly." : "**📣 Rappels de fichiers**\n\nDéfinit des rappels de fichiers.\n\nNote: pour utiliser l'application `Rappels de fichiers`, assurez-vous que l'application `Notifications` est installée et activée. L'application `Notifications` fournit les APIs nécessaires pour que l'application `Rappels de fichiers` fonctionne correctement.", - "Set reminder for \"{fileName}\"" : "Définir un rappel pour « {fileName} »", + "Set reminder for \"{fileName}\"" : "Définir un rappel pour « {fileName} »", "Set reminder at custom date & time" : "Définition d'un rappel à une date et une heure personnalisées", "Clear reminder" : "Effacer le rappel", "Please choose a valid date & time" : "Veuillez choisir une date et une heure valables", "Reminder set for \"{fileName}\"" : "Définition d’un rappel pour « {fileName} »", "Failed to set reminder" : "Échec de la définition du rappel", - "Reminder cleared for \"{fileName}\"" : "Rappel effacé pour « {fileName} »", + "Reminder cleared for \"{fileName}\"" : "Rappel effacé pour « {fileName} »", "Failed to clear reminder" : "Échec de l'effacement du rappel", "We will remind you of this file" : "Nous vous rappellerons de ce fichier", "Cancel" : "Annuler", @@ -27,6 +30,8 @@ OC.L10N.register( "This weekend" : "Ce week-end", "Set reminder for this weekend" : "Définir un rappel pour ce week-end", "Next week" : "Semaine suivante", - "Set reminder for next week" : "Définir un rappel pour la semaine prochaine" + "Set reminder for next week" : "Définir un rappel pour la semaine prochaine", + "This files_reminder can work properly." : "Ce files_reminder peut fonctionner correctement.", + "The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "L'application files_reminder a besoin de l'application de notifications pour fonctionner correctement. Vous devez activer les notifications ou désactiver files_reminder." }, "nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"); diff --git a/apps/files_reminders/l10n/fr.json b/apps/files_reminders/l10n/fr.json index 2d876b6080e..107c89ef133 100644 --- a/apps/files_reminders/l10n/fr.json +++ b/apps/files_reminders/l10n/fr.json @@ -3,15 +3,18 @@ "Reminder for {name}" : "Rappel pour {name}", "View file" : "Voir le fichier", "View folder" : "Voir le dossier", + "Files reminder" : "Rappel des fichiers", + "The \"files_reminders\" app can work properly." : "L'application « files_reminders » peut fonctionner correctement.", + "The \"files_reminders\" app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "L'application « files_reminders » a besoin de l'application de notifications pour fonctionner correctement. Vous devez activer les notifications ou désactiver « files_reminder ».", "Set file reminders" : "Définir des rappels pour des fichiers", "**📣 File reminders**\n\nSet file reminders.\n\nNote: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly." : "**📣 Rappels de fichiers**\n\nDéfinit des rappels de fichiers.\n\nNote: pour utiliser l'application `Rappels de fichiers`, assurez-vous que l'application `Notifications` est installée et activée. L'application `Notifications` fournit les APIs nécessaires pour que l'application `Rappels de fichiers` fonctionne correctement.", - "Set reminder for \"{fileName}\"" : "Définir un rappel pour « {fileName} »", + "Set reminder for \"{fileName}\"" : "Définir un rappel pour « {fileName} »", "Set reminder at custom date & time" : "Définition d'un rappel à une date et une heure personnalisées", "Clear reminder" : "Effacer le rappel", "Please choose a valid date & time" : "Veuillez choisir une date et une heure valables", "Reminder set for \"{fileName}\"" : "Définition d’un rappel pour « {fileName} »", "Failed to set reminder" : "Échec de la définition du rappel", - "Reminder cleared for \"{fileName}\"" : "Rappel effacé pour « {fileName} »", + "Reminder cleared for \"{fileName}\"" : "Rappel effacé pour « {fileName} »", "Failed to clear reminder" : "Échec de l'effacement du rappel", "We will remind you of this file" : "Nous vous rappellerons de ce fichier", "Cancel" : "Annuler", @@ -25,6 +28,8 @@ "This weekend" : "Ce week-end", "Set reminder for this weekend" : "Définir un rappel pour ce week-end", "Next week" : "Semaine suivante", - "Set reminder for next week" : "Définir un rappel pour la semaine prochaine" + "Set reminder for next week" : "Définir un rappel pour la semaine prochaine", + "This files_reminder can work properly." : "Ce files_reminder peut fonctionner correctement.", + "The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "L'application files_reminder a besoin de l'application de notifications pour fonctionner correctement. Vous devez activer les notifications ou désactiver files_reminder." },"pluralForm" :"nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;" }
\ No newline at end of file diff --git a/apps/files_reminders/l10n/sc.js b/apps/files_reminders/l10n/sc.js deleted file mode 100644 index 4307fc64679..00000000000 --- a/apps/files_reminders/l10n/sc.js +++ /dev/null @@ -1,19 +0,0 @@ -OC.L10N.register( - "files_reminders", - { - "Set file reminders" : "Cunfigura apuntos de archìviu", - "Set reminder for \"{fileName}\"" : "Cunfigura un'apuntu pro \"{fileName}\"", - "Set reminder at custom date & time" : "Cunfigura un'apuntu pro una data e ora ispetzìfica", - "Reminder set for \"{fileName}\"" : "Apuntu cunfiguradu pro \"{fileName}\"", - "Failed to set reminder" : "Errore in sa cunfiguratzione de s'apuntu", - "Cancel" : "Annulla", - "Set reminder" : "Cunfigura un'apuntu", - "Set custom reminder" : "Cunfigura un'apuntu personalizadu", - "Set reminder for later today" : "Cunfigura un'apuntu pro luego", - "Tomorrow" : "Cras", - "Set reminder for tomorrow" : "Cunfigura un'apuntu pro cras", - "Set reminder for this weekend" : "Cunfigura un'apuntu pro custu fine de chida", - "Next week" : "Sa chida chi benit", - "Set reminder for next week" : "Cunfigura un'apuntu pro chida chi benit" -}, -"nplurals=2; plural=(n != 1);"); diff --git a/apps/files_reminders/l10n/sc.json b/apps/files_reminders/l10n/sc.json deleted file mode 100644 index 1d9eb562048..00000000000 --- a/apps/files_reminders/l10n/sc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ "translations": { - "Set file reminders" : "Cunfigura apuntos de archìviu", - "Set reminder for \"{fileName}\"" : "Cunfigura un'apuntu pro \"{fileName}\"", - "Set reminder at custom date & time" : "Cunfigura un'apuntu pro una data e ora ispetzìfica", - "Reminder set for \"{fileName}\"" : "Apuntu cunfiguradu pro \"{fileName}\"", - "Failed to set reminder" : "Errore in sa cunfiguratzione de s'apuntu", - "Cancel" : "Annulla", - "Set reminder" : "Cunfigura un'apuntu", - "Set custom reminder" : "Cunfigura un'apuntu personalizadu", - "Set reminder for later today" : "Cunfigura un'apuntu pro luego", - "Tomorrow" : "Cras", - "Set reminder for tomorrow" : "Cunfigura un'apuntu pro cras", - "Set reminder for this weekend" : "Cunfigura un'apuntu pro custu fine de chida", - "Next week" : "Sa chida chi benit", - "Set reminder for next week" : "Cunfigura un'apuntu pro chida chi benit" -},"pluralForm" :"nplurals=2; plural=(n != 1);" -}
\ No newline at end of file diff --git a/apps/files_reminders/l10n/tr.js b/apps/files_reminders/l10n/tr.js index 08def3387b1..fed3ae46385 100644 --- a/apps/files_reminders/l10n/tr.js +++ b/apps/files_reminders/l10n/tr.js @@ -7,7 +7,7 @@ OC.L10N.register( "View folder" : "Klasörü görüntüle", "Files reminder" : "Dosyalar anımsatıcısı", "The \"files_reminders\" app can work properly." : "\"files_reminders\" uygulaması düzgün çalışabilir.", - "The \"files_reminders\" app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "\"files_reminders\" uygulamasının düzgün çalışması için bildirim uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın.", + "The \"files_reminders\" app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "\"files_reminders\" uygulamasının düzgün çalışması için Bildirimler uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın.", "Set file reminders" : "Dosya anımsatıcıları ayarla", "**📣 File reminders**\n\nSet file reminders.\n\nNote: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly." : "**📣 Dosya anımsatıcıları**\n\nDosya anımsatıcıları ayarlayın.\n\nNot: `Dosya anımsatıcıları` uygulamasını kullanmak için `Bildirimler` uygulamasının kurulmuş ve etkinleştirilmiş olduğundan emin olun. `Bildirimler` uygulaması `Dosya anımsatıcıları` uygulamasının doğru çalışması için gerekli API uygulamalarını sağlar.", "Set reminder for \"{fileName}\"" : "\"{fileName}\" için anımsatıcı ayarla", @@ -32,6 +32,6 @@ OC.L10N.register( "Next week" : "Sonraki hafta", "Set reminder for next week" : "Gelecek hafta için anımsatıcı ayarla", "This files_reminder can work properly." : "Bu files_reminder düzgün çalışabilir.", - "The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "files_reminders uygulamasının düzgün çalışması için bildirim uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın." + "The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "files_reminders uygulamasının düzgün çalışması için Bildirimler uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın." }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/files_reminders/l10n/tr.json b/apps/files_reminders/l10n/tr.json index c80e7afa9ab..3a8f47edce7 100644 --- a/apps/files_reminders/l10n/tr.json +++ b/apps/files_reminders/l10n/tr.json @@ -5,7 +5,7 @@ "View folder" : "Klasörü görüntüle", "Files reminder" : "Dosyalar anımsatıcısı", "The \"files_reminders\" app can work properly." : "\"files_reminders\" uygulaması düzgün çalışabilir.", - "The \"files_reminders\" app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "\"files_reminders\" uygulamasının düzgün çalışması için bildirim uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın.", + "The \"files_reminders\" app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "\"files_reminders\" uygulamasının düzgün çalışması için Bildirimler uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın.", "Set file reminders" : "Dosya anımsatıcıları ayarla", "**📣 File reminders**\n\nSet file reminders.\n\nNote: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly." : "**📣 Dosya anımsatıcıları**\n\nDosya anımsatıcıları ayarlayın.\n\nNot: `Dosya anımsatıcıları` uygulamasını kullanmak için `Bildirimler` uygulamasının kurulmuş ve etkinleştirilmiş olduğundan emin olun. `Bildirimler` uygulaması `Dosya anımsatıcıları` uygulamasının doğru çalışması için gerekli API uygulamalarını sağlar.", "Set reminder for \"{fileName}\"" : "\"{fileName}\" için anımsatıcı ayarla", @@ -30,6 +30,6 @@ "Next week" : "Sonraki hafta", "Set reminder for next week" : "Gelecek hafta için anımsatıcı ayarla", "This files_reminder can work properly." : "Bu files_reminder düzgün çalışabilir.", - "The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "files_reminders uygulamasının düzgün çalışması için bildirim uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın." + "The files_reminder app needs the notification app to work properly. You should either enable notifications or disable files_reminder." : "files_reminders uygulamasının düzgün çalışması için Bildirimler uygulaması gereklidir. Bildirimler uygulamasını kullanıma alın ya da files_reminder uygulamasını kullanımdan kaldırın." },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php b/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php index d8467d1740c..ab8c762d674 100644 --- a/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php +++ b/apps/files_reminders/lib/BackgroundJob/ScheduledNotifications.php @@ -13,10 +13,10 @@ use OCA\FilesReminders\Db\ReminderMapper; use OCA\FilesReminders\Service\ReminderService; use OCP\AppFramework\Db\DoesNotExistException; use OCP\AppFramework\Utility\ITimeFactory; -use OCP\BackgroundJob\Job; +use OCP\BackgroundJob\TimedJob; use Psr\Log\LoggerInterface; -class ScheduledNotifications extends Job { +class ScheduledNotifications extends TimedJob { public function __construct( ITimeFactory $time, protected ReminderMapper $reminderMapper, @@ -24,6 +24,8 @@ class ScheduledNotifications extends Job { protected LoggerInterface $logger, ) { parent::__construct($time); + + $this->setInterval(60); } /** diff --git a/apps/files_reminders/lib/Db/ReminderMapper.php b/apps/files_reminders/lib/Db/ReminderMapper.php index 0ba5cfc3ecd..63cba437d07 100644 --- a/apps/files_reminders/lib/Db/ReminderMapper.php +++ b/apps/files_reminders/lib/Db/ReminderMapper.php @@ -137,24 +137,14 @@ class ReminderMapper extends QBMapper { * @return Reminder[] */ public function findAllInFolder(IUser $user, Folder $folder) { - $fileIds = array_values(array_filter(array_map( - function (Node $node) { - try { - return $node->getId(); - } catch (NotFoundException $e) { - return null; - } - }, - $folder->getDirectoryListing(), - ))); - $qb = $this->db->getQueryBuilder(); - $qb->select('id', 'user_id', 'file_id', 'due_date', 'updated_at', 'created_at', 'notified') - ->from($this->getTableName()) - ->where($qb->expr()->eq('user_id', $qb->createNamedParameter($user->getUID(), IQueryBuilder::PARAM_STR))) - ->andWhere($qb->expr()->in('file_id', $qb->createNamedParameter($fileIds, IQueryBuilder::PARAM_INT_ARRAY))) - ->orderBy('due_date', 'ASC'); + $qb->select('r.id', 'r.user_id', 'r.file_id', 'r.due_date', 'r.updated_at', 'r.created_at', 'r.notified') + ->from($this->getTableName(), 'r') + ->innerJoin('r', 'filecache', 'f', $qb->expr()->eq('r.file_id', 'f.fileid')) + ->where($qb->expr()->eq('r.user_id', $qb->createNamedParameter($user->getUID(), IQueryBuilder::PARAM_STR))) + ->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($folder->getId(), IQueryBuilder::PARAM_INT))) + ->orderBy('r.due_date', 'ASC'); return $this->findEntities($qb); } |