From 892ef4547459ba89a83155a5324159e9465dc255 Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 13:13:38 +0200 Subject: [PATCH 1/9] Warning, that profile published in local directory may be visible in public --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/settings.php b/mod/settings.php index 5c9c439e0a..3c7e59ac6c 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1174,7 +1174,7 @@ function settings_content(App $a) { if (strlen(get_config('system','directory'))) { $profile_in_net_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', array(t('No'),t('Yes'))), + '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile_in_dire ctory,t("Depending on the server settings your profile may be visible in public."), $profile['net-publish'], '', array(t('No'),t('Yes'))), )); } else { $profile_in_net_dir = ''; From 4c9c83e8e8b41e285fc23a13c74e615c289b8413 Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 13:21:35 +0200 Subject: [PATCH 2/9] Warning, that profile published in local directory may be visible in public --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/settings.php b/mod/settings.php index 3c7e59ac6c..367d3c2100 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1174,7 +1174,7 @@ function settings_content(App $a) { if (strlen(get_config('system','directory'))) { $profile_in_net_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile_in_dire ctory,t("Depending on the server settings your profile may be visible in public."), $profile['net-publish'], '', array(t('No'),t('Yes'))), + '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile_in_directory,t("Depending on the server settings your profile may be visible in public."), $profile['net-publish'], '', array(t('No'),t('Yes'))), )); } else { $profile_in_net_dir = ''; From bcfbfeeba442ad025d83c4781cbd145a6ac343f4 Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 13:52:37 +0200 Subject: [PATCH 3/9] adding space for readability --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/settings.php b/mod/settings.php index 367d3c2100..d6eacbd4e3 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1174,7 +1174,7 @@ function settings_content(App $a) { if (strlen(get_config('system','directory'))) { $profile_in_net_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile_in_directory,t("Depending on the server settings your profile may be visible in public."), $profile['net-publish'], '', array(t('No'),t('Yes'))), + '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile_in_directory, t("Depending on the server settings your profile may be visible in public."), $profile['net-publish'], '', array(t('No'),t('Yes'))), )); } else { $profile_in_net_dir = ''; From 318166a381dd64fbf37d230000dae2c12e23d0bc Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 8 Apr 2017 08:59:41 -0400 Subject: [PATCH 4/9] Fix path to default Text_Highlighter CSS --- view/templates/head.tpl | 2 +- view/theme/frio/templates/head.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view/templates/head.tpl b/view/templates/head.tpl index 0772af0bc1..bfc5728ed2 100644 --- a/view/templates/head.tpl +++ b/view/templates/head.tpl @@ -7,7 +7,7 @@ - + diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl index 7652bd0fe6..32005417c8 100644 --- a/view/theme/frio/templates/head.tpl +++ b/view/theme/frio/templates/head.tpl @@ -12,7 +12,7 @@ - + From 895a6254a0065acd93fb49ad4220886342a9dd22 Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 15:48:15 +0200 Subject: [PATCH 5/9] Correction of 1177 and added modification to 1171 --- mod/settings.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index d6eacbd4e3..6dae149b8b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1168,14 +1168,13 @@ function settings_content(App $a) { $profile_in_dir = ''; } else { $profile_in_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], '', array(t('No'),t('Yes'))), + '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Depending on the server settings your profile may be visible in public."), array(t('No'),t('Yes'))), )); } if (strlen(get_config('system','directory'))) { $profile_in_net_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile_in_directory, t("Depending on the server settings your profile may be visible in public."), $profile['net-publish'], '', array(t('No'),t('Yes'))), - )); + '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', array(t('No'),t('Yes'))),)); } else { $profile_in_net_dir = ''; } From 7320327fa199901b25b98a3c6c52ca46a008847c Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 16:37:18 +0200 Subject: [PATCH 6/9] Deleted the lone comma between paratheses --- mod/settings.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index 6dae149b8b..58b64e77e3 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1168,8 +1168,7 @@ function settings_content(App $a) { $profile_in_dir = ''; } else { $profile_in_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Depending on the server settings your profile may be visible in public."), array(t('No'),t('Yes'))), - )); + '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Depending on the server settings your profile may be visible in public."), array(t('No'),t('Yes'))))); } if (strlen(get_config('system','directory'))) { From d8a8fa9baae53b3d8e9bdb39d3f692f9a9d5b019 Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 16:48:11 +0200 Subject: [PATCH 7/9] Modified the warning message --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/settings.php b/mod/settings.php index 58b64e77e3..e40cd8d138 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1168,7 +1168,7 @@ function settings_content(App $a) { $profile_in_dir = ''; } else { $profile_in_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Depending on the server settings your profile may be visible in public."), array(t('No'),t('Yes'))))); + '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Your profile may be visible in public."), array(t('No'),t('Yes'))))); } if (strlen(get_config('system','directory'))) { From 050675a6295767becb247b2f7b65ce932a8e2514 Mon Sep 17 00:00:00 2001 From: rebeka-catalina Date: Sat, 8 Apr 2017 18:07:30 +0200 Subject: [PATCH 8/9] The other lone comma in 1177 --- mod/settings.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index e40cd8d138..67aa40de5b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1168,12 +1168,14 @@ function settings_content(App $a) { $profile_in_dir = ''; } else { $profile_in_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Your profile may be visible in public."), array(t('No'),t('Yes'))))); + '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], t("Your profile may be visible in public."), array(t('No'),t('Yes'))) + )); } if (strlen(get_config('system','directory'))) { $profile_in_net_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', array(t('No'),t('Yes'))),)); + '$field' => array('profile_in_netdirectory', t('Publish your default profile in the global social directory?'), $profile['net-publish'], '', array(t('No'),t('Yes'))) + )); } else { $profile_in_net_dir = ''; } From 8bd41592efd737812404b0cc2cc690cd4f7ee852 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Sat, 8 Apr 2017 20:25:10 +0200 Subject: [PATCH 9/9] Desktop-Notifs: include the user id into the storage key for local browser storage --- js/main.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/js/main.js b/js/main.js index aaeef00cf7..f6e1cc1150 100644 --- a/js/main.js +++ b/js/main.js @@ -223,8 +223,11 @@ var nnm = $("#nav-notifications-menu"); nnm.html(notifications_all + notifications_mark); - var notification_lastitem = parseInt(localStorage.getItem("notification-lastitem")); + var lastItemStorageKey = "notification-lastitem:" + localUser; + var notification_lastitem = parseInt(localStorage.getItem(lastItemStorageKey)); var notification_id = 0; + + // Insert notifs into the notifications-menu $(data.notifications).each(function(key, notif){ var text = notif.message.format('' + notif.name + ''); var contact = ('' + notif.name + ''); @@ -232,19 +235,21 @@ var html = notifications_tpl.format( notif.href, // {0} // link to the source notif.photo, // {1} // photo of the contact - text, // {2} // preformatted text (autor + text) + text, // {2} // preformatted text (autor + text) notif.date, // {3} // date of notification (time ago) - seenclass, // {4} // visited status of the notification + seenclass, // {4} // visited status of the notification new Date(notif.timestamp*1000), // {5} // date of notification notif.url, // {6} // profile url of the contact notif.message.format(contact), // {7} // preformatted html (text including author profile url) - '' // {8} // Deprecated + '' // {8} // Deprecated ); nnm.append(html); }); + + // Desktop Notifications $(data.notifications.reverse()).each(function(key, e){ notification_id = parseInt(e.timestamp); - if (notification_lastitem !== null && notification_id > notification_lastitem) { + if (notification_lastitem !== null && notification_id > notification_lastitem && !e.seen) { if (getNotificationPermission() === "granted") { var notification = new Notification(document.title, { body: decodeHtml(e.message.replace('→ ', '').format(e.name)), @@ -259,7 +264,7 @@ }); notification_lastitem = notification_id; - localStorage.setItem("notification-lastitem", notification_lastitem) + localStorage.setItem(lastItemStorageKey, notification_lastitem) $("img[data-src]", nnm).each(function(i, el){ // Add src attribute for images with a data-src attribute @@ -285,7 +290,7 @@ $.jGrowl(message, {sticky: false, theme: 'info', life: 5000}); }); - /* update the js scrollbars */ + // Update the js scrollbars $('#nav-notifications-menu').perfectScrollbar('update'); });