aboutsummaryrefslogtreecommitdiffstats
path: root/mod/channel.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/channel.php')
-rw-r--r--mod/channel.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/mod/channel.php b/mod/channel.php
index 0a49b41eb..aa158d330 100644
--- a/mod/channel.php
+++ b/mod/channel.php
@@ -2,11 +2,18 @@
function channel_init(&$a) {
+ $which = null;
if(argc() > 1)
$which = argv(1);
- else {
- notice( t('Requested profile is not available.') . EOL );
- $a->error = 404;
+ if(! $which) {
+ if(local_user()) {
+ $channel = $a->get_channel();
+ if($channel && $channel['channel_address'])
+ $which = $channel['channel_address'];
+ }
+ }
+ if(! $which) {
+ notice( t('You must be logged in to see this page.') . EOL );
return;
}
@@ -47,6 +54,9 @@ function channel_aside(&$a) {
$a->set_widget('archive',posted_date_widget($a->get_baseurl(true) . '/channel/' . $a->profile['channel_address'],$a->profile['profile_uid'],true));
$a->set_widget('categories',categories_widget($a->get_baseurl(true) . '/channel/' . $a->profile['channel_address'],$cat));
}
+ if(feature_enabled($a->profile['profile_uid'],'tagadelic'))
+ $a->set_widget('tagcloud',tagblock('search',$a->profile['profile_uid'],50,$a->profile['channel_hash'],ITEM_WALL));
+
}
@@ -118,12 +128,12 @@ function channel_content(&$a, $update = 0, $load = false) {
$x = array(
'is_owner' => $is_owner,
-// FIXME
- 'allow_location' => ((($is_owner || $observer) && $a->profile['allow_location']) ? true : false),
- 'default_location' => (($is_owner) ? $a->profile['default_location'] : ''),
+ 'allow_location' => ((($is_owner || $observer) && (intval(get_pconfig($a->profile['profile_uid'],'system','use_browser_location')))) ? true : false),
+ 'default_location' => (($is_owner) ? $a->profile['channel_location'] : ''),
'nickname' => $a->profile['channel_address'],
'lockstate' => (((strlen($a->profile['channel_allow_cid'])) || (strlen($a->profile['channel_allow_gid'])) || (strlen($a->profile['channel_deny_cid'])) || (strlen($a->profile['channel_deny_gid']))) ? 'lock' : 'unlock'),
'acl' => (($is_owner) ? populate_acl($channel, false) : ''),
+ 'showacl' => (($is_owner) ? 'yes' : ''),
'bang' => '',
'visitor' => (($is_owner || $observer) ? 'block' : 'none'),
'profile_uid' => $a->profile['profile_uid']
@@ -247,7 +257,7 @@ function channel_content(&$a, $update = 0, $load = false) {
'$order' => '',
'$file' => '',
'$cats' => (($category) ? $category : ''),
- '$uri' => '',
+ '$mid' => '',
'$dend' => $datequery,
'$dbegin' => $datequery2
));