Skip to content
Snippets Groups Projects
Commit f5a8d396 authored by uhensler's avatar uhensler
Browse files

Merge branch 'OpenOLAT_12.5' of...

Merge branch 'OpenOLAT_12.5' of ssh://uhensler@office.frentix.com/home/uhensler/repositories/OpenOLAT.git
parents 1aa4581e 6834a42a
No related branches found
No related tags found
No related merge requests found
...@@ -98,15 +98,10 @@ public class FeedNotifications { ...@@ -98,15 +98,10 @@ public class FeedNotifications {
private void createSubscriptionItem(Item item, Publisher p){ private void createSubscriptionItem(Item item, Publisher p){
Date modDate = item.getPublishDate(); Date modDate = item.getPublishDate();
if (compareDate.before(modDate)) { if (item.isPublished() && compareDate.before(modDate)) {
String title = item.getTitle(); String title = item.getTitle();
String author = item.getAuthor(); String author = item.getAuthor();
String desc; String desc = translator.translate("notifications.entry", new String[] { title, author });
if (item.isDraft()) {
return;
} else {
desc = translator.translate("notifications.entry", new String[] { title, author });
}
String businessPath = p.getBusinessPath(); String businessPath = p.getBusinessPath();
String urlToSend = BusinessControlFactory.getInstance() String urlToSend = BusinessControlFactory.getInstance()
.getURLFromBusinessPathString(businessPath); .getURLFromBusinessPathString(businessPath);
......
...@@ -137,7 +137,7 @@ public abstract class FeedNotificationsHandler implements NotificationsHandler { ...@@ -137,7 +137,7 @@ public abstract class FeedNotificationsHandler implements NotificationsHandler {
.getURLFromBusinessPathString(businessPath); .getURLFromBusinessPathString(businessPath);
String iconCssClass = item.extraCSSClass(); String iconCssClass = item.extraCSSClass();
Date publishDate = item.getPublishDate(); Date publishDate = item.getPublishDate();
if(publishDate != null) { if(item.isPublished()) {
if(compareDate.before(publishDate)) { if(compareDate.before(publishDate)) {
String desc = translator.translate("notifications.entry.published", new String[] { title, author }); String desc = translator.translate("notifications.entry.published", new String[] { title, author });
items.add(new SubscriptionListItem(desc, urlToSend, businessPath, publishDate, iconCssClass)); items.add(new SubscriptionListItem(desc, urlToSend, businessPath, publishDate, iconCssClass));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment