From 1c750dac4187c3872e29c79f0c0856ec8a29331e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 23 Feb 2018 12:58:03 +0100 Subject: fix issues with DB update 1204 --- Zotlabs/Update/_1204.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Update/_1204.php b/Zotlabs/Update/_1204.php index f55526415..93c2e4e3f 100644 --- a/Zotlabs/Update/_1204.php +++ b/Zotlabs/Update/_1204.php @@ -7,7 +7,7 @@ class _1204 { function run() { if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { - $r1 = q("ALTER TABLE poll ADD pull_guid text NOT NULL"); + $r1 = q("ALTER TABLE poll ADD poll_guid text NOT NULL"); $r2 = q("create index \"poll_guid_idx\" on poll \"poll_guid\""); $r3 = q("ALTER TABLE poll_elm ADD pelm_guid text NOT NULL"); $r4 = q("create index \"pelm_guid_idx\" on poll_elm \"pelm_guid\""); @@ -17,9 +17,9 @@ class _1204 { $r = ($r1 && $r2 && $r3 && $r4 && $r5 && $r6); } else { - $r1 = q("ALTER TABLE `poll` ADD `pull_guid` VARCHAR(191) NOT NULL, ADD INDEX `poll_guid` (`pull_guid`) "); + $r1 = q("ALTER TABLE `poll` ADD `poll_guid` VARCHAR(191) NOT NULL, ADD INDEX `poll_guid` (`poll_guid`) "); $r2 = q("ALTER TABLE `poll_elm` ADD `pelm_guid` VARCHAR(191) NOT NULL, ADD INDEX `pelm_guid` (`pelm_guid`) "); - $r1 = q("ALTER TABLE `vote` ADD `vote_guid` VARCHAR(191) NOT NULL, ADD INDEX `vote_guid` (`vote_guid`) "); + $r3 = q("ALTER TABLE `vote` ADD `vote_guid` VARCHAR(191) NOT NULL, ADD INDEX `vote_guid` (`vote_guid`) "); $r = ($r1 && $r2 && $r3); } -- cgit v1.2.3 From c618bfc607498998916f01fd9c6985c2ecd47356 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sat, 24 Feb 2018 19:42:39 +0100 Subject: mark connections where we do not have post_comments permissions with an no entry sign. --- Zotlabs/Module/Connections.php | 8 +++++++- Zotlabs/Module/Viewconnections.php | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index 255731c9c..55e716ace 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -245,6 +245,11 @@ class Connections extends \Zotlabs\Web\Controller { ((intval($rr['abook_blocked'])) ? t('Blocked') : ''), ((intval($rr['abook_not_here'])) ? t('Not connected at this location') : '') ); + + $oneway = false; + if(! intval(get_abconfig(local_channel(),$rr['xchan_hash'],'their_perms','post_comments'))) { + $oneway = true; + } foreach($status as $str) { if(!$str) @@ -283,7 +288,8 @@ class Connections extends \Zotlabs\Web\Controller { 'ignore_hover' => t('Ignore connection'), 'ignore' => ((! $rr['abook_ignored']) ? t('Ignore') : false), 'recent_label' => t('Recent activity'), - 'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']) + 'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id']), + 'oneway' => $oneway ); } } diff --git a/Zotlabs/Module/Viewconnections.php b/Zotlabs/Module/Viewconnections.php index 1f9c03751..e024f1c5a 100644 --- a/Zotlabs/Module/Viewconnections.php +++ b/Zotlabs/Module/Viewconnections.php @@ -69,8 +69,13 @@ class Viewconnections extends \Zotlabs\Web\Controller { $contacts = array(); foreach($r as $rr) { + + $oneway = false; + if(! intval(get_abconfig(\App::$profile['uid'],$rr['xchan_hash'],'their_perms','post_comments'))) { + $oneway = true; + } - $url = chanlink_hash($rr['xchan_hash']); + $url = chanlink_hash($rr['xchan_hash']); if($url) { $contacts[] = array( 'id' => $rr['abook_id'], @@ -83,6 +88,7 @@ class Viewconnections extends \Zotlabs\Web\Controller { 'sparkle' => '', 'itemurl' => $rr['url'], 'network' => '', + 'oneway' => $oneway ); } } -- cgit v1.2.3 From fed61c082c8f9d6a7673125bd365d44d4b409fa4 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 25 Feb 2018 13:00:43 +0100 Subject: do not overwrite abook flags if we are not owner --- Zotlabs/Module/Viewconnections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Module/Viewconnections.php b/Zotlabs/Module/Viewconnections.php index e024f1c5a..8366e1325 100644 --- a/Zotlabs/Module/Viewconnections.php +++ b/Zotlabs/Module/Viewconnections.php @@ -44,7 +44,7 @@ class Viewconnections extends \Zotlabs\Web\Controller { $sql_extra = ''; if(! $is_owner) { - $abook_flags = " and abook_hidden = 0 "; + $abook_flags .= " and abook_hidden = 0 "; $sql_extra = " and xchan_hidden = 0 "; } -- cgit v1.2.3 From 51c0e5a988ce3bae025040ab7fa77852eaa3e70d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 26 Feb 2018 09:58:42 +0100 Subject: another DB upgrade to address some long running maintenance queries --- Zotlabs/Update/_1205.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Zotlabs/Update/_1205.php (limited to 'Zotlabs') diff --git a/Zotlabs/Update/_1205.php b/Zotlabs/Update/_1205.php new file mode 100644 index 000000000..5384f183e --- /dev/null +++ b/Zotlabs/Update/_1205.php @@ -0,0 +1,27 @@ + Date: Mon, 26 Feb 2018 20:17:53 +0100 Subject: fix icon position and make string translatable --- Zotlabs/Widget/Notifications.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Widget/Notifications.php b/Zotlabs/Widget/Notifications.php index d51cb0113..f2619c5cf 100644 --- a/Zotlabs/Widget/Notifications.php +++ b/Zotlabs/Widget/Notifications.php @@ -23,7 +23,8 @@ class Notifications { 'label' => t('Mark all notifications read') ], 'filter' => [ - 'label' => t('Show new posts only') + 'posts_label' => t('Show new posts only'), + 'name_label' => t('Filter by name') ] ]; @@ -41,7 +42,8 @@ class Notifications { 'label' => t('Mark all notifications seen') ], 'filter' => [ - 'label' => t('Show new posts only') + 'posts_label' => t('Show new posts only'), + 'name_label' => t('Filter by name') ] ]; @@ -136,7 +138,8 @@ class Notifications { 'label' => t('Mark all notifications seen') ], 'filter' => [ - 'label' => t('Show new posts only') + 'posts_label' => t('Show new posts only'), + 'name_label' => t('Filter by name') ] ]; } -- cgit v1.2.3