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 --- 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 +- .../theme_2blogga_2view_2theme_2blog_2default_8php.html | 2 +- doc/plugins.bb | 14 +++++++------- doc/sql_conventions.bb | 2 +- 16 files changed, 31 insertions(+), 31 deletions(-) (limited to 'doc') 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] -- cgit v1.2.3