From be27fb56440c6687add239e10c5e46ee7f3018f1 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 25 Feb 2016 13:40:15 +0100 Subject: we have got a button for events in the nav. no need for it in the tabs if we are local. --- include/conversation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/conversation.php b/include/conversation.php index e2dfccac9..39119b2bb 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1599,7 +1599,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ $uid = (($a->profile['profile_uid']) ? $a->profile['profile_uid'] : local_channel()); if($uid == local_channel()) { - $cal_link = '/events'; + $cal_link = ''; } else { $cal_link = '/cal/' . $nickname; @@ -1653,7 +1653,7 @@ function profile_tabs($a, $is_owner = false, $nickname = null){ ); } - if($p['view_stream']) { + if($p['view_stream'] && $cal_link) { $tabs[] = array( 'label' => t('Events'), 'url' => $a->get_baseurl() . $cal_link, -- cgit v1.2.3 From b2474334a7b7f009442883a08d544280231b29fc Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 25 Feb 2016 22:50:16 +0100 Subject: provide an edit button for the profile page --- include/identity.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/identity.php b/include/identity.php index a389a613e..0a88ed208 100644 --- a/include/identity.php +++ b/include/identity.php @@ -1237,10 +1237,6 @@ function advanced_profile(&$a) { if(! perm_is_allowed($a->profile['profile_uid'],get_observer_hash(),'view_profile')) return ''; - $o = ''; - - $o .= '

' . t('Profile') . '

'; - if($a->profile['name']) { $tpl = get_markup_template('profile_advanced.tpl'); @@ -1351,6 +1347,10 @@ function advanced_profile(&$a) { $profile['extra_fields'] = $a->profile['extra_fields']; } + + $is_owner = (($a->profile['profile_uid'] == local_channel()) ? true : false); + $edit = (($is_owner) ? array('link' => $a->get_baseurl() . '/profiles/' . $a->profile['profile_uid'], 'label' => t('Edit')) : ''); + $things = get_things($a->profile['profile_guid'],$a->profile['profile_uid']); // logger('mod_profile: things: ' . print_r($things,true), LOGGER_DATA); @@ -1360,6 +1360,7 @@ function advanced_profile(&$a) { '$canlike' => (($profile['canlike'])? true : false), '$likethis' => t('Like this thing'), '$profile' => $profile, + '$edit' => $edit, '$things' => $things )); } -- cgit v1.2.3 From ea54987ca4c36623bbbb4923cf1e19e9650431ed Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 25 Feb 2016 23:03:38 +0100 Subject: in update_birthdays() we should probably set adjust to 0 instead of 1 since a birthday is more a kind of a global holiday --- include/datetime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/datetime.php b/include/datetime.php index bfd806f32..2f2727ae5 100644 --- a/include/datetime.php +++ b/include/datetime.php @@ -549,7 +549,7 @@ function update_birthdays() { $ev['event_xchan'] = $rr['xchan_hash']; $ev['start'] = datetime_convert('UTC', 'UTC', $rr['abook_dob']); $ev['finish'] = datetime_convert('UTC', 'UTC', $rr['abook_dob'] . ' + 1 day '); - $ev['adjust'] = 1; + $ev['adjust'] = 0; $ev['summary'] = sprintf( t('%1$s\'s birthday'), $rr['xchan_name']); $ev['description'] = sprintf( t('Happy Birthday %1$s'), '[zrl=' . $rr['xchan_url'] . ']' . $rr['xchan_name'] . '[/zrl]') ; -- cgit v1.2.3 From 5ad9b48f1d916425e41f475319c7237293d055b9 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 25 Feb 2016 23:59:57 +0100 Subject: revert f62ec4132ed571288737423de386054a4cc8b0d5 - allow one self to be added to a privacy group. --- include/group.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/group.php b/include/group.php index bef008afd..22f221059 100644 --- a/include/group.php +++ b/include/group.php @@ -200,7 +200,7 @@ function group_get_members($gid) { if(intval($gid)) { $r = q("SELECT * FROM `group_member` LEFT JOIN abook ON abook_xchan = `group_member`.`xchan` left join xchan on xchan_hash = abook_xchan - WHERE `gid` = %d AND abook_channel = %d and `group_member`.`uid` = %d and xchan_deleted = 0 and abook_blocked = 0 and abook_pending = 0 ORDER BY xchan_name ASC ", + WHERE `gid` = %d AND abook_channel = %d and `group_member`.`uid` = %d and xchan_deleted = 0 and abook_self = 0 and abook_blocked = 0 and abook_pending = 0 ORDER BY xchan_name ASC ", intval($gid), intval(local_channel()), intval(local_channel()) -- cgit v1.2.3