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

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cdujeu committed Apr 7, 2015
1 parent 2cc9024 commit 46bfe38
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/i18n/de.php
Expand Up @@ -83,8 +83,8 @@
"78"=> "Achtung, Sie sollten nur standard-alphanumerische Zeichen für Benutzernamen verwenden. Die Bezeichnung '%CURRENT%' wird durch '%NEW%' ersetzt.",
"79"=> "Benachrichtigung",
"80"=> "Sende den Link per Email an die selektierten Nutzer oder Adressen",
"81"=> "beobachtet",
"82"=> "unbeobachtet",
"81"=> "unbeobachten",
"82"=> "beobachten",
"83"=> "Beobachtungsstatus ändern um eine/keine Benachrichtigung bei einen Download zu erhalten",
"84"=> "Passwort",
"85"=> "Dieser Link ist durch ein Passwort geschützt",
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/i18n/es.php
Expand Up @@ -84,8 +84,8 @@
"78"=> "Warning, you should only use standard alphanumerical characters for user names. The identifier '%CURRENT%' will be replaced by '%NEW%'",
"79"=> "invite",
"80"=> "Send link by email to a selection of users or addresses",
"81"=> "watched",
"82"=> "not watched",
"81"=> "stop watching",
"82"=> "watch",
"83"=> "Toggle watch status to receive or not notifications when file is downloaded",
"84"=> "password",
"85"=> "A protection password is set on this link",
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/i18n/fr.php
Expand Up @@ -86,8 +86,8 @@
"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%'",
"79"=> "inviter",
"80"=> "Envoyer une invitation à des utilisateurs ou des adresses courriel externes.",
"81"=> "non surveillé",
"82"=> "surveillé",
"81"=> "ne pas surveiller",
"82"=> "surveiller",
"83"=> "Choisir de recevoir ou non des alertes lorsque le fichier est téléchargé",
"84"=> "mot de passe",
"85"=> "Une protection par mot de passe est présente sur ce lien",
Expand Down
4 changes: 2 additions & 2 deletions core/src/plugins/action.share/res/i18n/pt.php
Expand Up @@ -84,8 +84,8 @@
"78"=> "ATENÇÃO: Só deve utilizar caracteres alfa-numéricos padrão para nomes de utilizador. O Identificador '%CURRENT%' será substituído por '%NEW%'",
"79"=> "invite",
"80"=> "Send link by email to a selection of users or addresses",
"81"=> "watched",
"82"=> "not watched",
"81"=> "stop watching",
"82"=> "watch",
"83"=> "Toggle watch status to receive or not notifications when file is downloaded",
"84"=> "password",
"85"=> "A protection password is set on this link",
Expand Down
Expand Up @@ -75,12 +75,19 @@ protected function parseSpecificContributions(&$contribNode)
public function persistNotificationToAlerts(AJXP_Notification &$notification)
{
if ($this->eventStore) {
$this->eventStore->persistAlert($notification);
AJXP_Controller::applyHook("msg.instant",array(
"<reload_user_feed/>",
$notification->getNode()->getRepositoryId(),
$notification->getTarget()
));
$this->eventStore->persistAlert($notification);
if($notification->getNode()->getRepository() != null && $notification->getNode()->getRepository()->hasParent()){
AJXP_Controller::applyHook("msg.instant",array(
"<reload_user_feed/>",
$notification->getNode()->getRepository()->getParentId(),
$notification->getTarget()
));
}
}
}

Expand Down Expand Up @@ -315,7 +322,7 @@ public function loadUserAlerts($actionName, $httpVars, $fileVars)
$contentFilter = $nodeRepo->getContentFilter();
if(isSet($contentFilter)){
$nodePath = $contentFilter->filterExternalPath($node->getPath());
if($nodePath == "/"){
if(empty($nodePath) || $nodePath == "/"){
$k = array_keys($contentFilter->filters);
$nodePath = $k[0];
}
Expand Down
4 changes: 4 additions & 0 deletions core/src/plugins/feed.sql/class.AJXP_SqlFeedStore.php
Expand Up @@ -224,6 +224,10 @@ public function dismissAlertById($alertId, $occurrences = 1)
}
$startEventNotif = new AJXP_Notification();
$startEventNotif = unserialize($startEventRow->content);
if(empty($startEventNotif)) {
// Ignore, empty notif;
return;
}
$url = $startEventNotif->getNode()->getUrl();
$date = $startEventRow->edate;
$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);
Expand Down

0 comments on commit 46bfe38

Please sign in to comment.