remote_user => remote_channel
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ function app_render($papp,$mode = 'view') {
|
||||
$installed = app_installed(local_channel(),$papp);
|
||||
$hosturl = z_root() . '/';
|
||||
}
|
||||
elseif(remote_user()) {
|
||||
elseif(remote_channel()) {
|
||||
$observer = get_app()->get_observer();
|
||||
if($observer && $observer['xchan_network'] === 'zot') {
|
||||
// some folks might have xchan_url redirected offsite, use the connurl
|
||||
|
||||
@@ -783,7 +783,7 @@ function profile_load(&$a, $nickname, $profile = '') {
|
||||
|
||||
function profile_create_sidebar(&$a,$connect = true) {
|
||||
|
||||
$block = (((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) ? true : false);
|
||||
$block = (((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) ? true : false);
|
||||
|
||||
$a->set_widget('profile',profile_sidebar($a->profile, $block, $connect));
|
||||
return;
|
||||
@@ -905,7 +905,7 @@ logger('online: ' . $profile['online']);
|
||||
$block = true;
|
||||
}
|
||||
|
||||
if(($profile['hidewall'] && (! local_channel()) && (! remote_user())) || $block ) {
|
||||
if(($profile['hidewall'] && (! local_channel()) && (! remote_channel())) || $block ) {
|
||||
$location = $pdesc = $gender = $marital = $homepage = $online = False;
|
||||
}
|
||||
|
||||
@@ -1290,7 +1290,7 @@ function zid_init(&$a) {
|
||||
$r = q("select * from hubloc where hubloc_addr = '%s' order by hubloc_connected desc limit 1",
|
||||
dbesc($tmp_str)
|
||||
);
|
||||
if($r && remote_user() && remote_user() === $r[0]['hubloc_hash'])
|
||||
if($r && remote_channel() && remote_channel() === $r[0]['hubloc_hash'])
|
||||
return;
|
||||
logger('zid_init: not authenticated. Invoking reverse magic-auth for ' . $tmp_str);
|
||||
// try to avoid recursion - but send them home to do a proper magic auth
|
||||
@@ -1421,7 +1421,7 @@ function get_online_status($nick) {
|
||||
|
||||
$ret = array('result' => false);
|
||||
|
||||
if(get_config('system','block_public') && ! local_channel() && ! remote_user())
|
||||
if(get_config('system','block_public') && ! local_channel() && ! remote_channel())
|
||||
return $ret;
|
||||
|
||||
$r = q("select channel_id, channel_hash from channel where channel_address = '%s' limit 1",
|
||||
|
||||
+1
-1
@@ -3949,7 +3949,7 @@ function retain_item($id) {
|
||||
function drop_items($items) {
|
||||
$uid = 0;
|
||||
|
||||
if(! local_channel() && ! remote_user())
|
||||
if(! local_channel() && ! remote_channel())
|
||||
return;
|
||||
|
||||
if(count($items)) {
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ EOT;
|
||||
|
||||
|
||||
}
|
||||
elseif(remote_user())
|
||||
elseif(remote_channel())
|
||||
$observer = $a->get_observer();
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ EOT;
|
||||
$nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn');
|
||||
|
||||
|
||||
if(($a->config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_user()))
|
||||
if(($a->config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel()))
|
||||
$nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn');
|
||||
|
||||
$help_url = z_root() . '/help?f=&cmd=' . $a->cmd;
|
||||
|
||||
@@ -154,7 +154,7 @@ function permissions_sql($owner_id, $remote_verified = false, $groups = null) {
|
||||
return '';
|
||||
|
||||
$local_channel = local_channel();
|
||||
$remote_user = remote_user();
|
||||
$remote_channel = remote_channel();
|
||||
|
||||
/**
|
||||
* Construct permissions
|
||||
@@ -227,7 +227,7 @@ function item_permissions_sql($owner_id, $remote_verified = false, $groups = nul
|
||||
return '';
|
||||
|
||||
$local_channel = local_channel();
|
||||
$remote_user = remote_user();
|
||||
$remote_channel = remote_channel();
|
||||
|
||||
/**
|
||||
* Construct permissions
|
||||
|
||||
@@ -426,7 +426,7 @@ function poco($a,$extended = false) {
|
||||
|
||||
$system_mode = false;
|
||||
|
||||
if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_user())) {
|
||||
if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) {
|
||||
logger('mod_poco: block_public');
|
||||
http_status_exit(401);
|
||||
}
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@ require_once('include/contact_widgets.php');
|
||||
|
||||
function widget_profile($args) {
|
||||
$a = get_app();
|
||||
$block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_user())) ? true : false);
|
||||
$block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false);
|
||||
return profile_sidebar($a->profile, $block, true);
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ function widget_fullprofile($arr) {
|
||||
if(! $a->profile['profile_uid'])
|
||||
return;
|
||||
|
||||
$block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_user())) ? true : false);
|
||||
$block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false);
|
||||
|
||||
return profile_sidebar($a->profile, $block);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user