From e157371c39121db472cbc45b59ac89d847788648 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 28 Jan 2015 20:58:59 -0800 Subject: remote_user => remote_channel --- boot.php | 2 +- doc/dev-function-overview.md | 2 +- doc/developer_function_primer.bb | 2 +- doc/html/boot_8php.html | 6 +++--- doc/html/boot_8php.js | 2 +- doc/html/globals_0x72.html | 2 +- doc/html/globals_func_0x72.html | 2 +- doc/html/search/all_72.js | 2 +- doc/html/search/functions_72.js | 2 +- include/apps.php | 2 +- include/identity.php | 8 ++++---- include/items.php | 2 +- include/nav.php | 4 ++-- include/security.php | 4 ++-- include/socgraph.php | 2 +- include/widgets.php | 4 ++-- mod/acl.php | 2 +- mod/channel.php | 2 +- mod/directory.php | 2 +- mod/display.php | 2 +- mod/home.php | 2 +- mod/item.php | 4 ++-- mod/oexchange.php | 2 +- mod/photos.php | 8 ++++---- mod/post.php | 2 +- mod/profile.php | 4 ++-- mod/rpost.php | 2 +- mod/search.php | 2 +- mod/share.php | 2 +- mod/subthread.php | 2 +- mod/tagger.php | 2 +- mod/viewconnections.php | 4 ++-- mod/zotfeed.php | 2 +- 33 files changed, 47 insertions(+), 47 deletions(-) diff --git a/boot.php b/boot.php index f35e6586b..d972c68dc 100755 --- a/boot.php +++ b/boot.php @@ -1615,7 +1615,7 @@ function local_channel() { * * @return int|bool visitor_id or false */ -function remote_user() { +function remote_channel() { if((x($_SESSION, 'authenticated')) && (x($_SESSION, 'visitor_id'))) return $_SESSION['visitor_id']; diff --git a/doc/dev-function-overview.md b/doc/dev-function-overview.md index fa2bbac00..e228268dd 100644 --- a/doc/dev-function-overview.md +++ b/doc/dev-function-overview.md @@ -11,7 +11,7 @@ Returns numeric account_id if authenticated or 0. It is possible to be authentic Returns authenticated numeric channel_id if authenticated and connected to a channel or 0. Sometimes referred to as $uid in the code. -* remote_user() +* remote_channel() Returns authenticated string hash of Red global identifier, if authenticated via remote auth, or an empty string. diff --git a/doc/developer_function_primer.bb b/doc/developer_function_primer.bb index 33fb1f51f..373454440 100644 --- a/doc/developer_function_primer.bb +++ b/doc/developer_function_primer.bb @@ -8,7 +8,7 @@ Returns numeric account_id if authenticated or 0. It is possible to be authentic Returns authenticated numeric channel_id if authenticated and connected to a channel or 0. Sometimes referred to as $uid in the code. -[b]remote_user()[/b] +[b]remote_channel()[/b] Returns authenticated string hash of Red global identifier, if authenticated via remote auth, or an empty string. diff --git a/doc/html/boot_8php.html b/doc/html/boot_8php.html index 299ee9c48..e24055b71 100644 --- a/doc/html/boot_8php.html +++ b/doc/html/boot_8php.html @@ -163,7 +163,7 @@ Functions  local_channel ()  Returns the entity id (channel_id) of locally logged in user or false. More...
  - remote_user () + remote_channel ()  Returns contact id (visitor_id) of authenticated site visitor or false. More...
   notice ($s) @@ -1620,7 +1620,7 @@ Variables
- + @@ -1704,7 +1704,7 @@ Variables
Returns
bool|int
-

Referenced by FriendicaSmarty\__construct(), App\__construct(), account_service_class_allows(), account_service_class_fetch(), acl_init(), admin_page_channels_post(), admin_page_logs_post(), admin_page_plugins(), admin_page_site(), admin_page_site_post(), admin_page_themes(), admin_page_users_post(), api_content(), api_direct_messages_box(), api_direct_messages_new(), api_favorites(), api_format_messages(), api_get_user(), api_login(), api_post(), api_statuses_f(), api_statuses_home_timeline(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_show(), api_statuses_update(), api_statuses_user_timeline(), api_user(), app_store(), app_update(), attach_store(), authenticate_success(), bbcode(), bbtoevent(), best_link_url(), bookmark_add(), App\build_pagehead(), channel_content(), chatsvc_content(), check_form_security_token(), cli_startup(), cloud_init(), connections_content(), connections_post(), connedit_content(), construct_page(), consume_feed(), conversation(), create_account(), create_identity(), current_theme(), current_theme_url(), dav_init(), del_pconfig(), del_xconfig(), delegate_content(), detect_language(), diaspora_asphoto(), diaspora_conversation(), diaspora_message(), dir_sort_links(), directory_content(), directory_init(), dirsearch_content(), discover_by_url(), display_content(), encode_rel_links(), event_addtocal(), events_content(), events_post(), feed_init(), filerm_content(), filestorage_post(), get_atom_elements(), get_browser_language(), get_item_elements(), get_my_address(), get_my_url(), get_plink(), get_public_feed(), Item\get_template_data(), get_timezones(), group_add(), group_rmv(), group_side(), home_content(), import_post(), import_xchan(), info(), invite_post(), item_post(), item_store(), item_store_update(), lang_selector(), load_contact_links(), local_channel(), lostpass_content(), magic_init(), mail_content(), mail_post(), mail_store(), mood_content(), mood_init(), nav(), navbar_complete(), network_content(), new_channel_content(), new_cookie(), notice(), oexchange_content(), openid_content(), parse_url_content(), photo_upload(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_content(), poke_init(), post_activity_item(), post_init(), post_var(), probe_content(), proc_run(), profile_photo_post(), profile_photo_set_profile_perms(), profile_sidebar(), profiles_post(), pubsub_init(), rbmark_content(), rbmark_post(), red_item_new(), ref_session_read(), register_content(), register_post(), App\register_template_engine(), regmod_content(), remote_user(), removeaccount_post(), removeme_post(), rpost_content(), scrape_feed(), script_path(), search_ac_init(), search_content(), search_init(), service_class_allows(), service_class_fetch(), App\set_baseurl(), settings_post(), setup_content(), setup_init(), suggest_init(), t(), tagrm_post(), App\template_engine(), tt(), validate_channelname(), wall_upload_post(), webfinger_content(), wfinger_init(), widget_affinity(), widget_categories(), widget_filer(), widget_savedsearch(), widget_tagcloud(), xchan_content(), z_fetch_url(), z_post_url(), and zfinger_init().

+

Referenced by FriendicaSmarty\__construct(), App\__construct(), account_service_class_allows(), account_service_class_fetch(), acl_init(), admin_page_channels_post(), admin_page_logs_post(), admin_page_plugins(), admin_page_site(), admin_page_site_post(), admin_page_themes(), admin_page_users_post(), api_content(), api_direct_messages_box(), api_direct_messages_new(), api_favorites(), api_format_messages(), api_get_user(), api_login(), api_post(), api_statuses_f(), api_statuses_home_timeline(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_show(), api_statuses_update(), api_statuses_user_timeline(), api_user(), app_store(), app_update(), attach_store(), authenticate_success(), bbcode(), bbtoevent(), best_link_url(), bookmark_add(), App\build_pagehead(), channel_content(), chatsvc_content(), check_form_security_token(), cli_startup(), cloud_init(), connections_content(), connections_post(), connedit_content(), construct_page(), consume_feed(), conversation(), create_account(), create_identity(), current_theme(), current_theme_url(), dav_init(), del_pconfig(), del_xconfig(), delegate_content(), detect_language(), diaspora_asphoto(), diaspora_conversation(), diaspora_message(), dir_sort_links(), directory_content(), directory_init(), dirsearch_content(), discover_by_url(), display_content(), encode_rel_links(), event_addtocal(), events_content(), events_post(), feed_init(), filerm_content(), filestorage_post(), get_atom_elements(), get_browser_language(), get_item_elements(), get_my_address(), get_my_url(), get_plink(), get_public_feed(), Item\get_template_data(), get_timezones(), group_add(), group_rmv(), group_side(), home_content(), import_post(), import_xchan(), info(), invite_post(), item_post(), item_store(), item_store_update(), lang_selector(), load_contact_links(), local_channel(), lostpass_content(), magic_init(), mail_content(), mail_post(), mail_store(), mood_content(), mood_init(), nav(), navbar_complete(), network_content(), new_channel_content(), new_cookie(), notice(), oexchange_content(), openid_content(), parse_url_content(), photo_upload(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_content(), poke_init(), post_activity_item(), post_init(), post_var(), probe_content(), proc_run(), profile_photo_post(), profile_photo_set_profile_perms(), profile_sidebar(), profiles_post(), pubsub_init(), rbmark_content(), rbmark_post(), red_item_new(), ref_session_read(), register_content(), register_post(), App\register_template_engine(), regmod_content(), remote_channel(), removeaccount_post(), removeme_post(), rpost_content(), scrape_feed(), script_path(), search_ac_init(), search_content(), search_init(), service_class_allows(), service_class_fetch(), App\set_baseurl(), settings_post(), setup_content(), setup_init(), suggest_init(), t(), tagrm_post(), App\template_engine(), tt(), validate_channelname(), wall_upload_post(), webfinger_content(), wfinger_init(), widget_affinity(), widget_categories(), widget_filer(), widget_savedsearch(), widget_tagcloud(), xchan_content(), z_fetch_url(), z_post_url(), and zfinger_init().

diff --git a/doc/html/boot_8php.js b/doc/html/boot_8php.js index f2cc7a16b..1cfaebcb4 100644 --- a/doc/html/boot_8php.js +++ b/doc/html/boot_8php.js @@ -37,7 +37,7 @@ var boot_8php = [ "notice", "boot_8php.html#a9255af5ae9c887520091ea04763c1a88", null ], [ "os_mkdir", "boot_8php.html#a5fbebdf7a1c0ea8f904dbd9d78c2c06c", null ], [ "proc_run", "boot_8php.html#ab346a2ece14993861f3e4206befa94f0", null ], - [ "remote_user", "boot_8php.html#a5542c5c2806ab8bca04bad53d47b5209", null ], + [ "remote_channel", "boot_8php.html#a5542c5c2806ab8bca04bad53d47b5209", null ], [ "startup", "boot_8php.html#aca47505b8732177f52bb2d647eb2741c", null ], [ "system_unavailable", "boot_8php.html#ac608a34f3bc180e7724192e0fd31f9b0", null ], [ "x", "boot_8php.html#ae97836b0547953be182a2334c9c91d3c", null ], diff --git a/doc/html/globals_0x72.html b/doc/html/globals_0x72.html index 1665b356e..26447682d 100644 --- a/doc/html/globals_0x72.html +++ b/doc/html/globals_0x72.html @@ -316,7 +316,7 @@ $(document).ready(function(){initNavTree('globals_0x72.html','');});
  • remote_online_status() : identity.php
  • -
  • remote_user() +
  • remote_channel() : boot.php
  • remove_all_xchan_resources() diff --git a/doc/html/globals_func_0x72.html b/doc/html/globals_func_0x72.html index 6eea866f1..75559eca2 100644 --- a/doc/html/globals_func_0x72.html +++ b/doc/html/globals_func_0x72.html @@ -273,7 +273,7 @@ $(document).ready(function(){initNavTree('globals_func_0x72.html','');});
  • remote_online_status() : identity.php
  • -
  • remote_user() +
  • remote_channel() : boot.php
  • remove_all_xchan_resources() diff --git a/doc/html/search/all_72.js b/doc/html/search/all_72.js index 04e2802f8..59b25a93b 100644 --- a/doc/html/search/all_72.js +++ b/doc/html/search/all_72.js @@ -81,7 +81,7 @@ var searchData= ['reload_5fplugins',['reload_plugins',['../plugin_8php.html#af9ac19004dca49adae1ac7a0d9f3b025',1,'plugin.php']]], ['reltoabs',['reltoabs',['../text_8php.html#ad855a32bee22c3f3b9734e3a334b96f2',1,'text.php']]], ['remote_5fonline_5fstatus',['remote_online_status',['../identity_8php.html#a47d6f53216f23a3484061793bef29854',1,'identity.php']]], - ['remote_5fuser',['remote_user',['../boot_8php.html#a5542c5c2806ab8bca04bad53d47b5209',1,'boot.php']]], + ['remote_5fuser',['remote_channel',['../boot_8php.html#a5542c5c2806ab8bca04bad53d47b5209',1,'boot.php']]], ['remove_5fall_5fxchan_5fresources',['remove_all_xchan_resources',['../Contact_8php.html#acc12cda999c88c4d6185cca967c15125',1,'Contact.php']]], ['remove_5fchild',['remove_child',['../classItem.html#a2ce70ef63f9f4d86a09c351678806925',1,'Item']]], ['remove_5fcommunity_5ftag',['remove_community_tag',['../zot_8php.html#aad25a3fe0e1566121d6fb8222979bc10',1,'zot.php']]], diff --git a/doc/html/search/functions_72.js b/doc/html/search/functions_72.js index 41d4f1f93..cdf380215 100644 --- a/doc/html/search/functions_72.js +++ b/doc/html/search/functions_72.js @@ -44,7 +44,7 @@ var searchData= ['reload_5fplugins',['reload_plugins',['../plugin_8php.html#af9ac19004dca49adae1ac7a0d9f3b025',1,'plugin.php']]], ['reltoabs',['reltoabs',['../text_8php.html#ad855a32bee22c3f3b9734e3a334b96f2',1,'text.php']]], ['remote_5fonline_5fstatus',['remote_online_status',['../identity_8php.html#a47d6f53216f23a3484061793bef29854',1,'identity.php']]], - ['remote_5fuser',['remote_user',['../boot_8php.html#a5542c5c2806ab8bca04bad53d47b5209',1,'boot.php']]], + ['remote_5fuser',['remote_channel',['../boot_8php.html#a5542c5c2806ab8bca04bad53d47b5209',1,'boot.php']]], ['remove_5fall_5fxchan_5fresources',['remove_all_xchan_resources',['../Contact_8php.html#acc12cda999c88c4d6185cca967c15125',1,'Contact.php']]], ['remove_5fchild',['remove_child',['../classItem.html#a2ce70ef63f9f4d86a09c351678806925',1,'Item']]], ['remove_5fcommunity_5ftag',['remove_community_tag',['../zot_8php.html#aad25a3fe0e1566121d6fb8222979bc10',1,'zot.php']]], diff --git a/include/apps.php b/include/apps.php index e3120807c..504641102 100644 --- a/include/apps.php +++ b/include/apps.php @@ -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 diff --git a/include/identity.php b/include/identity.php index 67cd4b4af..2fc183368 100644 --- a/include/identity.php +++ b/include/identity.php @@ -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", diff --git a/include/items.php b/include/items.php index a5a42d23b..c34e694ac 100755 --- a/include/items.php +++ b/include/items.php @@ -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)) { diff --git a/include/nav.php b/include/nav.php index 994ebc597..5e8317cfa 100644 --- a/include/nav.php +++ b/include/nav.php @@ -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; diff --git a/include/security.php b/include/security.php index 1cb9e827b..216299099 100644 --- a/include/security.php +++ b/include/security.php @@ -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 diff --git a/include/socgraph.php b/include/socgraph.php index 9b30429df..13957e814 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -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); } diff --git a/include/widgets.php b/include/widgets.php index 2cedc8d9d..65c006409 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -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); } diff --git a/mod/acl.php b/mod/acl.php index 5a048ddee..6ae803596 100644 --- a/mod/acl.php +++ b/mod/acl.php @@ -263,7 +263,7 @@ function navbar_complete(&$a) { // logger('navbar_complete'); - if((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { return; } diff --git a/mod/channel.php b/mod/channel.php index 493730e8a..1a471718d 100644 --- a/mod/channel.php +++ b/mod/channel.php @@ -52,7 +52,7 @@ function channel_content(&$a, $update = 0, $load = false) { $datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : ''); $datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : ''); - if(get_config('system','block_public') && (! get_account_id()) && (! remote_user())) { + if(get_config('system','block_public') && (! get_account_id()) && (! remote_channel())) { return login(); } diff --git a/mod/directory.php b/mod/directory.php index defa8db7e..21940d57b 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -18,7 +18,7 @@ function directory_init(&$a) { function directory_content(&$a) { - if((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { notice( t('Public access denied.') . EOL); return; } diff --git a/mod/display.php b/mod/display.php index 943af4206..467c476da 100644 --- a/mod/display.php +++ b/mod/display.php @@ -5,7 +5,7 @@ function display_content(&$a, $update = 0, $load = false) { // logger("mod-display: update = $update load = $load"); - if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { notice( t('Public access denied.') . EOL); return; } diff --git a/mod/home.php b/mod/home.php index 733789991..854e2df26 100644 --- a/mod/home.php +++ b/mod/home.php @@ -100,7 +100,7 @@ function home_content(&$a, $update = 0, $load = false) { if($sitename) $o .= '

    ' . sprintf( t("Welcome to %s") ,$sitename) . '

    '; - if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if(intval(get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { // If there's nothing special happening, just spit out a login box if (! $a->config['system']['no_login_on_homepage']) diff --git a/mod/item.php b/mod/item.php index 26f6fb43d..d8cbeadc7 100644 --- a/mod/item.php +++ b/mod/item.php @@ -26,7 +26,7 @@ function item_post(&$a) { // This will change. Figure out who the observer is and whether or not // they have permission to post here. Else ignore the post. - if((! local_channel()) && (! remote_user()) && (! x($_REQUEST,'commenter'))) + if((! local_channel()) && (! remote_channel()) && (! x($_REQUEST,'commenter'))) return; require_once('include/security.php'); @@ -905,7 +905,7 @@ function item_post(&$a) { function item_content(&$a) { - if((! local_channel()) && (! remote_user())) + if((! local_channel()) && (! remote_channel())) return; require_once('include/security.php'); diff --git a/mod/oexchange.php b/mod/oexchange.php index 637f4f384..a684bd5d8 100644 --- a/mod/oexchange.php +++ b/mod/oexchange.php @@ -15,7 +15,7 @@ function oexchange_init(&$a) { function oexchange_content(&$a) { if(! local_channel()) { - if(remote_user()) { + if(remote_channel()) { $observer = $a->get_observer(); if($observer && $observer['xchan_url']) { $parsed = @parse_url($observer['xchan_url']); diff --git a/mod/photos.php b/mod/photos.php index 108f4c524..dbe165f60 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -11,7 +11,7 @@ require_once('include/Contact.php'); function photos_init(&$a) { - if((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { return; } @@ -122,8 +122,8 @@ function photos_post(&$a) { // get the list of photos we are about to delete - if(remote_user() && (! local_channel())) { - $str = photos_album_get_db_idstr($page_owner_uid,$album,remote_user()); + if(remote_channel() && (! local_channel())) { + $str = photos_album_get_db_idstr($page_owner_uid,$album,remote_channel()); } elseif(local_channel()) { $str = photos_album_get_db_idstr(local_channel(),$album); @@ -425,7 +425,7 @@ function photos_content(&$a) { // photos/name/image/xxxxx - if((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { notice( t('Public access denied.') . EOL); return; } diff --git a/mod/post.php b/mod/post.php index 91a1d4877..c90997335 100644 --- a/mod/post.php +++ b/mod/post.php @@ -148,7 +148,7 @@ function post_init(&$a) { // If they are already authenticated and haven't changed credentials, // we can save an expensive network round trip and improve performance. - $remote = remote_user(); + $remote = remote_channel(); $result = null; $remote_service_class = ''; $remote_level = 0; diff --git a/mod/profile.php b/mod/profile.php index e37aea863..430d039e9 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -51,7 +51,7 @@ function profile_init(&$a) { function profile_content(&$a, $update = 0) { - if(get_config('system','block_public') && (! get_account_id()) && (! remote_user())) { + if(get_config('system','block_public') && (! get_account_id()) && (! remote_channel())) { return login(); } @@ -68,7 +68,7 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_channel()) && (local_channel() == $a->profile['profile_uid']) ? true : false); - if($a->profile['hidewall'] && (! $is_owner) && (! remote_user())) { + if($a->profile['hidewall'] && (! $is_owner) && (! remote_channel())) { notice( t('Permission denied.') . EOL); return; } diff --git a/mod/rpost.php b/mod/rpost.php index 187605dca..2bea18c43 100644 --- a/mod/rpost.php +++ b/mod/rpost.php @@ -30,7 +30,7 @@ function rpost_content(&$a) { $o = ''; if(! local_channel()) { - if(remote_user()) { + if(remote_channel()) { // redirect to your own site. // We can only do this with a GET request so you'll need to keep the text short or risk getting truncated // by the wretched beast called 'suhosin'. All the browsers now allow long GET requests, but suhosin diff --git a/mod/search.php b/mod/search.php index ff7eb0731..02b250bbe 100644 --- a/mod/search.php +++ b/mod/search.php @@ -9,7 +9,7 @@ function search_init(&$a) { function search_content(&$a,$update = 0, $load = false) { if((get_config('system','block_public')) || (get_config('system','block_public_search'))) { - if ((! local_channel()) && (! remote_user())) { + if ((! local_channel()) && (! remote_channel())) { notice( t('Public access denied.') . EOL); return; } diff --git a/mod/share.php b/mod/share.php index 2fb3d95cc..923971694 100644 --- a/mod/share.php +++ b/mod/share.php @@ -10,7 +10,7 @@ function share_init(&$a) { if(! $post_id) killme(); - if(! (local_channel() || remote_user())) + if(! (local_channel() || remote_channel())) killme(); diff --git a/mod/subthread.php b/mod/subthread.php index 00ec87070..eeb8f131d 100755 --- a/mod/subthread.php +++ b/mod/subthread.php @@ -7,7 +7,7 @@ require_once('include/items.php'); function subthread_content(&$a) { - if((! local_channel()) && (! remote_user())) { + if((! local_channel()) && (! remote_channel())) { return; } diff --git a/mod/tagger.php b/mod/tagger.php index 68792ab5f..a93609c3c 100644 --- a/mod/tagger.php +++ b/mod/tagger.php @@ -7,7 +7,7 @@ require_once('include/items.php'); function tagger_content(&$a) { - if(! local_channel() && ! remote_user()) { + if(! local_channel() && ! remote_channel()) { return; } diff --git a/mod/viewconnections.php b/mod/viewconnections.php index 1be5c157f..ee68c2149 100644 --- a/mod/viewconnections.php +++ b/mod/viewconnections.php @@ -4,7 +4,7 @@ require_once('include/Contact.php'); function viewconnections_init(&$a) { - if((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { return; } if(argc() > 1) @@ -13,7 +13,7 @@ function viewconnections_init(&$a) { function viewconnections_content(&$a) { - if((get_config('system','block_public')) && (! local_channel()) && (! remote_user())) { + if((get_config('system','block_public')) && (! local_channel()) && (! remote_channel())) { notice( t('Public access denied.') . EOL); return; } diff --git a/mod/zotfeed.php b/mod/zotfeed.php index 9ad93c1d4..7bf91d4db 100644 --- a/mod/zotfeed.php +++ b/mod/zotfeed.php @@ -11,7 +11,7 @@ function zotfeed_init(&$a) { if(! $mindate) $mindate = datetime_convert('UTC','UTC', 'now - 1 month'); - if(get_config('system','block_public') && (! get_account_id()) && (! remote_user())) { + if(get_config('system','block_public') && (! get_account_id()) && (! remote_channel())) { $result['message'] = 'Public access denied'; json_return_and_die($result); } -- cgit v1.2.3
  • remote_user remote_channel ( )