From a4960360669daa0a0c842427185ce1ada3b4ab97 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 28 Jan 2015 20:56:04 -0800 Subject: local_user => local_channel --- app/bookmarks.apd | 2 +- app/channel.apd | 2 +- app/chat.apd | 2 +- app/connections.apd | 2 +- app/events.apd | 2 +- app/features.apd | 2 +- app/invite.apd | 2 +- app/mail.apd | 2 +- app/manage.apd | 2 +- app/matrix.apd | 2 +- app/mood.apd | 2 +- app/photos.apd | 2 +- app/poke.apd | 2 +- app/pphoto.apd | 2 +- app/probe.apd | 2 +- app/profile.apd | 2 +- app/settings.apd | 2 +- app/storage.apd | 2 +- app/suggest.apd | 2 +- app/webpages.apd | 2 +- boot.php | 16 +- doc/Plugins.md | 14 +- 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/comanche_8php.html | 2 +- doc/html/globals_0x6c.html | 2 +- doc/html/globals_func_0x6c.html | 2 +- doc/html/include_2config_8php.html | 2 +- doc/html/redstrap_2php_2style_8php.html | 4 +- doc/html/search/all_6c.js | 2 +- doc/html/search/functions_6c.js | 2 +- doc/html/style_8php.html | 2 +- ...e_2blogga_2view_2theme_2blog_2default_8php.html | 2 +- doc/plugins.bb | 14 +- doc/sql_conventions.bb | 2 +- include/Contact.php | 6 +- include/ConversationObject.php | 4 +- include/ItemObject.php | 20 +-- include/RedDAV/RedBrowser.php | 2 +- include/account.php | 4 +- include/acl_selectors.php | 6 +- include/activities.php | 6 +- include/api.php | 4 +- include/apps.php | 24 +-- include/attach.php | 2 +- include/auth.php | 2 +- include/comanche.php | 6 +- include/config.php | 2 +- include/contact_widgets.php | 12 +- include/conversation.php | 52 +++---- include/follow.php | 2 +- include/group.php | 8 +- include/identity.php | 40 ++--- include/items.php | 10 +- include/menu.php | 4 +- include/message.php | 8 +- include/nav.php | 22 +-- include/security.php | 18 +-- include/socgraph.php | 2 +- include/text.php | 20 +-- include/widgets.php | 54 +++---- include/zot.php | 2 +- index.php | 4 +- mod/acl.php | 16 +- mod/admin.php | 2 +- mod/api.php | 10 +- mod/appman.php | 16 +- mod/apps.php | 4 +- mod/authtest.php | 2 +- mod/blocks.php | 2 +- mod/bookmarks.php | 14 +- mod/channel.php | 12 +- mod/chanview.php | 6 +- mod/chat.php | 18 +-- mod/cloud.php | 2 +- mod/connect.php | 6 +- mod/connections.php | 30 ++-- mod/connedit.php | 46 +++--- mod/contactgroup.php | 10 +- mod/dav.php | 2 +- mod/delegate.php | 12 +- mod/directory.php | 20 +-- mod/display.php | 14 +- mod/editblock.php | 2 +- mod/editlayout.php | 2 +- mod/editpost.php | 12 +- mod/editwebpage.php | 2 +- mod/events.php | 32 ++-- mod/fbrowser.php | 8 +- mod/filer.php | 10 +- mod/filerm.php | 4 +- mod/filestorage.php | 4 +- mod/follow.php | 6 +- mod/fsuggest.php | 16 +- mod/group.php | 30 ++-- mod/hcard.php | 4 +- mod/home.php | 10 +- mod/impel.php | 10 +- mod/invite.php | 14 +- mod/item.php | 10 +- mod/layouts.php | 2 +- mod/lockview.php | 2 +- mod/locs.php | 4 +- mod/login.php | 2 +- mod/magic.php | 4 +- mod/mail.php | 32 ++-- mod/manage.php | 4 +- mod/match.php | 4 +- mod/menu.php | 4 +- mod/message.php | 8 +- mod/mitem.php | 6 +- mod/mood.php | 6 +- mod/network.php | 34 ++-- mod/notes.php | 4 +- mod/notifications.php | 10 +- mod/notify.php | 10 +- mod/oexchange.php | 4 +- mod/pdledit.php | 10 +- mod/photos.php | 20 +-- mod/ping.php | 52 +++---- mod/poke.php | 8 +- mod/post.php | 2 +- mod/profile.php | 6 +- mod/profile_photo.php | 44 +++--- mod/profiles.php | 106 ++++++------- mod/profperm.php | 20 +-- mod/rbmark.php | 2 +- mod/regmod.php | 2 +- mod/removeaccount.php | 4 +- mod/removeme.php | 6 +- mod/rmagic.php | 2 +- mod/rpost.php | 6 +- mod/search.php | 14 +- mod/search_ac.php | 4 +- mod/service_limits.php | 2 +- mod/settings.php | 172 ++++++++++----------- mod/share.php | 6 +- mod/sharedwithme.php | 12 +- mod/sources.php | 24 +-- mod/starred.php | 6 +- mod/subthread.php | 2 +- mod/suggest.php | 8 +- mod/tagger.php | 4 +- mod/tagrm.php | 10 +- mod/thing.php | 32 ++-- mod/uexport.php | 6 +- mod/viewconnections.php | 6 +- mod/viewsrc.php | 6 +- mod/webpages.php | 2 +- mod/zping.php | 2 +- util/fresh | 8 +- view/theme/redbasic/php/config.php | 130 ++++++++-------- view/tpl/head.tpl | 2 +- 155 files changed, 886 insertions(+), 886 deletions(-) diff --git a/app/bookmarks.apd b/app/bookmarks.apd index 6c3d718a8..9581a220c 100644 --- a/app/bookmarks.apd +++ b/app/bookmarks.apd @@ -1,4 +1,4 @@ url: $baseurl/bookmarks -requires: local_user +requires: local_channel name: View bookmarks photo: $baseurl/app/bookmarks.png diff --git a/app/channel.apd b/app/channel.apd index be13ee77b..0b5400ae4 100644 --- a/app/channel.apd +++ b/app/channel.apd @@ -1,4 +1,4 @@ url: $baseurl/channel/$nick -requires: local_user +requires: local_channel name: Channel Home photo: $baseurl/app/home.png diff --git a/app/chat.apd b/app/chat.apd index 249608f57..d4879c0b7 100644 --- a/app/chat.apd +++ b/app/chat.apd @@ -1,4 +1,4 @@ url: $baseurl/chat/$nick -requires: local_user +requires: local_channel name: My chatrooms photo: $baseurl/app/chat.png diff --git a/app/connections.apd b/app/connections.apd index 146e553e5..f4b5ad87a 100644 --- a/app/connections.apd +++ b/app/connections.apd @@ -1,4 +1,4 @@ url: $baseurl/connections -requires: local_user +requires: local_channel name: Connections photo: $baseurl/app/connections.png diff --git a/app/events.apd b/app/events.apd index 2f43efbe1..dd725e177 100644 --- a/app/events.apd +++ b/app/events.apd @@ -1,4 +1,4 @@ url: $baseurl/events -requires: local_user +requires: local_channel name: Events photo: $baseurl/app/events.png diff --git a/app/features.apd b/app/features.apd index 3d01e841c..521df4794 100644 --- a/app/features.apd +++ b/app/features.apd @@ -1,4 +1,4 @@ url: $baseurl/settings/features -requires: local_user +requires: local_channel name: Features photo: $baseurl/app/features.png diff --git a/app/invite.apd b/app/invite.apd index 8526d2d4a..96bafff14 100644 --- a/app/invite.apd +++ b/app/invite.apd @@ -1,4 +1,4 @@ url: $baseurl/invite -requires: local_user +requires: local_channel name: Invite photo: $baseurl/app/invite.png diff --git a/app/mail.apd b/app/mail.apd index e916829ad..b9fdb9967 100644 --- a/app/mail.apd +++ b/app/mail.apd @@ -1,4 +1,4 @@ url: $baseurl/message -requires: local_user +requires: local_channel name: Mail photo: $baseurl/app/mail.png diff --git a/app/manage.apd b/app/manage.apd index 2e0a92d74..27938e4cf 100644 --- a/app/manage.apd +++ b/app/manage.apd @@ -1,4 +1,4 @@ url: $baseurl/manage -requires: local_user +requires: local_channel name: Channel Manager photo: $baseurl/app/manage.png diff --git a/app/matrix.apd b/app/matrix.apd index 96df48690..68188bfd3 100644 --- a/app/matrix.apd +++ b/app/matrix.apd @@ -1,4 +1,4 @@ url: $baseurl/network -requires: local_user +requires: local_channel name: Matrix photo: $baseurl/app/matrix.png diff --git a/app/mood.apd b/app/mood.apd index ef90650f0..6f381fd44 100644 --- a/app/mood.apd +++ b/app/mood.apd @@ -1,4 +1,4 @@ url: $baseurl/mood -requires: local_user +requires: local_channel name: Mood photo: $baseurl/app/mood.png diff --git a/app/photos.apd b/app/photos.apd index d0a314406..3422d5205 100644 --- a/app/photos.apd +++ b/app/photos.apd @@ -1,4 +1,4 @@ url: $baseurl/photos/$nick -requires: local_user +requires: local_channel name: Photos photo: $baseurl/app/photos.png diff --git a/app/poke.apd b/app/poke.apd index b7d189224..7e3bb4ff0 100644 --- a/app/poke.apd +++ b/app/poke.apd @@ -1,4 +1,4 @@ url: $baseurl/poke -requires: local_user +requires: local_channel name: Poke photo: $baseurl/app/poke.png diff --git a/app/pphoto.apd b/app/pphoto.apd index e7da9cf9c..302b85d9e 100644 --- a/app/pphoto.apd +++ b/app/pphoto.apd @@ -1,4 +1,4 @@ url: $baseurl/profile_photo -requires: local_user +requires: local_channel name: Profile Photo photo: $baseurl/app/pphoto.png diff --git a/app/probe.apd b/app/probe.apd index e2d2428a0..e1ab5fc43 100644 --- a/app/probe.apd +++ b/app/probe.apd @@ -1,4 +1,4 @@ url: $baseurl/probe -requires: local_user +requires: local_channel name: Remote diagnostics photo: $baseurl/app/probe.png diff --git a/app/profile.apd b/app/profile.apd index d2bdf23a7..d353d5742 100644 --- a/app/profile.apd +++ b/app/profile.apd @@ -1,4 +1,4 @@ url: $baseurl/profile/$nick -requires: local_user +requires: local_channel name: View profile photo: $baseurl/app/profile.png diff --git a/app/settings.apd b/app/settings.apd index 311f793ff..fbb5eacdd 100644 --- a/app/settings.apd +++ b/app/settings.apd @@ -1,4 +1,4 @@ url: $baseurl/settings -requires: local_user +requires: local_channel name: Settings photo: $baseurl/app/settings.png diff --git a/app/storage.apd b/app/storage.apd index 5900faae8..c959a3cd4 100644 --- a/app/storage.apd +++ b/app/storage.apd @@ -1,4 +1,4 @@ url: $baseurl/cloud/$nick -requires: local_user +requires: local_channel name: Files photo: $baseurl/app/storage.png diff --git a/app/suggest.apd b/app/suggest.apd index f4ca79410..f3d17e0ea 100644 --- a/app/suggest.apd +++ b/app/suggest.apd @@ -1,4 +1,4 @@ url: $baseurl/suggest -requires: local_user +requires: local_channel name: Suggest channels photo: $baseurl/app/suggest.png diff --git a/app/webpages.apd b/app/webpages.apd index 7c7528d6b..78e7abba8 100644 --- a/app/webpages.apd +++ b/app/webpages.apd @@ -1,4 +1,4 @@ url: $baseurl/webpages/$nick -requires: local_user, webpages +requires: local_channel, webpages name: Webpages photo: $baseurl/app/webpages.png diff --git a/boot.php b/boot.php index 969a4f578..f35e6586b 100755 --- a/boot.php +++ b/boot.php @@ -1004,11 +1004,11 @@ class App { function build_pagehead() { - $user_scalable = ((local_user()) ? get_pconfig(local_user(),'system','user_scalable') : 1); + $user_scalable = ((local_channel()) ? get_pconfig(local_channel(),'system','user_scalable') : 1); if ($user_scalable === false) $user_scalable = 1; - $interval = ((local_user()) ? get_pconfig(local_user(),'system','update_interval') : 80000); + $interval = ((local_channel()) ? get_pconfig(local_channel(),'system','update_interval') : 80000); if($interval < 10000) $interval = 80000; @@ -1023,7 +1023,7 @@ class App { $this->page['htmlhead'] = replace_macros($tpl, array( '$user_scalable' => $user_scalable, '$baseurl' => $this->get_baseurl(), - '$local_user' => local_user(), + '$local_channel' => local_channel(), '$generator' => RED_PLATFORM . ' ' . RED_VERSION, '$update_interval' => $interval, '$icon' => head_get_icon(), @@ -1529,7 +1529,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) { $dest_url = $a->get_baseurl(true) . '/' . $a->query_string; - if(local_user()) { + if(local_channel()) { $tpl = get_markup_template("logout.tpl"); } else { @@ -1603,7 +1603,7 @@ function get_account_id() { * * @return int|bool channel_id or false */ -function local_user() { +function local_channel() { if((x($_SESSION, 'authenticated')) && (x($_SESSION, 'uid'))) return intval($_SESSION['uid']); @@ -1744,7 +1744,7 @@ function current_theme(){ // Find the theme that belongs to the channel whose stuff we are looking at - if($a->profile_uid && $a->profile_uid != local_user()) { + if($a->profile_uid && $a->profile_uid != local_channel()) { $r = q("select channel_theme from channel where channel_id = %d limit 1", intval($a->profile_uid) ); @@ -1759,8 +1759,8 @@ function current_theme(){ // The default is for channel themes to take precedence over your own on pages belonging // to that channel. - if($page_theme && local_user() && local_user() != $a->profile_url) { - if(get_pconfig(local_user(),'system','always_my_theme')) + if($page_theme && local_channel() && local_channel() != $a->profile_url) { + if(get_pconfig(local_channel(),'system','always_my_theme')) $page_theme = null; } diff --git a/doc/Plugins.md b/doc/Plugins.md index b657f5ceb..e3e4688d9 100644 --- a/doc/Plugins.md +++ b/doc/Plugins.md @@ -93,10 +93,10 @@ Let's go ahead and add some code to implement our post_local hook handler. logger('randplace invoked'); - if(! local_user()) /* non-zero if this is a logged in user of this system */ + if(! local_channel()) /* non-zero if this is a logged in user of this system */ return; - if(local_user() != $item['uid']) /* Does this person own the post? */ + if(local_channel() != $item['uid']) /* Does this person own the post? */ return; if(($item['parent']) || ($item['item_restrict'])) { @@ -106,7 +106,7 @@ Let's go ahead and add some code to implement our post_local hook handler. /* Retrieve our personal config setting */ - $active = get_pconfig(local_user(), 'randplace', 'enable'); + $active = get_pconfig(local_channel(), 'randplace', 'enable'); if(! $active) return; @@ -148,10 +148,10 @@ Now let's add our functions to create and store preference settings. */ function randplace_settings_post($a,$post) { - if(! local_user()) + if(! local_channel()) return; if($_POST['randplace-submit']) - set_pconfig(local_user(),'randplace','enable',intval($_POST['randplace'])); + set_pconfig(local_channel(),'randplace','enable',intval($_POST['randplace'])); } @@ -175,7 +175,7 @@ Now let's add our functions to create and store preference settings. function randplace_settings(&$a,&$s) { - if(! local_user()) + if(! local_channel()) return; /* Add our stylesheet to the page so we can make our settings look nice */ @@ -184,7 +184,7 @@ Now let's add our functions to create and store preference settings. /* Get the current state of our config variable */ - $enabled = get_pconfig(local_user(),'randplace','enable'); + $enabled = get_pconfig(local_channel(),'randplace','enable'); $checked = (($enabled) ? ' checked="checked" ' : ''); diff --git a/doc/dev-function-overview.md b/doc/dev-function-overview.md index 5e382201f..fa2bbac00 100644 --- a/doc/dev-function-overview.md +++ b/doc/dev-function-overview.md @@ -7,7 +7,7 @@ Red development - some useful basic functions Returns numeric account_id if authenticated or 0. It is possible to be authenticated and not connected to a channel. -* local_user() +* local_channel() Returns authenticated numeric channel_id if authenticated and connected to a channel or 0. Sometimes referred to as $uid in the code. diff --git a/doc/developer_function_primer.bb b/doc/developer_function_primer.bb index 3db853b82..33fb1f51f 100644 --- a/doc/developer_function_primer.bb +++ b/doc/developer_function_primer.bb @@ -4,7 +4,7 @@ Returns numeric account_id if authenticated or 0. It is possible to be authenticated and not connected to a channel. -[b]local_user()[/b] +[b]local_channel()[/b] Returns authenticated numeric channel_id if authenticated and connected to a channel or 0. Sometimes referred to as $uid in the code. diff --git a/doc/html/boot_8php.html b/doc/html/boot_8php.html index 8305436d9..299ee9c48 100644 --- a/doc/html/boot_8php.html +++ b/doc/html/boot_8php.html @@ -160,7 +160,7 @@ Functions  get_account_id ()  Returns the entity id of locally logged in account or false. More...
  - local_user () + local_channel ()  Returns the entity id (channel_id) of locally logged in user or false. More...
   remote_user () @@ -1484,7 +1484,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_user(), 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_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().

diff --git a/doc/html/boot_8php.js b/doc/html/boot_8php.js index 32cf1e11c..f2cc7a16b 100644 --- a/doc/html/boot_8php.js +++ b/doc/html/boot_8php.js @@ -32,7 +32,7 @@ var boot_8php = [ "killme", "boot_8php.html#aea7fc57a4d8e9dcb42f2601b0b9b761c", null ], [ "load_contact_links", "boot_8php.html#a719c7f3972d5f9268f37a41c76cd4ef6", null ], [ "load_pdl", "boot_8php.html#a50a6707a28c7d05d3f49eaabc7994501", null ], - [ "local_user", "boot_8php.html#ad4c9dc2c8a82e8f52b7404c1655eab44", null ], + [ "local_channel", "boot_8php.html#ad4c9dc2c8a82e8f52b7404c1655eab44", null ], [ "login", "boot_8php.html#aefecf8599036df7f1b95d6820e0e2fa4", null ], [ "notice", "boot_8php.html#a9255af5ae9c887520091ea04763c1a88", null ], [ "os_mkdir", "boot_8php.html#a5fbebdf7a1c0ea8f904dbd9d78c2c06c", null ], diff --git a/doc/html/comanche_8php.html b/doc/html/comanche_8php.html index aec807d58..c3a98f787 100644 --- a/doc/html/comanche_8php.html +++ b/doc/html/comanche_8php.html @@ -164,7 +164,7 @@ Functions
local_user local_channel ( )
-

comanche_get_channel_id() Returns the channel_id of the profile owner of the page, or the local_user if there is no profile owner. Otherwise returns 0

+

comanche_get_channel_id() Returns the channel_id of the profile owner of the page, or the local_channel if there is no profile owner. Otherwise returns 0

Referenced by comanche_block(), comanche_menu(), and load_pdl().

diff --git a/doc/html/globals_0x6c.html b/doc/html/globals_0x6c.html index ae7d1f29a..a4c4faca2 100644 --- a/doc/html/globals_0x6c.html +++ b/doc/html/globals_0x6c.html @@ -229,7 +229,7 @@ $(document).ready(function(){initNavTree('globals_0x6c.html','');});
  • local_dir_update() : dir_fns.php
  • -
  • local_user() +
  • local_channel() : boot.php
  • localize_item() diff --git a/doc/html/globals_func_0x6c.html b/doc/html/globals_func_0x6c.html index f688879dd..c65719712 100644 --- a/doc/html/globals_func_0x6c.html +++ b/doc/html/globals_func_0x6c.html @@ -222,7 +222,7 @@ $(document).ready(function(){initNavTree('globals_func_0x6c.html','');});
  • local_dir_update() : dir_fns.php
  • -
  • local_user() +
  • local_channel() : boot.php
  • localize_item() diff --git a/doc/html/include_2config_8php.html b/doc/html/include_2config_8php.html index 919350254..1d48f5be0 100644 --- a/doc/html/include_2config_8php.html +++ b/doc/html/include_2config_8php.html @@ -162,7 +162,7 @@ Functions
    Todo:
    There are a few places in the code (such as the admin panel) where boolean configurations need to be fixed as of 10/08/2011.
    • config is used for hub specific configurations. It overrides the configurations from .htconfig file. The storage is of size TEXT.
    • -
    • pconfig is used for channel specific configurations and takes a channel_id as identifier. It stores for example which features are enabled per channel. The storage is of size MEDIUMTEXT.
      $var = get_pconfig(local_user(), 'category', 'key');
      +
    • pconfig is used for channel specific configurations and takes a channel_id as identifier. It stores for example which features are enabled per channel. The storage is of size MEDIUMTEXT.
      $var = get_pconfig(local_channel(), 'category', 'key');
    • xconfig is the same as pconfig, except that it uses xchan as an identifier. This is for example for people who do not have a local account. The storage is of size MEDIUMTEXT.
      $observer = $a->get_observer_hash();
      if ($observer) {
      diff --git a/doc/html/redstrap_2php_2style_8php.html b/doc/html/redstrap_2php_2style_8php.html index 2642f697d..997721e19 100644 --- a/doc/html/redstrap_2php_2style_8php.html +++ b/doc/html/redstrap_2php_2style_8php.html @@ -144,7 +144,7 @@ Variables    $site_colour = get_config("redbasic", "colour" )   -if(local_user()) if($line_height===false)
      +if(local_channel()) if($line_height===false)
      if($line_height===false) if($redbasic_font_size===false)
      if($redbasic_font_size===false)
      if($colour===false) if($colour===false)
      @@ -365,7 +365,7 @@ if($navcolour==="black")  - +
      if (local_user()) if ($line_height===false) if ($line_height===false) if ($redbasic_font_size===false) if ($redbasic_font_size===false) if ($colour===false) if ($colour===false) if ($navcolour==="black") if(file_exists('view/theme/'.current_theme(). '/css/style.css'))if (local_channel()) if ($line_height===false) if ($line_height===false) if ($redbasic_font_size===false) if ($redbasic_font_size===false) if ($colour===false) if ($colour===false) if ($navcolour==="black") if(file_exists('view/theme/'.current_theme(). '/css/style.css'))
      diff --git a/doc/html/search/all_6c.js b/doc/html/search/all_6c.js index ce2b942e1..2533e2f2e 100644 --- a/doc/html/search/all_6c.js +++ b/doc/html/search/all_6c.js @@ -34,7 +34,7 @@ var searchData= ['load_5ftranslation_5ftable',['load_translation_table',['../language_8php.html#a7e9904c730bb24ddcb0ff50fc96f6b05',1,'language.php']]], ['load_5fxconfig',['load_xconfig',['../include_2config_8php.html#aee4b619839cf4b64220f34edf5c67b52',1,'config.php']]], ['local_5fdir_5fupdate',['local_dir_update',['../dir__fns_8php.html#acd37b17dce3bdec6d5a6344a20598c1e',1,'dir_fns.php']]], - ['local_5fuser',['local_user',['../boot_8php.html#ad4c9dc2c8a82e8f52b7404c1655eab44',1,'boot.php']]], + ['local_5fuser',['local_channel',['../boot_8php.html#ad4c9dc2c8a82e8f52b7404c1655eab44',1,'boot.php']]], ['localize_5fitem',['localize_item',['../conversation_8php.html#a9bd7f9fb6678736c581bcba3b17f471c',1,'conversation.php']]], ['lockview_2ephp',['lockview.php',['../lockview_8php.html',1,'']]], ['lockview_5fcontent',['lockview_content',['../lockview_8php.html#a851e26ab9a1008df5c5ebebea31e9b44',1,'lockview.php']]], diff --git a/doc/html/search/functions_6c.js b/doc/html/search/functions_6c.js index 84ff90de3..7ce236bc0 100644 --- a/doc/html/search/functions_6c.js +++ b/doc/html/search/functions_6c.js @@ -27,7 +27,7 @@ var searchData= ['load_5ftranslation_5ftable',['load_translation_table',['../language_8php.html#a7e9904c730bb24ddcb0ff50fc96f6b05',1,'language.php']]], ['load_5fxconfig',['load_xconfig',['../include_2config_8php.html#aee4b619839cf4b64220f34edf5c67b52',1,'config.php']]], ['local_5fdir_5fupdate',['local_dir_update',['../dir__fns_8php.html#acd37b17dce3bdec6d5a6344a20598c1e',1,'dir_fns.php']]], - ['local_5fuser',['local_user',['../boot_8php.html#ad4c9dc2c8a82e8f52b7404c1655eab44',1,'boot.php']]], + ['local_5fuser',['local_channel',['../boot_8php.html#ad4c9dc2c8a82e8f52b7404c1655eab44',1,'boot.php']]], ['localize_5fitem',['localize_item',['../conversation_8php.html#a9bd7f9fb6678736c581bcba3b17f471c',1,'conversation.php']]], ['lockview_5fcontent',['lockview_content',['../lockview_8php.html#a851e26ab9a1008df5c5ebebea31e9b44',1,'lockview.php']]], ['locs_5fcontent',['locs_content',['../locs_8php.html#a6c900f53970c0d0e738d2fe06d27ca44',1,'locs.php']]], diff --git a/doc/html/style_8php.html b/doc/html/style_8php.html index 93d2929a6..ccd1aee87 100644 --- a/doc/html/style_8php.html +++ b/doc/html/style_8php.html @@ -144,7 +144,7 @@ Variables    $site_colour = get_config("redbasic", "colour" )   -if(local_user()) if(!feature_enabled(local_user(),'expert'))
      +if(local_channel()) if(!feature_enabled(local_channel(),'expert'))
      if($line_height===false) if($line_height===false)
      if($redbasic_font_size===false)
      if($redbasic_font_size===false)
      diff --git a/doc/html/theme_2blogga_2view_2theme_2blog_2default_8php.html b/doc/html/theme_2blogga_2view_2theme_2blog_2default_8php.html index 75ab5e589..3abf19ff5 100644 --- a/doc/html/theme_2blogga_2view_2theme_2blog_2default_8php.html +++ b/doc/html/theme_2blogga_2view_2theme_2blog_2default_8php.html @@ -137,7 +137,7 @@ Variables
      - +
      if (local_user()) $headimg = get_config('blogtheme', 'headimg')if (local_channel()) $headimg = get_config('blogtheme', 'headimg')
      diff --git a/doc/plugins.bb b/doc/plugins.bb index 06801eb20..7f1684117 100644 --- a/doc/plugins.bb +++ b/doc/plugins.bb @@ -91,10 +91,10 @@ Let's go ahead and add some code to implement our post_local hook handler. logger('randplace invoked'); - if(! local_user()) /* non-zero if this is a logged in user of this system */ + if(! local_channel()) /* non-zero if this is a logged in user of this system */ return; - if(local_user() != $item['uid']) /* Does this person own the post? */ + if(local_channel() != $item['uid']) /* Does this person own the post? */ return; if(($item['parent']) || ($item['item_restrict'])) { @@ -104,7 +104,7 @@ Let's go ahead and add some code to implement our post_local hook handler. /* Retrieve our personal config setting */ - $active = get_pconfig(local_user(), 'randplace', 'enable'); + $active = get_pconfig(local_channel(), 'randplace', 'enable'); if(! $active) return; @@ -146,10 +146,10 @@ Now let's add our functions to create and store preference settings. */ function randplace_settings_post($a,$post) { - if(! local_user()) + if(! local_channel()) return; if($_POST['randplace-submit']) - set_pconfig(local_user(),'randplace','enable',intval($_POST['randplace'])); + set_pconfig(local_channel(),'randplace','enable',intval($_POST['randplace'])); } @@ -173,7 +173,7 @@ Now let's add our functions to create and store preference settings. function randplace_settings(&$a,&$s) { - if(! local_user()) + if(! local_channel()) return; /* Add our stylesheet to the page so we can make our settings look nice */ @@ -182,7 +182,7 @@ Now let's add our functions to create and store preference settings. /* Get the current state of our config variable */ - $enabled = get_pconfig(local_user(),'randplace','enable'); + $enabled = get_pconfig(local_channel(),'randplace','enable'); $checked = (($enabled) ? ' checked="checked" ' : ''); diff --git a/doc/sql_conventions.bb b/doc/sql_conventions.bb index 88539ae19..2deb3cff6 100644 --- a/doc/sql_conventions.bb +++ b/doc/sql_conventions.bb @@ -10,7 +10,7 @@ Worth Repeating: Don't use non-standard SQL. This goes for addons as well. If yo To be written [code]// Example $r = q("SELECT * FROM profile WHERE uid = %d", - local_user() + local_channel() ); [/code][/li] diff --git a/include/Contact.php b/include/Contact.php index 4c80f5d6a..66062c279 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -98,10 +98,10 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { // FIXME - show connect button to observer if appropriate $connect = false; - if(local_user()) { + if(local_channel()) { $r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1", dbesc($xchan['xchan_hash']), - intval(local_user()) + intval(local_channel()) ); if(! $r) $connect = t('Connect'); @@ -351,7 +351,7 @@ function channel_remove($channel_id, $local = true, $unset_session=true) { proc_run('php','include/directory.php',$channel_id); - if($channel_id == local_user() && $unset_session) { + if($channel_id == local_channel() && $unset_session) { unset($_SESSION['authenticated']); unset($_SESSION['uid']); goaway($a->get_baseurl()); diff --git a/include/ConversationObject.php b/include/ConversationObject.php index 7dc4c8c19..af0bb8d2c 100644 --- a/include/ConversationObject.php +++ b/include/ConversationObject.php @@ -33,7 +33,7 @@ class Conversation extends BaseObject { $this->set_mode($mode); $this->preview = $preview; $this->prepared_item = $prepared_item; - $c = ((local_user()) ? get_pconfig(local_user(),'system','default_cipher') : ''); + $c = ((local_channel()) ? get_pconfig(local_channel(),'system','default_cipher') : ''); if($c) $this->cipher = $c; } @@ -57,7 +57,7 @@ class Conversation extends BaseObject { // $this->writable = false; // } // else { - $this->profile_owner = local_user(); + $this->profile_owner = local_channel(); $this->writable = true; // } break; diff --git a/include/ItemObject.php b/include/ItemObject.php index 82a321732..344664fd2 100644 --- a/include/ItemObject.php +++ b/include/ItemObject.php @@ -84,11 +84,11 @@ class Item extends BaseObject { $conv = $this->get_conversation(); $observer = $conv->get_observer(); - $lock = ((($item['item_private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) + $lock = ((($item['item_private'] == 1) || (($item['uid'] == local_channel()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) ? t('Private Message') : false); - $shareable = ((($conv->get_profile_owner() == local_user() && local_user()) && ($item['item_private'] != 1)) ? true : false); + $shareable = ((($conv->get_profile_owner() == local_channel() && local_channel()) && ($item['item_private'] != 1)) ? true : false); // allow an exemption for sharing stuff from your private feeds if($item['author']['xchan_network'] === 'rss') @@ -96,7 +96,7 @@ class Item extends BaseObject { $mode = $conv->get_mode(); - if(local_user() && $observer['xchan_hash'] === $item['author_xchan']) + if(local_channel() && $observer['xchan_hash'] === $item['author_xchan']) $edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit")); else $edpost = false; @@ -104,7 +104,7 @@ class Item extends BaseObject { if($observer['xchan_hash'] == $this->get_data_value('author_xchan') || $observer['xchan_hash'] == $this->get_data_value('owner_xchan') - || $this->get_data_value('uid') == local_user()) + || $this->get_data_value('uid') == local_channel()) $dropping = true; @@ -127,7 +127,7 @@ class Item extends BaseObject { ); } - $filer = ((($conv->get_profile_owner() == local_user()) && (! array_key_exists('real_uid',$item))) ? t("Save to Folder") : false); + $filer = ((($conv->get_profile_owner() == local_channel()) && (! array_key_exists('real_uid',$item))) ? t("Save to Folder") : false); $profile_avatar = $item['author']['xchan_photo_m']; $profile_link = chanlink_url($item['author']['xchan_url']); @@ -171,7 +171,7 @@ class Item extends BaseObject { if($this->is_toplevel()) { // FIXME check this permission - if(($conv->get_profile_owner() == local_user()) && (! array_key_exists('real_uid',$item))) { + if(($conv->get_profile_owner() == local_channel()) && (! array_key_exists('real_uid',$item))) { // FIXME we don't need all this stuff, some can be done in the template @@ -198,7 +198,7 @@ class Item extends BaseObject { // FIXME - check this permission - if($conv->get_profile_owner() == local_user()) { + if($conv->get_profile_owner() == local_channel()) { $tagger = array( 'tagit' => t("Add Tag"), 'classtagger' => "", @@ -214,7 +214,7 @@ class Item extends BaseObject { } $has_event = false; - if(($item['obj_type'] === ACTIVITY_OBJ_EVENT) && $conv->get_profile_owner() == local_user()) + if(($item['obj_type'] === ACTIVITY_OBJ_EVENT) && $conv->get_profile_owner() == local_channel()) $has_event = true; if($this->is_commentable()) { @@ -296,7 +296,7 @@ class Item extends BaseObject { 'star' => ((feature_enabled($conv->get_profile_owner(),'star_posts')) ? $star : ''), 'tagger' => ((feature_enabled($conv->get_profile_owner(),'commtag')) ? $tagger : ''), 'filer' => ((feature_enabled($conv->get_profile_owner(),'filing')) ? $filer : ''), - 'bookmark' => (($conv->get_profile_owner() == local_user() && local_user() && $has_bookmarks) ? t('Save Bookmarks') : ''), + 'bookmark' => (($conv->get_profile_owner() == local_channel() && local_channel() && $has_bookmarks) ? t('Save Bookmarks') : ''), 'addtocal' => (($has_event) ? t('Add to Calendar') : ''), 'drop' => $drop, 'multidrop' => ((feature_enabled($conv->get_profile_owner(),'multi_delete')) ? $multidrop : ''), @@ -610,7 +610,7 @@ class Item extends BaseObject { $a = $this->get_app(); $observer = $conv->get_observer(); - $qc = ((local_user()) ? get_pconfig(local_user(),'system','qcomment') : null); + $qc = ((local_channel()) ? get_pconfig(local_channel(),'system','qcomment') : null); $qcomment = (($qc) ? explode("\n",$qc) : null); $comment_box = replace_macros($template,array( diff --git a/include/RedDAV/RedBrowser.php b/include/RedDAV/RedBrowser.php index 8093aebc9..e651562ec 100644 --- a/include/RedDAV/RedBrowser.php +++ b/include/RedDAV/RedBrowser.php @@ -76,7 +76,7 @@ class RedBrowser extends DAV\Browser\Plugin { */ public function generateDirectoryIndex($path) { // (owner_id = channel_id) is visitor owner of this directory? - $is_owner = ((local_user() && $this->auth->owner_id == local_user()) ? true : false); + $is_owner = ((local_channel() && $this->auth->owner_id == local_channel()) ? true : false); if ($this->auth->getTimezone()) date_default_timezone_set($this->auth->getTimezone()); diff --git a/include/account.php b/include/account.php index 88036e2ef..19c13d5bd 100644 --- a/include/account.php +++ b/include/account.php @@ -561,7 +561,7 @@ function downgrade_accounts() { function service_class_allows($uid,$property,$usage = false) { $a = get_app(); - if($uid == local_user()) { + if($uid == local_channel()) { $service_class = $a->account['account_service_class']; } else { @@ -619,7 +619,7 @@ function account_service_class_allows($aid,$property,$usage = false) { function service_class_fetch($uid,$property) { $a = get_app(); - if($uid == local_user()) { + if($uid == local_channel()) { $service_class = $a->account['account_service_class']; } else { diff --git a/include/acl_selectors.php b/include/acl_selectors.php index 243e7a549..ae740b281 100644 --- a/include/acl_selectors.php +++ b/include/acl_selectors.php @@ -15,7 +15,7 @@ function group_select($selname,$selclass,$preselected = false,$size = 4) { $o .= "