From 92e0c502f76f5a3acc0498f45a0fe836973c554c Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 7 Nov 2017 19:34:00 -0800 Subject: make most recent cloud_tiles setting for local channels persistent across logins --- Zotlabs/Module/Cloud_tiles.php | 4 ++++ include/security.php | 1 + 2 files changed, 5 insertions(+) diff --git a/Zotlabs/Module/Cloud_tiles.php b/Zotlabs/Module/Cloud_tiles.php index 45124cdfa..da551904f 100644 --- a/Zotlabs/Module/Cloud_tiles.php +++ b/Zotlabs/Module/Cloud_tiles.php @@ -11,6 +11,10 @@ class Cloud_tiles extends \Zotlabs\Web\Controller { else $_SESSION['cloud_tiles'] = 1; + if(local_channel()) { + set_pconfig(local_channel(),'system','cloud_tiles',$_SESSION['cloud_tiles']); + } + goaway(z_root() . '/' . hex2bin(argv(1))); } diff --git a/include/security.php b/include/security.php index 450cc4f69..8b7e7d076 100644 --- a/include/security.php +++ b/include/security.php @@ -264,6 +264,7 @@ function change_channel($change_channel) { App::set_channel($r[0]); $_SESSION['theme'] = $r[0]['channel_theme']; $_SESSION['mobile_theme'] = get_pconfig(local_channel(),'system', 'mobile_theme'); + $_SESSION['cloud_tiles'] = get_pconfig(local_channel(),'system', 'cloud_tiles'); date_default_timezone_set($r[0]['channel_timezone']); $ret = $r[0]; } -- cgit v1.2.3 From 7dad842f35184b3865714bf209c79ad1ef995733 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 8 Nov 2017 19:21:36 -0800 Subject: use logger --- include/zot.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/zot.php b/include/zot.php index 0aa50ab92..40e303bf1 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2010,8 +2010,7 @@ function update_imported_item($sender, $item, $orig, $uid, $tag_delivery) { // may have a different owner than the one being transmitted. if(($sender['hash'] != $orig['owner_xchan'] && $sender['hash'] != $orig['author_xchan']) && (! $tag_delivery)) { - /// @fixme shouldn't this be logger? - notice('sender is not owner or author'); + logger('sender is not owner or author'); return; } -- cgit v1.2.3 From 40c625158f879c51bac8c1e2271eb0505dff991d Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 8 Nov 2017 21:19:03 -0800 Subject: unable to change permissions on wiki with space in name --- Zotlabs/Module/Wiki.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php index d6a01af11..2d2d8e2b7 100644 --- a/Zotlabs/Module/Wiki.php +++ b/Zotlabs/Module/Wiki.php @@ -494,7 +494,7 @@ class Wiki extends \Zotlabs\Web\Controller { return; //not reached } - $wiki = Zlib\NativeWiki::exists_by_name($owner['channel_id'], $arr['urlName']); + $wiki = Zlib\NativeWiki::exists_by_name($owner['channel_id'], urldecode($arr['urlName'])); if($wiki['resource_id']) { -- cgit v1.2.3 From fc96cd371042a92ed180635b91924413392d3972 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 9 Nov 2017 11:34:41 +0100 Subject: load notifications links to /display via ajax if we are already in /display --- Zotlabs/Lib/Enotify.php | 1 + Zotlabs/Widget/Notifications.php | 1 + view/js/main.js | 6 +++--- view/theme/redbasic/js/redbasic.js | 4 +++- view/tpl/notifications_widget.tpl | 27 ++++++++++++++++++++++++++- 5 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index d5798e671..fffe4ffe7 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -803,6 +803,7 @@ class Enotify { 'photo' => $item['author']['xchan_photo_s'], 'when' => relative_date($item['created']), 'class' => (intval($item['item_unseen']) ? 'notify-unseen' : 'notify-seen'), + 'b64mid' => 'b64.' . base64url_encode($item['mid']), 'message' => strip_tags(bbcode($itemem_text)) ); diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index a857f1ad9..191f2afb6 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -139,6 +139,7 @@ class Notifications { } $o = replace_macros(get_markup_template('notifications_widget.tpl'), array( + '$module' => \App::$module, '$notifications' => $notifications, '$loading' => t('Loading...') )); diff --git a/view/js/main.js b/view/js/main.js index c3873d823..4cc10bb49 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -750,6 +750,7 @@ function collapseHeight() { } function liveUpdate() { + if(typeof profile_uid === 'undefined') profile_uid = false; /* Should probably be unified with channelId defined in head.tpl */ if((src === null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; } if(($('.comment-edit-text.expanded').length) || (in_progress)) { @@ -791,7 +792,6 @@ function liveUpdate() { var orgHeight = $("#region_2").height(); } - var dstart = new Date(); console.log('LOADING data...'); $.get(update_url, function(data) { @@ -959,9 +959,9 @@ function notify_popup_loader(notifyType) { $("." + notifyType + "-update").html(data.notify.length); $(data.notify).each(function() { - html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); + html = navbar_notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,notifyType == 'pubs' ? 'undefined' : this.b64mid); $("#navbar-" + notifyType + "-menu").append(html); - html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass); + html = notifications_tpl.format(this.notify_link,this.photo,this.name,this.message,this.when,this.hclass,notifyType == 'pubs' ? 'undefined' : this.b64mid); $("#nav-" + notifyType + "-menu").append(html); }); diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 04199ea95..3fee0f282 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -1,6 +1,8 @@ /** * redbasic theme specific JavaScript */ + +var notifications_parent; $(document).ready(function() { // CSS3 calc() fallback (for unsupported browsers) @@ -82,7 +84,7 @@ $(document).ready(function() { } }); - var notifications_parent = $('#notifications_wrapper')[0].parentElement.id; + notifications_parent = $('#notifications_wrapper')[0].parentElement.id; $('#notifications-btn').click(function() { if($('#notifications_wrapper').hasClass('fs')) $('#notifications_wrapper').prependTo('#' + notifications_parent); diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 6865879ad..dd4cc6377 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -26,11 +26,36 @@ } +{{if $module == 'display'}} + +{{/if}} + {{if $notifications}}