diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Connections.php | 8 | ||||
-rw-r--r-- | Zotlabs/Module/Viewconnections.php | 10 | ||||
-rw-r--r-- | Zotlabs/Update/_1204.php | 6 | ||||
-rw-r--r-- | Zotlabs/Update/_1205.php | 27 | ||||
-rw-r--r-- | Zotlabs/Widget/Notifications.php | 9 |
5 files changed, 51 insertions, 9 deletions
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..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 "; } @@ -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 ); } } 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); } 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 @@ +<?php + +namespace Zotlabs\Update; + +class _1205 { + + function run() { + + if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { + $r = q("ALTER TABLE item + DROP INDEX item_private, + ADD INDEX uid_item_private (uid, item_private), + ADD INDEX item_wall (item_wall), + ADD INDEX item_pending_remove_changed (item_pending_remove, changed) + "); + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + } + else { + return UPDATE_SUCCESS; + } + + } + +} 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') ] ]; } |