aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2018-02-25 08:36:52 -0500
committerAndrew Manning <tamanning@zoho.com>2018-02-25 08:36:52 -0500
commite3095ce6b2c76f13a852f0ec5f782d71101a7c6a (patch)
treebeab28cbc399ea17e0c2fd6c38724387bafa7c5c /Zotlabs/Module
parent70b8f3240f9bc38a41e314f613f6c1bd69f5b430 (diff)
parent673cf8d35e224fcbbc0caef5e638c08bc3914feb (diff)
downloadvolse-hubzilla-e3095ce6b2c76f13a852f0ec5f782d71101a7c6a.tar.gz
volse-hubzilla-e3095ce6b2c76f13a852f0ec5f782d71101a7c6a.tar.bz2
volse-hubzilla-e3095ce6b2c76f13a852f0ec5f782d71101a7c6a.zip
Merge branch 'dev' into oauth2
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Connections.php8
-rw-r--r--Zotlabs/Module/Profile_photo.php19
-rw-r--r--Zotlabs/Module/Viewconnections.php10
3 files changed, 31 insertions, 6 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/Profile_photo.php b/Zotlabs/Module/Profile_photo.php
index c772f0ed3..44b7c18c6 100644
--- a/Zotlabs/Module/Profile_photo.php
+++ b/Zotlabs/Module/Profile_photo.php
@@ -304,7 +304,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
}
$channel = \App::get_channel();
-
+ $pf = 0;
$newuser = false;
if(argc() == 2 && argv(1) === 'new')
@@ -318,8 +318,8 @@ class Profile_photo extends \Zotlabs\Web\Controller {
$resource_id = argv(2);
- // When using an existing photo, we don't have a dialogue to offer a choice of profiles,
- // so it gets attached to the default
+
+ $pf = (($_REQUEST['pf']) ? intval($_REQUEST['pf']) : 0);
$c = q("select id, is_default from profile where uid = %d",
intval(local_channel())
@@ -331,6 +331,9 @@ class Profile_photo extends \Zotlabs\Web\Controller {
$_REQUEST['profile'] = $c[0]['id'];
$multi_profiles = false;
}
+ else {
+ $_REQUEST['profile'] = $pf;
+ }
$r = q("SELECT id, album, imgscale FROM photo WHERE uid = %d AND resource_id = '%s' ORDER BY imgscale ASC",
intval(local_channel()),
@@ -430,6 +433,16 @@ class Profile_photo extends \Zotlabs\Web\Controller {
intval(local_channel())
);
+ if($profiles) {
+ for($x = 0; $x < count($profiles); $x ++) {
+ $profiles[$x]['selected'] = false;
+ if($pf && $profiles[$x]['id'] == $pf)
+ $profiles[$x]['selected'] = true;
+ if((! $pf) && $profiles[$x]['is_default'])
+ $profiles[$x]['selected'] = true;
+ }
+ }
+
$importing = ((array_key_exists('importfile',\App::$data)) ? true : false);
if(! x(\App::$data,'imagecrop')) {
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
);
}
}