diff --git a/boot.php b/boot.php
index 6c958465a..b37f51b9b 100644
--- a/boot.php
+++ b/boot.php
@@ -4,8 +4,9 @@
/**
* Red.
*
- * Red is an open source decentralised communications platform wrapped in
- * an extensible content management framework, providing website designers
+ * Red is an open source decentralised communications platform combined with
+ * a decentralised identity/authentication framework wrapped in
+ * an extensible content management system, providing website designers
* the ability to embed fully decentralised communications and social tools
* into many traditional website designs (blogs, forums, small business
* websites, charitable organisations, etc.). Red also provides DNS mobility
@@ -40,7 +41,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1038 );
+define ( 'DB_UPDATE_VERSION', 1039 );
define ( 'EOL', '
' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
diff --git a/doc/html/account_8php.html b/doc/html/account_8php.html
index cddddadcd..df899466e 100644
--- a/doc/html/account_8php.html
+++ b/doc/html/account_8php.html
@@ -237,7 +237,7 @@ Functions
Referenced by register_post().
+Referenced by create_dir_account(), and register_post().
Referenced by App\__construct(), _well_known_init(), admin_content(), admin_page_dbsync(), admin_page_users(), admin_post(), allfriends_content(), api_get_user(), attach_init(), channel_content(), channel_init(), common_init(), connections_content(), connections_init(), contactgroup_content(), display_content(), editpost_content(), events_content(), feed_init(), group_content(), group_post(), like_content(), lockview_content(), manage_content(), message_content(), new_channel_init(), notify_init(), oembed_init(), oexchange_content(), oexchange_init(), page_content(), photo_init(), photos_content(), photos_init(), photos_post(), ping_init(), poco_init(), poller_run(), post_init(), profile_init(), profile_photo_post(), profiles_aside(), profiles_content(), profiles_init(), profiles_post(), queue_run(), register_init(), regmod_content(), settings_aside(), settings_post(), setup_init(), share_init(), starred_init(), tagger_content(), uexport_init(), update_channel_content(), update_display_content(), update_network_content(), viewconnections_init(), viewsrc_content(), wall_attach_post(), wall_upload_post(), and zotfeed_init().
+Referenced by App\__construct(), _well_known_init(), admin_content(), admin_page_dbsync(), admin_page_users(), admin_post(), allfriends_content(), api_get_user(), attach_init(), channel_content(), channel_init(), common_init(), connections_content(), connections_init(), contactgroup_content(), display_content(), editpost_content(), events_content(), feed_init(), group_content(), group_post(), like_content(), lockview_content(), manage_content(), message_content(), new_channel_init(), notify_init(), oembed_init(), oexchange_content(), oexchange_init(), page_content(), photo_init(), photos_content(), photos_init(), photos_post(), ping_init(), poco_init(), poller_run(), post_init(), profile_init(), profile_photo_post(), profiles_aside(), profiles_content(), profiles_init(), profiles_post(), queue_run(), register_init(), regmod_content(), settings_aside(), settings_post(), setup_init(), share_init(), starred_init(), subthread_content(), tagger_content(), uexport_init(), update_channel_content(), update_display_content(), update_network_content(), viewconnections_init(), viewsrc_content(), wall_attach_post(), wall_upload_post(), and zotfeed_init().
Referenced by App\__construct(), _well_known_init(), admin_content(), admin_page_dbsync(), admin_page_users(), admin_post(), allfriends_content(), api_get_user(), api_statuses_destroy(), api_statuses_repeat(), api_statuses_show(), attach_init(), channel_content(), channel_init(), common_init(), connections_content(), connections_init(), connections_post(), contactgroup_content(), display_content(), editpost_content(), events_content(), feed_init(), group_content(), group_post(), like_content(), lockview_content(), manage_content(), message_aside(), message_content(), new_channel_init(), notify_init(), oembed_init(), oexchange_content(), oexchange_init(), page_content(), photo_init(), photos_content(), photos_init(), photos_post(), ping_init(), poco_init(), poller_run(), post_init(), profile_init(), profile_photo_post(), profile_tabs(), profiles_aside(), profiles_content(), profiles_init(), profiles_post(), queue_run(), register_init(), regmod_content(), settings_aside(), settings_post(), setup_init(), share_init(), starred_init(), tagger_content(), uexport_init(), update_channel_content(), update_display_content(), update_network_content(), view_init(), viewconnections_init(), viewsrc_content(), wall_attach_post(), wall_upload_post(), and zotfeed_init().
+Referenced by App\__construct(), _well_known_init(), admin_content(), admin_page_dbsync(), admin_page_users(), admin_post(), allfriends_content(), api_get_user(), api_statuses_destroy(), api_statuses_repeat(), api_statuses_show(), attach_init(), channel_content(), channel_init(), common_init(), connections_content(), connections_init(), connections_post(), contactgroup_content(), display_content(), editpost_content(), events_content(), feed_init(), group_content(), group_post(), like_content(), lockview_content(), manage_content(), message_aside(), message_content(), new_channel_init(), notify_init(), oembed_init(), oexchange_content(), oexchange_init(), page_content(), photo_init(), photos_content(), photos_init(), photos_post(), ping_init(), poco_init(), poller_run(), post_init(), profile_init(), profile_photo_post(), profile_tabs(), profiles_aside(), profiles_content(), profiles_init(), profiles_post(), queue_run(), register_init(), regmod_content(), settings_aside(), settings_post(), setup_init(), share_init(), starred_init(), subthread_content(), tagger_content(), uexport_init(), update_channel_content(), update_display_content(), update_network_content(), view_init(), viewconnections_init(), viewsrc_content(), wall_attach_post(), wall_upload_post(), and zotfeed_init().
Referenced by FriendicaSmarty\__construct(), App\__construct(), acl_init(), 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(), attach_store(), authenticate_success(), bbcode(), bbtoevent(), best_link_url(), channel_aside(), channel_content(), check_config(), check_form_security_token(), community_content(), connections_aside(), connections_content(), connections_post(), construct_page(), consume_feed(), create_account(), create_identity(), crepair_init(), crepair_post(), current_theme(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), detect_language(), directory_content(), dirfind_init(), dirsearch_content(), encode_rel_links(), events_content(), events_post(), feed_init(), filerm_content(), get_atom_elements(), App\get_baseurl(), get_browser_language(), get_item_elements(), get_max_import_size(), get_my_address(), get_my_url(), get_plink(), get_public_feed(), Item\get_template_data(), group_add(), group_rmv(), hcard_init(), import_post(), import_xchan(), info(), intro_content(), invite_post(), item_post(), item_store(), item_store_update(), lang_selector(), load_contact_links(), local_delivery(), local_user(), lostpass_content(), lrdd(), magic_init(), mail_store(), message_content(), message_post(), mood_content(), mood_init(), nav(), navbar_complete(), network_content(), network_init(), network_query_get_sel_tab(), new_channel_content(), nogroup_init(), notice(), notifications_content(), oexchange_content(), parse_url_content(), photo_upload(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_content(), poke_init(), printable(), probe_content(), proc_run(), process_delivery(), profile_photo_post(), profile_sidebar(), profile_tabs(), profiles_post(), dba\q(), qsearch_init(), redir_init(), register_content(), register_post(), regmod_content(), remote_user(), removeme_post(), saved_searches(), search_ac_init(), search_content(), search_init(), search_post(), service_class_allows(), service_class_fetch(), App\set_baseurl(), settings_post(), setup_content(), setup_init(), siteinfo_init(), suggest_init(), t(), tagrm_post(), tt(), validate_channelname(), wall_upload_post(), webfinger_content(), wfinger_init(), xchan_content(), z_fetch_url(), zfinger_init(), and zperms_init().
+Referenced by FriendicaSmarty\__construct(), App\__construct(), acl_init(), 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(), attach_store(), authenticate_success(), bbcode(), bbtoevent(), best_link_url(), channel_aside(), channel_content(), check_config(), check_form_security_token(), community_content(), connections_aside(), connections_content(), connections_post(), construct_page(), consume_feed(), create_account(), create_identity(), crepair_init(), crepair_post(), current_theme(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), detect_language(), directory_content(), dirfind_init(), dirsearch_content(), encode_rel_links(), events_content(), events_post(), feed_init(), filerm_content(), get_atom_elements(), App\get_baseurl(), get_browser_language(), get_item_elements(), get_max_import_size(), get_my_address(), get_my_url(), get_plink(), get_public_feed(), Item\get_template_data(), group_add(), group_rmv(), hcard_init(), import_post(), import_xchan(), info(), intro_content(), invite_post(), item_post(), item_store(), item_store_update(), lang_selector(), load_contact_links(), local_delivery(), local_user(), lostpass_content(), lrdd(), magic_init(), mail_store(), message_content(), message_post(), mood_content(), mood_init(), nav(), navbar_complete(), network_content(), network_init(), network_query_get_sel_tab(), new_channel_content(), nogroup_init(), notice(), notifications_content(), oexchange_content(), parse_url_content(), photo_upload(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_content(), poke_init(), printable(), probe_content(), proc_run(), process_delivery(), profile_photo_post(), profile_sidebar(), profile_tabs(), profiles_post(), dba\q(), qsearch_init(), redir_init(), register_content(), register_post(), regmod_content(), remote_user(), removeme_post(), saved_searches(), search_ac_init(), search_content(), search_init(), search_post(), service_class_allows(), service_class_fetch(), App\set_baseurl(), settings_post(), setup_content(), setup_init(), siteinfo_init(), suggest_init(), t(), tagrm_post(), tt(), validate_channelname(), wall_upload_post(), webfinger_content(), wfinger_init(), xchan_content(), z_fetch_url(), and zfinger_init().
Referenced by allowed_public_recips(), chanlink_cid(), chanlink_hash(), chanlink_url(), channel_content(), chanview_content(), check_config(), connections_content(), create_identity(), deliver_run(), directory_content(), display_content(), event_store(), follow_init(), format_css_if_exists(), format_js_if_exists(), group_post(), hostxrd_init(), import_post(), import_xchan(), intro_post(), item_store(), like_content(), login_content(), lostpass_content(), lostpass_post(), magic_init(), magiclink_url(), manage_content(), mood_init(), navbar_complete(), network_content(), new_channel_post(), notifications_post(), notifier_run(), photo_upload(), photos_album_widget(), photos_create_item(), post_init(), profile_activity(), public_recips(), redir_init(), register_post(), removeme_content(), rmagic_init(), rmagic_post(), search_content(), send_reg_approval_email(), send_verification_email(), setup_content(), siteinfo_content(), siteinfo_init(), user_allow(), vcard_from_xchan(), wfinger_init(), zfinger_init(), zid_init(), zot_build_packet(), zot_fetch(), zot_new_uid(), and zot_notify().
+Referenced by allowed_public_recips(), chanlink_cid(), chanlink_hash(), chanlink_url(), channel_content(), chanview_content(), check_config(), connections_content(), create_identity(), deliver_run(), directory_content(), display_content(), event_store(), follow_init(), format_css_if_exists(), format_js_if_exists(), group_post(), hostxrd_init(), import_post(), import_xchan(), intro_post(), item_store(), like_content(), login_content(), lostpass_content(), lostpass_post(), magic_init(), magiclink_url(), manage_content(), mood_init(), navbar_complete(), network_content(), new_channel_post(), notifications_post(), notifier_run(), photo_upload(), photos_album_widget(), photos_create_item(), post_init(), profile_activity(), public_recips(), redir_init(), register_post(), removeme_content(), rmagic_init(), rmagic_post(), search_content(), send_reg_approval_email(), send_verification_email(), setup_content(), siteinfo_content(), siteinfo_init(), user_allow(), vcard_from_xchan(), wfinger_init(), zfinger_init(), zid_init(), zot_build_packet(), zot_fetch(), and zot_new_uid().
const DB_UPDATE_VERSION 1036 | +const DB_UPDATE_VERSION 1039 |
Red.
+Red is an open source decentralised communications platform combined with a decentralised identity/authentication framework wrapped in an extensible content management system, providing website designers the ability to embed fully decentralised communications and social tools into many traditional website designs (blogs, forums, small business websites, charitable organisations, etc.). Red also provides DNS mobility and internet scale privacy/access control.
+This allows any individual website to participate in a matrix of linked sites and people and media sharing which is far greater than the reach of an individual site.
+If you are reading the source code and come across a function or code block which is not documented, but you have a good idea what it does, please add some descriptive comments and push it to the main project. Even if your description isn't perfect, it gives us a base which we can build on and correct - so that eventually everything is fully documented.
Referenced by api_statusnet_config(), App\build_pagehead(), identity_basic_export(), notification(), and siteinfo_init().
@@ -2275,7 +2281,7 @@ VariablesReferenced by create_identity(), import_author_xchan(), import_post(), import_xchan(), magic_init(), xchan_mail_query(), xchan_query(), zfinger_init(), zot_finger(), zot_get_hubloc(), zot_refresh(), and zperms_init().
+Referenced by create_identity(), import_author_xchan(), import_post(), import_xchan(), magic_init(), xchan_mail_query(), xchan_query(), zfinger_init(), zot_finger(), zot_get_hubloc(), and zot_refresh().
Referenced by zfinger_init(), and zperms_init().
+Referenced by zfinger_init().
const PAGE_DIRECTORY_CHANNEL 0x0008 | +
Referenced by create_dir_account().
+Referenced by zfinger_init().
+Referenced by create_dir_account(), and zfinger_init().
Referenced by api_statusnet_config(), magic_init(), zot_build_packet(), and zot_notify().
+Referenced by api_statusnet_config(), magic_init(), and zot_build_packet().
Referenced by post_post(), zfinger_init(), zot_build_packet(), zot_fetch(), and zot_notify().
+Referenced by post_post(), zfinger_init(), zot_build_packet(), and zot_fetch().
Referenced by create_identity(), fix_system_urls(), import_post(), magic_init(), zot_build_packet(), zot_fetch(), zot_notify(), and zperms_init().
+Referenced by create_identity(), fix_system_urls(), import_post(), magic_init(), zot_build_packet(), and zot_fetch().
Referenced by account_verify_password(), acl_init(), add_fcontact(), allowed_public_recips(), api_direct_messages_new(), api_get_user(), api_status_show(), api_statuses_mentions(), api_user(), api_users_show(), attach_by_hash(), attach_by_hash_nodata(), attach_count_files(), attach_list_files(), attach_store(), authenticate_success(), change_channel(), channel_content(), channelx_by_hash(), channelx_by_n(), channelx_by_nick(), chanview_content(), check_account_email(), check_account_invite(), check_webbie(), Cache\clear(), common_friends(), connections_content(), consume_feed(), contact_remove(), contactgroup_content(), count_common_friends(), create_account(), create_identity(), crepair_post(), dbesc_array_cb(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), delete_imported_item(), delete_item_lowlevel(), deliver_run(), dirsearch_content(), display_content(), editpost_content(), event_store(), events_content(), expand_groups(), fbrowser_content(), feed_init(), fetch_post_tags(), file_tag_file_query(), file_tag_save_file(), file_tag_unsave_file(), filerm_content(), fix_attached_photo_permissions(), fix_contact_ssl_policy(), fix_private_photos(), fix_system_urls(), fsuggest_post(), generate_user_guid(), Cache\get(), get_all_perms(), get_birthdays(), get_config(), get_events(), get_feed_for(), get_pconfig(), get_xconfig(), gprobe_run(), group_add(), group_add_member(), group_byname(), group_content(), group_post(), group_rmv(), group_rmv_member(), groups_containing(), handle_tag(), import_author_xchan(), import_directory_keywords(), import_directory_profile(), import_post(), import_profile_photo(), import_xchan(), invite_post(), item_message_id(), item_permissions_sql(), item_post(), item_store(), item_store_update(), like_content(), load_config(), load_pconfig(), load_xconfig(), local_delivery(), lockview_content(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_nonce(), FKOAuthDataStore\lookup_token(), lostpass_content(), lostpass_post(), magic_init(), mail_store(), member_of(), msearch_post(), network_content(), network_init(), FKOAuthDataStore\new_access_token(), new_contact(), new_cookie(), new_follower(), FKOAuthDataStore\new_request_token(), notification(), notifications_content(), notifier_run(), notify_init(), oauth_get_client(), onepoll_run(), page_content(), perm_is_allowed(), permissions_sql(), photo_init(), photo_new_resource(), photo_upload(), photos_album_exists(), photos_album_get_db_idstr(), photos_album_rename(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_init(), poller_run(), post_init(), post_post(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), process_delivery(), process_mail_delivery(), profile_init(), profile_load(), profile_photo_post(), profiles_init(), profiles_post(), public_permissions_sql(), public_recips(), qsearch_init(), queue_run(), redir_init(), register_post(), remove_all_xchan_resources(), remove_queue_item(), rmagic_init(), rmagic_post(), search_ac_init(), search_content(), search_init(), send_message(), send_reg_approval_email(), send_status_notifications(), Cache\set(), set_config(), set_pconfig(), set_xconfig(), settings_post(), siteinfo_init(), Photo\store(), store_item_tag(), stringify_array_elms(), subthread_content(), suggest_init(), suggestion_query(), syncdirs(), tag_deliver(), tagger_content(), tagrm_post(), term_query(), update_modtime(), update_queue_time(), user_allow(), user_deny(), vcard_from_xchan(), wall_attach_post(), wall_upload_post(), wfinger_init(), xchan_content(), xchan_mail_query(), xchan_query(), xrd_init(), z_readdir(), zfinger_init(), zid_init(), zot_finger(), zot_get_hubloc(), zot_gethub(), zot_process_response(), zot_refresh(), zotfeed_init(), and zperms_init().
+Referenced by account_verify_password(), acl_init(), add_fcontact(), allowed_public_recips(), api_direct_messages_new(), api_get_user(), api_status_show(), api_statuses_mentions(), api_user(), api_users_show(), attach_by_hash(), attach_by_hash_nodata(), attach_count_files(), attach_list_files(), attach_store(), authenticate_success(), change_channel(), channel_content(), channelx_by_hash(), channelx_by_n(), channelx_by_nick(), chanview_content(), check_account_email(), check_account_invite(), check_webbie(), Cache\clear(), common_friends(), connections_content(), consume_feed(), contact_remove(), contactgroup_content(), count_common_friends(), create_account(), create_identity(), crepair_post(), dbesc_array_cb(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), delete_imported_item(), delete_item_lowlevel(), deliver_run(), dirsearch_content(), display_content(), editpost_content(), event_store(), events_content(), expand_groups(), fbrowser_content(), feed_init(), fetch_post_tags(), file_tag_file_query(), file_tag_save_file(), file_tag_unsave_file(), filerm_content(), fix_attached_photo_permissions(), fix_contact_ssl_policy(), fix_private_photos(), fix_system_urls(), fsuggest_post(), generate_user_guid(), Cache\get(), get_all_perms(), get_birthdays(), get_config(), get_events(), get_feed_for(), get_pconfig(), get_xconfig(), gprobe_run(), group_add(), group_add_member(), group_byname(), group_content(), group_post(), group_rmv(), group_rmv_member(), groups_containing(), handle_tag(), import_author_xchan(), import_directory_keywords(), import_directory_profile(), import_post(), import_profile_photo(), import_xchan(), invite_post(), item_message_id(), item_permissions_sql(), item_post(), item_store(), item_store_update(), like_content(), load_config(), load_pconfig(), load_xconfig(), local_delivery(), lockview_content(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_nonce(), FKOAuthDataStore\lookup_token(), lostpass_content(), lostpass_post(), magic_init(), mail_store(), member_of(), msearch_post(), network_content(), network_init(), FKOAuthDataStore\new_access_token(), new_contact(), new_cookie(), new_follower(), FKOAuthDataStore\new_request_token(), notification(), notifications_content(), notifier_run(), notify_init(), oauth_get_client(), onepoll_run(), page_content(), perm_is_allowed(), permissions_sql(), photo_init(), photo_new_resource(), photo_upload(), photos_album_exists(), photos_album_get_db_idstr(), photos_album_rename(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_init(), poller_run(), post_init(), post_post(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), process_delivery(), process_mail_delivery(), profile_init(), profile_load(), profile_photo_post(), profiles_init(), profiles_post(), public_permissions_sql(), public_recips(), qsearch_init(), queue_run(), redir_init(), register_post(), remove_all_xchan_resources(), remove_queue_item(), rmagic_init(), rmagic_post(), search_ac_init(), search_content(), search_init(), send_message(), send_reg_approval_email(), send_status_notifications(), Cache\set(), set_config(), set_pconfig(), set_xconfig(), settings_post(), siteinfo_init(), Photo\store(), store_item_tag(), stringify_array_elms(), subthread_content(), suggest_init(), suggestion_query(), syncdirs(), tag_deliver(), tagger_content(), tagrm_post(), term_query(), update_modtime(), update_queue_time(), user_allow(), user_deny(), vcard_from_xchan(), wall_attach_post(), wall_upload_post(), wfinger_init(), xchan_content(), xchan_mail_query(), xchan_query(), xrd_init(), z_readdir(), zfinger_init(), zid_init(), zot_finger(), zot_get_hubloc(), zot_gethub(), zot_process_response(), zot_refresh(), and zotfeed_init().
This will happen occasionally trying to store the session data after abnormal program termination
-Referenced by abook_connections(), abook_self(), abook_toggle_flag(), account_total(), account_verify_password(), acl_init(), add_fcontact(), admin_content(), admin_page_dbsync(), admin_page_summary(), admin_page_users(), admin_page_users_post(), all_friends(), allfriends_content(), allowed_public_recips(), api_direct_messages_box(), api_direct_messages_new(), api_favorites(), api_ff_ids(), api_format_items(), api_get_user(), api_status_show(), api_statuses_f(), api_statuses_home_timeline(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_repeat(), api_statuses_show(), api_statuses_user_timeline(), api_user(), api_users_show(), attach_by_hash(), attach_by_hash_nodata(), attach_count_files(), attach_list_files(), attach_store(), authenticate_success(), categories_widget(), change_channel(), channel_content(), channel_remove(), channelx_by_hash(), channelx_by_n(), channelx_by_nick(), chanview_content(), check_account_email(), check_account_invite(), check_config(), check_webbie(), Cache\clear(), collect_recipients(), common_friends(), common_friends_zcid(), common_init(), community_content(), connections_content(), connections_init(), connections_post(), consume_feed(), contact_block(), contact_profile_assign(), contact_remove(), contact_select(), contactgroup_content(), contacts_not_grouped(), count_all_friends(), count_common_friends(), count_common_friends_zcid(), create_account(), create_identity(), crepair_content(), crepair_init(), crepair_post(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), delete_imported_item(), delete_item_lowlevel(), deliver_run(), dfrn_deliver(), directory_run(), dirsearch_content(), display_content(), drop_item(), editpost_content(), encode_item(), event_store(), events_content(), expand_groups(), expire_run(), fbrowser_content(), feed_init(), fetch_post_tags(), file_tag_save_file(), file_tag_unsave_file(), file_tag_update_pconfig(), fileas_widget(), filer_content(), filerm_content(), first_post_date(), fix_attached_photo_permissions(), fix_contact_ssl_policy(), fix_private_photos(), fix_system_urls(), fsuggest_content(), fsuggest_post(), generate_user_guid(), Cache\get(), get_all_perms(), get_birthdays(), get_config(), get_events(), get_feed_for(), get_pconfig(), get_xconfig(), gprobe_run(), group_add(), group_add_member(), group_byname(), group_content(), group_get_members(), group_post(), group_rmv(), group_rmv_member(), group_select(), group_side(), groups_containing(), handle_tag(), identity_basic_export(), identity_check_service_class(), import_author_xchan(), import_directory_keywords(), import_directory_profile(), import_post(), import_profile_photo(), import_xchan(), intro_content(), intro_post(), invite_post(), item_expire(), item_message_id(), item_post(), item_store(), item_store_update(), like_content(), load_config(), load_contact_links(), load_pconfig(), load_translation_table(), load_xconfig(), local_delivery(), lockview_content(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_nonce(), FKOAuthDataStore\lookup_token(), lose_follower(), lose_sharer(), lostpass_content(), lostpass_post(), magic_init(), mail_store(), manage_content(), match_content(), member_of(), message_content(), mini_group_select(), mood_init(), msearch_post(), network_content(), network_init(), FKOAuthDataStore\new_access_token(), new_contact(), new_cookie(), new_follower(), FKOAuthDataStore\new_request_token(), notification(), notifications_content(), notifications_post(), notifier_run(), notify_content(), notify_init(), oauth_get_client(), onepoll_run(), page_content(), perm_is_allowed(), photo_init(), photo_new_resource(), photo_upload(), photos_album_exists(), photos_album_get_db_idstr(), photos_album_rename(), photos_albums_list(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_content(), poke_init(), poller_run(), post_init(), post_post(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), process_delivery(), process_mail_delivery(), profile_content(), profile_init(), profile_load(), profile_photo_post(), profile_sidebar(), profiles_content(), profiles_init(), profiles_post(), profperm_content(), public_recips(), qsearch_init(), queue_run(), random_profile(), redir_init(), register_content(), register_post(), remove_all_xchan_resources(), remove_queue_item(), rmagic_init(), rmagic_post(), saved_searches(), search_ac_init(), search_content(), search_init(), search_saved_searches(), send_message(), send_reg_approval_email(), send_status_notifications(), service_class_allows(), service_class_fetch(), Cache\set(), set_config(), set_default_login_identity(), set_pconfig(), set_xconfig(), settings_aside(), settings_post(), setup_content(), share_init(), siteinfo_content(), siteinfo_init(), starred_init(), Photo\store(), store_item_tag(), stream_perms_api_uids(), subthread_content(), suggest_init(), suggestion_query(), syncdirs(), tag_deliver(), tagadelic(), tagger_content(), tagrm_content(), tagrm_post(), tgroup_check(), update_modtime(), update_queue_time(), update_suggestions(), user_allow(), user_deny(), vcard_from_xchan(), viewconnections_content(), viewsrc_content(), wall_attach_post(), wall_upload_post(), wfinger_init(), xchan_content(), xchan_mail_query(), xchan_query(), xrd_init(), z_readdir(), zfinger_init(), zid_init(), zot_feed(), zot_finger(), zot_get_hubloc(), zot_gethub(), zot_import(), zot_process_response(), zot_refresh(), zotfeed_init(), and zperms_init().
+Referenced by abook_connections(), abook_self(), abook_toggle_flag(), account_total(), account_verify_password(), acl_init(), add_fcontact(), admin_content(), admin_page_dbsync(), admin_page_summary(), admin_page_users(), admin_page_users_post(), all_friends(), allfriends_content(), allowed_public_recips(), api_direct_messages_box(), api_direct_messages_new(), api_favorites(), api_ff_ids(), api_format_items(), api_get_user(), api_status_show(), api_statuses_f(), api_statuses_home_timeline(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_repeat(), api_statuses_show(), api_statuses_user_timeline(), api_user(), api_users_show(), attach_by_hash(), attach_by_hash_nodata(), attach_count_files(), attach_list_files(), attach_store(), authenticate_success(), categories_widget(), change_channel(), channel_content(), channel_remove(), channelx_by_hash(), channelx_by_n(), channelx_by_nick(), chanview_content(), check_account_email(), check_account_invite(), check_config(), check_webbie(), Cache\clear(), collect_recipients(), common_friends(), common_friends_zcid(), common_init(), community_content(), connections_content(), connections_init(), connections_post(), consume_feed(), contact_block(), contact_profile_assign(), contact_remove(), contact_select(), contactgroup_content(), contacts_not_grouped(), count_all_friends(), count_common_friends(), count_common_friends_zcid(), create_account(), create_identity(), crepair_content(), crepair_init(), crepair_post(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), delete_imported_item(), delete_item_lowlevel(), deliver_run(), dfrn_deliver(), directory_run(), dirsearch_content(), display_content(), drop_item(), editpost_content(), encode_item(), event_store(), events_content(), expand_groups(), expire_run(), fbrowser_content(), feed_init(), fetch_post_tags(), file_tag_save_file(), file_tag_unsave_file(), file_tag_update_pconfig(), fileas_widget(), filer_content(), filerm_content(), first_post_date(), fix_attached_photo_permissions(), fix_contact_ssl_policy(), fix_private_photos(), fix_system_urls(), fsuggest_content(), fsuggest_post(), generate_user_guid(), Cache\get(), get_all_perms(), get_birthdays(), get_config(), get_events(), get_feed_for(), get_pconfig(), get_xconfig(), gprobe_run(), group_add(), group_add_member(), group_byname(), group_content(), group_get_members(), group_post(), group_rmv(), group_rmv_member(), group_select(), group_side(), groups_containing(), handle_tag(), identity_basic_export(), identity_check_service_class(), import_author_xchan(), import_directory_keywords(), import_directory_profile(), import_post(), import_profile_photo(), import_xchan(), intro_content(), intro_post(), invite_post(), item_expire(), item_message_id(), item_post(), item_store(), item_store_update(), like_content(), load_config(), load_contact_links(), load_pconfig(), load_translation_table(), load_xconfig(), local_delivery(), lockview_content(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_nonce(), FKOAuthDataStore\lookup_token(), lose_follower(), lose_sharer(), lostpass_content(), lostpass_post(), magic_init(), mail_store(), manage_content(), match_content(), member_of(), message_content(), mini_group_select(), mood_init(), msearch_post(), network_content(), network_init(), FKOAuthDataStore\new_access_token(), new_contact(), new_cookie(), new_follower(), FKOAuthDataStore\new_request_token(), notification(), notifications_content(), notifications_post(), notifier_run(), notify_content(), notify_init(), oauth_get_client(), onepoll_run(), page_content(), perm_is_allowed(), photo_init(), photo_new_resource(), photo_upload(), photos_album_exists(), photos_album_get_db_idstr(), photos_album_rename(), photos_albums_list(), photos_content(), photos_post(), ping_init(), poco_init(), poco_load(), poke_content(), poke_init(), poller_run(), post_init(), post_post(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), process_delivery(), process_mail_delivery(), profile_content(), profile_init(), profile_load(), profile_photo_post(), profile_sidebar(), profiles_content(), profiles_init(), profiles_post(), profperm_content(), public_recips(), qsearch_init(), queue_run(), random_profile(), redir_init(), register_content(), register_post(), remove_all_xchan_resources(), remove_queue_item(), rmagic_init(), rmagic_post(), saved_searches(), search_ac_init(), search_content(), search_init(), search_saved_searches(), send_message(), send_reg_approval_email(), send_status_notifications(), service_class_allows(), service_class_fetch(), Cache\set(), set_config(), set_default_login_identity(), set_pconfig(), set_xconfig(), settings_aside(), settings_post(), setup_content(), share_init(), siteinfo_content(), siteinfo_init(), starred_init(), Photo\store(), store_item_tag(), stream_perms_api_uids(), subthread_content(), suggest_init(), suggestion_query(), syncdirs(), tag_deliver(), tagadelic(), tagger_content(), tagrm_content(), tagrm_post(), tgroup_check(), update_modtime(), update_queue_time(), update_suggestions(), user_allow(), user_deny(), vcard_from_xchan(), viewconnections_content(), viewsrc_content(), wall_attach_post(), wall_upload_post(), wfinger_init(), xchan_content(), xchan_mail_query(), xchan_query(), xrd_init(), z_readdir(), zfinger_init(), zid_init(), zot_feed(), zot_finger(), zot_get_hubloc(), zot_gethub(), zot_import(), zot_process_response(), zot_refresh(), and zotfeed_init().
create_dir_account | +( | +) | ++ |
http_status_exit
+Send HTTP status header and exit
+int | $val | integer HTTP status result value |
Referenced by _well_known_init(), and poco_init().
@@ -496,7 +505,7 @@ FunctionsReferenced by api_export_basic(), dirsearch_content(), new_channel_init(), post_post(), register_init(), zfinger_init(), zotfeed_init(), and zperms_init().
+Referenced by api_export_basic(), dirsearch_content(), new_channel_init(), post_post(), register_init(), zfinger_init(), and zotfeed_init().
z_fetch_url
+string | $url | URL to fetch |
boolean | $binary | = false TRUE if asked to return binary results (file download) |
int | $redirects | = 0 internal use, recursion counter |
array | $opts | (optional parameters) 'accept_content' => supply Accept: header with 'accept_content' as the value 'timeout' => int seconds, default system config value or 60 seconds 'http_auth' => username:password 'novalidate' => do not validate SSL certs, default is to validate using our CA list |
Referenced by check_htaccess(), directory_content(), import_post(), import_profile_photo(), navbar_complete(), oembed_fetch_url(), onepoll_run(), parseurl_getsiteinfo(), poco_load(), z_post_url(), zot_finger(), and zot_register_hub().
@@ -873,7 +893,7 @@ FunctionsReferenced by zot_finger(), zot_notify(), zot_refresh(), and zot_zot().
+Referenced by zot_finger(), zot_refresh(), and zot_zot().
Many message packets will arrive encrypted. The existence of an 'iv' element tells us we need to unencapsulate the AES-256-CBC content using the site private key
+The 'pickup' message arrives with a tracking ID which is associated with a particular outq_hash First verify that that the returned signatures verify, then check that we have an outbound queue item with the correct hash. If everything verifies, find any/all outbound messages in the queue for this hubloc and send them back
+If we made it to here, the signatures verify, but we still don't know if the tracking ID is valid. It wouldn't be an error if the tracking ID isn't found, because we may have sent this particular queue item with another pickup (after the tracking ID for the other pickup was verified).
+Everything is good if we made it here, so find all messages that are going to this location and send them all.
+pickup: end
+All other message types require us to verify the sender. This is a generic check, so we will do it once here and bail if anything goes wrong.
+Check if the sender is already verified here
+Have never seen this guid or this guid coming from this location. Check it and register it.
Referenced by aes_encapsulate(), allowed_public_recips(), atom_entry(), create_identity(), fix_system_urls(), get_item_elements(), get_mail_elements(), get_profile_elements(), identity_basic_export(), import_post(), import_xchan(), magic_init(), oembed_iframe(), post_post(), random_string(), salmon_key(), smile_encode(), zfinger_init(), zot_build_packet(), zot_fetch(), zot_import(), zot_new_uid(), zot_notify(), zot_register_hub(), and zperms_init().
+Referenced by aes_encapsulate(), allowed_public_recips(), atom_entry(), create_identity(), fix_system_urls(), get_item_elements(), get_mail_elements(), get_profile_elements(), identity_basic_export(), import_post(), import_xchan(), magic_init(), oembed_iframe(), post_post(), random_string(), salmon_key(), smile_encode(), zfinger_init(), zot_build_packet(), zot_fetch(), zot_import(), zot_new_uid(), and zot_register_hub().
Referenced by account_verify_password(), Item\add_child(), Conversation\add_thread(), allowed_public_recips(), api_call(), api_export_basic(), api_favorites(), api_get_user(), api_login(), api_statuses_destroy(), api_statuses_mediap(), api_statuses_repeat(), api_statuses_show(), api_statuses_update(), api_statuses_user_timeline(), authenticate_success(), avatar_img(), base64url_decode(), channel_remove(), chanview_content(), check_config(), check_form_security_token_ForbiddenOnErr(), check_form_security_token_redirectOnErr(), consume_feed(), create_account(), create_identity(), crepair_post(), cronhooks_run(), datetime_convert(), delete_imported_item(), deliver_run(), detect_language(), dfrn_deliver(), directory_content(), directory_run(), email_send(), encode_item(), encode_mail(), expire_run(), feed_init(), fetch_lrdd_template(), fetch_xrd_links(), filer_content(), filerm_content(), fix_private_photos(), Conversation\get_template_data(), group_content(), guess_image_type(), http_status_exit(), import_author_xchan(), import_channel_photo(), import_directory_profile(), import_post(), import_profile_photo(), import_xchan(), item_expire(), item_post(), item_store(), item_store_update(), like_content(), local_delivery(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_token(), lrdd(), mail_store(), message_content(), message_post(), mini_group_select(), mood_init(), FKOAuthDataStore\new_access_token(), new_contact(), new_keypair(), FKOAuthDataStore\new_request_token(), notification(), notifier_run(), onepoll_run(), parse_url_content(), parse_xml_string(), photo_upload(), photos_post(), ping_init(), poco_init(), poco_load(), poke_init(), poller_run(), post_init(), post_post(), process_delivery(), process_mail_delivery(), process_profile_delivery(), profile_load(), dba\q(), q(), queue_run(), redir_init(), register_content(), Item\remove_child(), remove_queue_item(), scale_external_images(), search_ac_init(), enotify\send(), send_reg_approval_email(), Conversation\set_mode(), subthread_content(), syncdirs(), tag_deliver(), tagger_content(), tgroup_check(), update_imported_item(), update_queue_time(), webfinger(), webfinger_dfrn(), xml2array(), xml_status(), zfinger_init(), zot_build_packet(), zot_fetch(), zot_finger(), zot_gethub(), zot_import(), zot_process_response(), zot_refresh(), and zot_register_hub().
+Referenced by account_verify_password(), Item\add_child(), Conversation\add_thread(), allowed_public_recips(), api_call(), api_export_basic(), api_favorites(), api_get_user(), api_login(), api_statuses_destroy(), api_statuses_mediap(), api_statuses_repeat(), api_statuses_show(), api_statuses_update(), api_statuses_user_timeline(), authenticate_success(), avatar_img(), base64url_decode(), channel_remove(), chanview_content(), check_config(), check_form_security_token_ForbiddenOnErr(), check_form_security_token_redirectOnErr(), consume_feed(), create_account(), create_identity(), crepair_post(), cronhooks_run(), datetime_convert(), delete_imported_item(), deliver_run(), detect_language(), dfrn_deliver(), directory_content(), directory_run(), display_content(), email_send(), encode_item(), encode_mail(), expire_run(), feed_init(), fetch_lrdd_template(), fetch_xrd_links(), filer_content(), filerm_content(), fix_private_photos(), Conversation\get_template_data(), group_content(), guess_image_type(), http_status_exit(), import_author_xchan(), import_channel_photo(), import_directory_profile(), import_post(), import_profile_photo(), import_xchan(), item_expire(), item_post(), item_store(), item_store_update(), like_content(), local_delivery(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_token(), lrdd(), mail_store(), message_content(), message_post(), mini_group_select(), mood_init(), FKOAuthDataStore\new_access_token(), new_contact(), new_keypair(), FKOAuthDataStore\new_request_token(), notification(), notifier_run(), onepoll_run(), parse_url_content(), parse_xml_string(), photo_upload(), photos_post(), ping_init(), poco_init(), poco_load(), poke_init(), poller_run(), post_init(), post_post(), process_delivery(), process_mail_delivery(), process_profile_delivery(), profile_load(), dba\q(), q(), queue_run(), redir_init(), register_content(), Item\remove_child(), remove_queue_item(), scale_external_images(), search_ac_init(), enotify\send(), send_reg_approval_email(), Conversation\set_mode(), subthread_content(), syncdirs(), tag_deliver(), tagger_content(), tgroup_check(), update_imported_item(), update_queue_time(), webfinger(), webfinger_dfrn(), xml2array(), xml_status(), zfinger_init(), zot_build_packet(), zot_fetch(), zot_finger(), zot_gethub(), zot_import(), zot_process_response(), zot_refresh(), and zot_register_hub().
prepare_text | ( | - | $text | ) | +$text, | + +
+ | + | $content_type = 'text/bbcode' |
+ |
+ | ) | +
: string $s
Returns string
It is expected that this function will be called using HTML text. We will escape text between HTML pre and code blocks from being processed.
-At a higher level, the bbcode [nosmile] tag can be used to prevent this function from being executed by the prepare_text() routine when preparing bbcode source for HTML display
+At a higher level, the bbcode [nosmile] tag can be used to prevent this function from being executed by the prepare_text() routine when preparing bbcode source for HTML display
Referenced by message_content(), and smilies_content().
diff --git a/doc/html/text_8php.js b/doc/html/text_8php.js index 323fead36..1f50904ed 100644 --- a/doc/html/text_8php.js +++ b/doc/html/text_8php.js @@ -61,7 +61,7 @@ var text_8php = [ "photo_new_resource", "text_8php.html#aa5528f41533927e1bd2da3618a74a6d7", null ], [ "preg_heart", "text_8php.html#ac19d2b33a58372a357a43d51eed19162", null ], [ "prepare_body", "text_8php.html#af3a7139d40ea758f315c2acf2ccc1b1c", null ], - [ "prepare_text", "text_8php.html#a70c59f9fde874ef711390d48b407d7ef", null ], + [ "prepare_text", "text_8php.html#afe54312607d92f7ce9593f5760831f80", null ], [ "profiler", "text_8php.html#a8b0a799341b1fc4cba2c3ede3e3fc9b6", null ], [ "protect_sprintf", "text_8php.html#a4e7698aca48982512594b274543c3b9b", null ], [ "qp", "text_8php.html#afc998d2796a6b2a08e96f7cc061e7221", null ], diff --git a/doc/html/zot_8php.html b/doc/html/zot_8php.html index c96e0b6d3..60ec4b677 100644 --- a/doc/html/zot_8php.html +++ b/doc/html/zot_8php.html @@ -116,8 +116,6 @@ Functionsobsolete
+function zot_notify($channel,$url,$type = 'notify',$recipients = null, $remote_key = null) {
+$params = array( + 'type' => $type, + 'sender' => json_encode(array( + 'guid' => $channel['channel_guid'], + 'guid_sig' => base64url_encode(rsa_sign($channel['channel_guid'],$channel['channel_prvkey'])), + 'url' => z_root(), + 'url_sig' => base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey'])) + )), + 'callback' => '/post', + 'version' => ZOT_REVISION +); +if($recipients) + $params['recipients'] = json_encode($recipients); +
Hush-hush ultra top-secret mode
+if($remote_key) { + $params = aes_encapsulate($params,$remote_key); +} + +$x = z_post_url($url,$params); +return($x); +
Referenced by directory_run(), notifier_run(), and post_init().
: zot_fetch
+We received a notification packet (in mod/post.php) that a message is waiting for us, and we've verified the sender. Now send back a pickup message, using our message tracking ID ($arr['secret']), which we will sign. The entire pickup message is encrypted with the remote site's public key. If everything checks out on the remote end, we will receive back a packet containing one or more messages, which will be processed before returning.
Referenced by post_post().
@@ -551,6 +574,16 @@ Functions: zot_finger
+Look up information about channel
+string $webbie does not have to be host qualified e.g. 'foo' is treated as 'foo' | |
array $channel (optional), if supplied permissions will be enumerated specifically for $channel |
Referenced by chanview_content(), gprobe_run(), magic_init(), message_post(), new_contact(), poco_load(), post_init(), and probe_content().
@@ -581,7 +614,7 @@ FunctionsGiven an array of zot hashes, return all distinct hubs If primary is true, return only primary hubs Result is ordered by url to assist in batching. Return only the first primary hub as there should only be one.
-Referenced by zfinger_init(), and zperms_init().
+Referenced by zfinger_init().
: zot_gethub
+A guid and a url, both signed by the sender, distinguish a known sender at a known location This function looks these up to see if the channel is known. If not, we will need to verify it.
+Referenced by import_post(), post_post(), and zot_fetch().
@@ -616,6 +652,9 @@ Functionszot_import
+Process an incoming array of messages which were obtained via pickup, and import, update, delete as directed.
+The message types handled here are 'activity' (e.g. posts), 'mail' and 'profile'
Referenced by deliver_run(), and zot_fetch().
@@ -639,50 +678,6 @@ FunctionsReferenced by create_identity().
-zot_notify | -( | -- | $channel, | -
- | - | - | $url, | -
- | - | - | $type = 'notify' , |
-
- | - | - | $recipients = null , |
-
- | - | - | $remote_key = null |
-
- | ) | -- |
: zot_refresh
+zot_refresh is typically invoked when somebody has changed permissions of a channel and they are notified to fetch new permissions via a finger operation. This may result in a new connection (abook entry) being added to a local channel and it may result in auto-permissions being granted.
Referenced by connections_content(), import_author_xchan(), onepoll_run(), and post_post().
@@ -788,6 +785,15 @@ Functions: zot_zot
+string $url | |
array $data |
Referenced by deliver_run(), directory_run(), notifier_run(), post_init(), queue_run(), and zot_fetch().
diff --git a/doc/html/zot_8php.js b/doc/html/zot_8php.js index 3dfa5f0f2..4f767358d 100644 --- a/doc/html/zot_8php.js +++ b/doc/html/zot_8php.js @@ -18,7 +18,6 @@ var zot_8php = [ "zot_gethub", "zot_8php.html#a55056e863a7860bc0cf922e78fcce073", null ], [ "zot_import", "zot_8php.html#a22e3f9b97b7969ddbe43ccf0db93a19c", null ], [ "zot_new_uid", "zot_8php.html#ab22d67660702056bf3f4696dcebf5ce7", null ], - [ "zot_notify", "zot_8php.html#af22a8732e60d30055617a95f77493446", null ], [ "zot_process_response", "zot_8php.html#a928f5643ca66ae9635d85aeb2be62e03", null ], [ "zot_refresh", "zot_8php.html#a7b23bfb31d4491231e1e73bdc077240d", null ], [ "zot_register_hub", "zot_8php.html#a5bcdfef419b16075a0eca990956223dc", null ], diff --git a/include/items.php b/include/items.php index 6b9ecdd48..c303801e7 100755 --- a/include/items.php +++ b/include/items.php @@ -1427,22 +1427,8 @@ function item_store($arr,$force_parent = false) { $arr['item_private'] = 0; } else { - - // Allow one to see reply tweets from status.net even when - // we don't have or can't see the original post. - - if($force_parent) { - logger('item_store: $force_parent=true, reply converted to top-level post.'); - $parent_id = 0; - $arr['parent_mid'] = $arr['mid']; - $arr['flags'] = $arr['flags'] | ITEM_THREAD_TOP; - } - else { - logger('item_store: item parent was not found - ignoring item'); - return 0; - } - - $parent_deleted = 0; + logger('item_store: item parent was not found - ignoring item'); + return 0; } } diff --git a/include/network.php b/include/network.php index 9d7ae8497..427519c7a 100644 --- a/include/network.php +++ b/include/network.php @@ -10,6 +10,7 @@ function get_capath() { // curl wrapper. If binary flag is true, return binary // results. + /** * fetch_url is deprecated and being replaced by the more capable z_fetch_url * please use that function instead. @@ -204,6 +205,26 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0) return($body); } +/** + * @function z_fetch_url + * @param string $url + * URL to fetch + * @param boolean $binary = false + * TRUE if asked to return binary results (file download) + * @param int $redirects = 0 + * internal use, recursion counter + * @param array $opts (optional parameters) + * 'accept_content' => supply Accept: header with 'accept_content' as the value + * 'timeout' => int seconds, default system config value or 60 seconds + * 'http_auth' => username:password + * 'novalidate' => do not validate SSL certs, default is to validate using our CA list + * + * @returns array + * 'return_code' => HTTP return code or 0 if timeout or failure + * 'success' => boolean true (if HTTP 2xx result) or false + * 'header' => HTTP headers + * 'body' => fetched content + */ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) { @@ -421,7 +442,15 @@ function xml_status($st, $message = '') { killme(); } - +/** + * @function http_status_exit + * + * Send HTTP status header and exit + * @param int $val + * integer HTTP status result value + * + * @returns (does not return, process is terminated) + */ function http_status_exit($val) { diff --git a/include/text.php b/include/text.php index 6e0e63df3..833b495f4 100644 --- a/include/text.php +++ b/include/text.php @@ -222,6 +222,7 @@ function unxmlify($s) { // convenience wrapper, reverse the operation "bin2hex" +// This is a built-in function in php >= 5.4 if(! function_exists('hex2bin')) { function hex2bin($s) { diff --git a/install/database.sql b/install/database.sql index 7dbaff7ea..6e16e7646 100644 --- a/install/database.sql +++ b/install/database.sql @@ -537,10 +537,10 @@ CREATE TABLE IF NOT EXISTS `mail` ( CREATE TABLE IF NOT EXISTS `manage` ( `id` int(11) NOT NULL AUTO_INCREMENT, `uid` int(11) NOT NULL, - `mid` int(11) NOT NULL, + `xchan` char(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), KEY `uid` (`uid`), - KEY `mid` (`mid`) + KEY `xchan` (`xchan`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `menu` ( diff --git a/install/update.php b/install/update.php index 493a5478b..a2a280e67 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@