Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 46bfe38

Browse files
committed
Feedstore: forward <reload_user_feed> to parent repository if any.
Fix i18n issues for "watch/stop watching" button Ignore notif to delete if already deleted.
1 parent 2cc9024 commit 46bfe38

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed

core/src/plugins/action.share/res/i18n/de.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
"78"=> "Achtung, Sie sollten nur standard-alphanumerische Zeichen für Benutzernamen verwenden. Die Bezeichnung '%CURRENT%' wird durch '%NEW%' ersetzt.",
8484
"79"=> "Benachrichtigung",
8585
"80"=> "Sende den Link per Email an die selektierten Nutzer oder Adressen",
86-
"81"=> "beobachtet",
87-
"82"=> "unbeobachtet",
86+
"81"=> "unbeobachten",
87+
"82"=> "beobachten",
8888
"83"=> "Beobachtungsstatus ändern um eine/keine Benachrichtigung bei einen Download zu erhalten",
8989
"84"=> "Passwort",
9090
"85"=> "Dieser Link ist durch ein Passwort geschützt",

core/src/plugins/action.share/res/i18n/es.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
"78"=> "Warning, you should only use standard alphanumerical characters for user names. The identifier '%CURRENT%' will be replaced by '%NEW%'",
8585
"79"=> "invite",
8686
"80"=> "Send link by email to a selection of users or addresses",
87-
"81"=> "watched",
88-
"82"=> "not watched",
87+
"81"=> "stop watching",
88+
"82"=> "watch",
8989
"83"=> "Toggle watch status to receive or not notifications when file is downloaded",
9090
"84"=> "password",
9191
"85"=> "A protection password is set on this link",

core/src/plugins/action.share/res/i18n/fr.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
"78"=> "Attention, vous ne devez utiliser que des caractères alphanumériques standards pour les noms d'utilisateur. L'identifiant '%CURRENT%' sera remplacé par '%NEW%'",
8787
"79"=> "inviter",
8888
"80"=> "Envoyer une invitation à des utilisateurs ou des adresses courriel externes.",
89-
"81"=> "non surveillé",
90-
"82"=> "surveillé",
89+
"81"=> "ne pas surveiller",
90+
"82"=> "surveiller",
9191
"83"=> "Choisir de recevoir ou non des alertes lorsque le fichier est téléchargé",
9292
"84"=> "mot de passe",
9393
"85"=> "Une protection par mot de passe est présente sur ce lien",

core/src/plugins/action.share/res/i18n/pt.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
"78"=> "ATENÇÃO: Só deve utilizar caracteres alfa-numéricos padrão para nomes de utilizador. O Identificador '%CURRENT%' será substituído por '%NEW%'",
8585
"79"=> "invite",
8686
"80"=> "Send link by email to a selection of users or addresses",
87-
"81"=> "watched",
88-
"82"=> "not watched",
87+
"81"=> "stop watching",
88+
"82"=> "watch",
8989
"83"=> "Toggle watch status to receive or not notifications when file is downloaded",
9090
"84"=> "password",
9191
"85"=> "A protection password is set on this link",

core/src/plugins/core.notifications/class.AJXP_NotificationCenter.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,19 @@ protected function parseSpecificContributions(&$contribNode)
7575
public function persistNotificationToAlerts(AJXP_Notification &$notification)
7676
{
7777
if ($this->eventStore) {
78+
$this->eventStore->persistAlert($notification);
7879
AJXP_Controller::applyHook("msg.instant",array(
7980
"<reload_user_feed/>",
8081
$notification->getNode()->getRepositoryId(),
8182
$notification->getTarget()
8283
));
83-
$this->eventStore->persistAlert($notification);
84+
if($notification->getNode()->getRepository() != null && $notification->getNode()->getRepository()->hasParent()){
85+
AJXP_Controller::applyHook("msg.instant",array(
86+
"<reload_user_feed/>",
87+
$notification->getNode()->getRepository()->getParentId(),
88+
$notification->getTarget()
89+
));
90+
}
8491
}
8592
}
8693

@@ -315,7 +322,7 @@ public function loadUserAlerts($actionName, $httpVars, $fileVars)
315322
$contentFilter = $nodeRepo->getContentFilter();
316323
if(isSet($contentFilter)){
317324
$nodePath = $contentFilter->filterExternalPath($node->getPath());
318-
if($nodePath == "/"){
325+
if(empty($nodePath) || $nodePath == "/"){
319326
$k = array_keys($contentFilter->filters);
320327
$nodePath = $k[0];
321328
}

core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ public function dismissAlertById($alertId, $occurrences = 1)
224224
}
225225
$startEventNotif = new AJXP_Notification();
226226
$startEventNotif = unserialize($startEventRow->content);
227+
if(empty($startEventNotif)) {
228+
// Ignore, empty notif;
229+
return;
230+
}
227231
$url = $startEventNotif->getNode()->getUrl();
228232
$date = $startEventRow->edate;
229233
$newRes = dibi::query("SELECT [id] FROM [ajxp_feed] WHERE [etype] = %s AND [user_id] = %s AND [edate] <= %s AND [index_path] = %s ORDER BY [edate] DESC %lmt", "alert", $userId, $date, $url, $occurrences);

0 commit comments

Comments
 (0)