aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rwxr-xr-xmod/events.php13
-rw-r--r--mod/viewconnections.php16
2 files changed, 23 insertions, 6 deletions
diff --git a/mod/events.php b/mod/events.php
index d243f61ba..8bf8c6ce1 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -158,8 +158,17 @@ function events_content(&$a) {
}
+ $plaintext = true;
+
+ if(feature_enabled(local_user(),'richtext'))
+ $plaintext = false;
+
+
$htpl = get_markup_template('event_head.tpl');
- $a->page['htmlhead'] .= replace_macros($htpl,array('$baseurl' => $a->get_baseurl()));
+ $a->page['htmlhead'] .= replace_macros($htpl,array(
+ '$baseurl' => $a->get_baseurl(),
+ '$editselect' => (($plaintext) ? 'none' : 'textareas')
+ ));
$o ="";
// tabs
@@ -400,7 +409,6 @@ function events_content(&$a) {
if($orig_event['event_xchan'])
$sh_checked .= ' disabled="disabled" ';
- $tpl = get_markup_template('event_form.tpl');
$sdt = ((x($orig_event)) ? $orig_event['start'] : 'now');
$fdt = ((x($orig_event)) ? $orig_event['finish'] : 'now');
@@ -439,6 +447,7 @@ function events_content(&$a) {
'deny_gid' => $channel['channel_deny_gid']
);
+ $tpl = get_markup_template('event_form.tpl');
$o .= replace_macros($tpl,array(
diff --git a/mod/viewconnections.php b/mod/viewconnections.php
index f5e7ab213..b6a6b483c 100644
--- a/mod/viewconnections.php
+++ b/mod/viewconnections.php
@@ -28,11 +28,19 @@ function viewconnections_content(&$a) {
return;
}
+ $is_owner = ((local_user() && local_user() == $a->profile['uid']) ? true : false);
+
+ $abook_flags = ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF;
+ $xchan_flags = XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED;
+ if(! $is_owner) {
+ $abook_flags = $abook_flags | ABOOK_FLAGS_HIDDEN;
+ $xchan_flags = $xchan_flags | XCHAN_FLAGS_HIDDEN;
+ }
$r = q("SELECT count(*) as total FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not (abook_flags & %d ) and not ( xchan_flags & %d ) ",
intval($a->profile['uid']),
- intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF),
- intval(XCHAN_FLAGS_HIDDEN|XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED)
+ intval($abook_flags),
+ intval($xchan_flags)
);
if($r) {
$a->set_pager_total($r[0]['total']);
@@ -40,8 +48,8 @@ function viewconnections_content(&$a) {
$r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and not ( abook_flags & %d ) and not ( xchan_flags & %d ) order by xchan_name LIMIT %d , %d ",
intval($a->profile['uid']),
- intval(ABOOK_FLAG_HIDDEN|ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF),
- intval(XCHAN_FLAGS_HIDDEN|XCHAN_FLAGS_ORPHAN|XCHAN_FLAGS_DELETED),
+ intval($abook_flags),
+ intval($xchan_flags),
intval($a->pager['start']),
intval($a->pager['itemspage'])
);