aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/include/channel.php b/include/channel.php
index b838f8393..f88a2f8aa 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1193,11 +1193,6 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
else
$tpl = get_markup_template('profile_vcard.tpl');
- require_once('include/widgets.php');
-
-// if(! feature_enabled($profile['uid'],'hide_rating'))
- $z = widget_rating(array('target' => $profile['channel_hash']));
-
$o .= replace_macros($tpl, array(
'$zcard' => $zcard,
'$profile' => $profile,
@@ -1211,7 +1206,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
'$chanmenu' => $channel_menu,
'$diaspora' => $diaspora,
'$reddress' => $reddress,
- '$rating' => $z,
+ '$rating' => '',
'$contact_block' => $contact_block,
'$editmenu' => profile_edit_menu($profile['uid'])
));
@@ -2252,3 +2247,20 @@ function channel_remove($channel_id, $local = true, $unset_session=false) {
}
}
+
+/*
+ * This checks if a channel is allowed to publish executable code.
+ * It is up to the caller to determine if the observer or local_channel
+ * is in fact the resource owner whose channel_id is being checked
+ */
+
+function channel_codeallowed($channel_id) {
+
+ if(! intval($channel_id))
+ return false;
+
+ $x = channelx_by_n($channel_id);
+ if(($x) && ($x['channel_pageflags'] & PAGE_ALLOWCODE))
+ return true;
+ return false;
+} \ No newline at end of file