aboutsummaryrefslogtreecommitdiffstats
path: root/mod/common.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-02-13 17:33:58 -0800
committerfriendica <info@friendica.com>2013-02-13 17:33:58 -0800
commit3fdbb8b4ce3c328a859afd215d123bf9c7b62a12 (patch)
tree0946a81fb5d5cd0dd4f318e6549734f227a59518 /mod/common.php
parent45c2076c67085548a58d9ac3b02ae89a3ec0e42e (diff)
downloadvolse-hubzilla-3fdbb8b4ce3c328a859afd215d123bf9c7b62a12.tar.gz
volse-hubzilla-3fdbb8b4ce3c328a859afd215d123bf9c7b62a12.tar.bz2
volse-hubzilla-3fdbb8b4ce3c328a859afd215d123bf9c7b62a12.zip
mod_common - use channel_id rather than channel_address
Diffstat (limited to 'mod/common.php')
-rw-r--r--mod/common.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/mod/common.php b/mod/common.php
index bd2a0eef7..87dd9e63a 100644
--- a/mod/common.php
+++ b/mod/common.php
@@ -4,26 +4,20 @@ require_once('include/socgraph.php');
function common_init(&$a) {
- if(argc() > 1)
- $which = argv(1);
+ if(argc() > 1 && intval(argv(1)))
+ $channel_id = intval(argv(1));
else {
- notice( t('Requested profile is not available.') . EOL );
+ notice( t('No channel.') . EOL );
$a->error = 404;
return;
}
- $profile = 0;
- $channel = $a->get_channel();
+ $x = q("select channel_address from channel where channel_id = %d limit 1",
+ intval($channel_id)
+ };
- if((local_user()) && (argc() > 2) && (argv(2) === 'view')) {
- $which = $channel['channel_address'];
- $profile = argv(1);
- }
-
- // Run profile_load() here to make sure the theme is set before
- // we start loading content
-
- profile_load($a,$which,$profile);
+ if($x)
+ profile_load($a,$x[0]['channel_address'],0);
}