The Red Matrix
 All Classes Namespaces Files Functions Variables Pages
frphotohelper.php File Reference

Variables

 $a = get_app()
 
 $photo_id = $argv[1]
 
 $channel_address = $argv[2]
 
 $fr_server = urldecode($argv[3])
 
 $cookies = 'store/[data]/frphoto_cookie_' . $channel_address
 
 $c
 
if(!$c) $channel = $c[0]
 
 $ch = curl_init($fr_server . '/api/friendica/photo?f=&photo_id=' . $photo_id)
 
 $output = curl_exec($ch)
 
 $j = json_decode($output,true)
 
 $args = array()
 
 $args ['data'] = base64_decode($j['data'])
 
 $args ['filename'] = $j['filename']
 
 $args ['resource_id'] = $j['resource-id']
 
 $args ['scale'] = $j['scale']
 
 $args ['album'] = $j['album']
 
 $args ['not_visible'] = 1
 
 $args ['created'] = $j['created']
 
 $args ['edited'] = $j['edited']
 
 $args ['title'] = $j['title']
 
 $args ['description'] = $j['desc']
 
 $args ['type'] = $j['type']
 
 $r
 
if($r) $ret = photo_upload($channel,$channel,$args)
 

Variable Documentation

$a = get_app()

Referenced by FriendicaSmarty\__construct(), Item\__construct(), FriendicaSmartyEngine\__construct(), Template\_replcb_if(), Template\_replcb_inc(), _well_known_init(), abook_toggle_flag(), achievements_content(), acl_init(), admin_content(), admin_page_channels(), admin_page_channels_post(), admin_page_dbsync(), admin_page_hubloc(), admin_page_hubloc_post(), admin_page_logs(), admin_page_logs_post(), admin_page_plugins(), admin_page_site(), admin_page_site_post(), admin_page_summary(), admin_page_themes(), admin_page_users(), admin_page_users_post(), admin_post(), advanced_profile(), allowed_email(), allowed_url(), alt_pager(), api_account_verify_credentials(), api_albums(), api_apply_template(), api_call(), api_content(), api_direct_messages_all(), api_direct_messages_box(), api_direct_messages_conversation(), api_direct_messages_inbox(), api_direct_messages_new(), api_direct_messages_sentbox(), api_favorites(), api_followers_ids(), api_format_as(), api_format_items(), api_friends_ids(), api_get_user(), api_item_get_user(), api_login(), api_photos(), api_post(), api_rss_extra(), api_status_show(), api_statuses_destroy(), api_statuses_f(), api_statuses_followers(), api_statuses_friends(), api_statuses_home_timeline(), api_statuses_mediap(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_repeat(), api_statuses_show(), api_statuses_update(), api_statuses_user_timeline(), api_statusnet_config(), api_users_show(), app_name_compare(), appman_content(), apw_form(), atom_entry(), attribute_contains(), authenticate_success(), avatar_img(), bb_sanitize_style(), bbcode(), best_link_url(), block_content(), block_init(), blocks_content(), blog_init(), blogtheme_display_item(), blogtheme_form(), blogtheme_imgurl(), bookmarks_content(), bookmarks_init(), build_sync_packet(), cal(), call_hooks(), categories_widget(), channel_content(), channel_init(), channel_remove(), chanview_content(), chat_content(), chat_init(), chat_post(), chatsvc_content(), chatsvc_init(), chatsvc_post(), check_config(), check_form_security_token(), check_form_security_token_ForbiddenOnErr(), check_form_security_token_redirectOnErr(), check_htaccess(), clean_urls(), cli_startup(), cli_suggest_run(), cloud_init(), comanche_parser(), comanche_replace_region(), comanche_widget(), common_content(), common_friends_visitor_widget(), common_init(), connect_content(), connect_init(), connect_post(), connections_clone(), connections_content(), connections_init(), connections_post(), connedit_clone(), connedit_content(), connedit_init(), connedit_post(), construct_page(), contact_block(), contact_select(), conversation(), create_identity(), current_theme(), current_theme_url(), del_config(), del_pconfig(), del_xconfig(), delegate_content(), deliver_run(), diaspora_asphoto(), diaspora_comment(), diaspora_conversation(), diaspora_like(), diaspora_message(), diaspora_msg_build(), diaspora_photo(), diaspora_post(), diaspora_profile(), diaspora_pubmsg_build(), diaspora_request(), diaspora_reshare(), diaspora_send_followup(), diaspora_send_images(), diaspora_send_mail(), diaspora_send_relay(), diaspora_send_retraction(), diaspora_send_status(), diaspora_share(), diaspora_transmit(), diaspora_unshare(), directory_content(), directory_init(), dirsearch_init(), display_content(), dlogger(), drop_item(), editblock_content(), editlayout_content(), editpost_content(), editwebpage_content(), ev_compare(), event_store_item(), events_content(), events_post(), expand_acl(), expand_groups(), externals_run(), fbrowser_content(), fileas_widget(), filer_content(), filerm_content(), filestorage_content(), filestorage_post(), findpeople_widget(), fix_private_photos(), follow_init(), format_event_diaspora(), frphotos_init(), fsuggest_content(), fsuggest_post(), BaseObject\get_app(), get_app(), get_best_language(), get_birthdays(), Item\get_comment_box(), get_config(), get_custom_nav(), get_events(), get_form_security_token(), FriendicaSmartyEngine\get_intltext_template(), get_intltext_template(), get_markup_template(), get_pconfig(), get_plink(), Item\get_template_data(), get_theme_screenshot(), get_xconfig(), gprobe_run(), group_content(), group_post(), group_select(), guess_image_type(), handle_tag(), hcard_init(), head_get_icon(), head_remove_css(), head_remove_js(), head_set_icon(), help_content(), home_content(), home_init(), hostxrd_init(), import_channel_photo(), import_post(), import_profile_photo(), info(), insert_hook(), invite_content(), invite_post(), is_developer(), is_site_admin(), item_photo_menu(), item_post(), items_fetch(), lang_selector(), layouts_content(), like_content(), link_compare(), load_config(), load_contact_links(), load_database(), load_hooks(), load_pconfig(), load_translation_table(), load_xconfig(), logger(), login(), login_content(), FKOAuth1\loginUser(), lostpass_content(), lostpass_post(), magic_init(), mail_content(), mail_post(), manual_config(), match_content(), message_content(), mitem_content(), mitem_init(), mitem_post(), mood_init(), msearch_post(), mytheme_init(), nav(), nav_set_selected(), network_content(), network_init(), new_contact(), notice(), notification(), notifications_content(), notifications_post(), notifier_run(), notify_content(), notify_init(), oembed_fetch_url(), oembed_format_object(), oembed_iframe(), oexchange_content(), oexchange_init(), onedirsync_run(), onepoll_run(), openid_content(), opensearch_init(), page_content(), page_init(), paginate(), photo_init(), photos_content(), photos_init(), photos_post(), ping_init(), poco_init(), poco_load(), poke_init(), poller_run(), pop_lang(), post_init(), preg_heart(), prepare_body(), probe_content(), proc_run(), profile_activity(), profile_content(), profile_create_sidebar(), profile_init(), profile_load(), profile_photo_init(), profile_photo_post(), profile_sidebar(), profiles_content(), profiles_init(), profiles_post(), profperm_init(), push_lang(), queue_run(), randprof_init(), rbmark_content(), rbmark_post(), red_item_new(), redbasic_form(), register_content(), regmod_content(), regver_content(), relative_date(), removeaccount_content(), removeaccount_post(), removeme_content(), removeme_post(), replace_macros(), rmagic_post(), rpost_content(), scale_external_images(), search(), search_ac_init(), search_content(), search_init(), searchbox(), send_message(), service_class_allows(), service_class_fetch(), set_config(), Conversation\set_mode(), set_pconfig(), set_xconfig(), settings_init(), settings_post(), setup_content(), setup_post(), share_init(), siteinfo_content(), siteinfo_init(), smilies(), sources_post(), subthread_content(), suggest_content(), t(), tag_deliver(), tag_sort_length(), tagger_content(), tagrm_content(), tagrm_post(), tags_sort(), tgroup_check(), theme_admin(), theme_content(), theme_include(), thing_content(), thing_init(), timezone_cmp(), toggle_mobile_init(), tt(), uexport_init(), update_channel_content(), update_display_content(), update_network_content(), update_search_content(), update_suggestions(), user_allow(), user_approve(), vcard_from_xchan(), viewconnections_content(), viewconnections_init(), viewsrc_content(), vote_content(), vote_init(), vote_post(), wall_upload_post(), webpages_content(), wfinger_init(), what_next(), widget_archive(), widget_categories(), widget_chatroom_list(), widget_design_tools(), widget_filer(), widget_follow(), widget_fullprofile(), widget_item(), widget_mailmenu(), widget_photo_albums(), widget_profile(), widget_savedsearch(), widget_settings_menu(), widget_tagcloud(), widget_tagcloud_wall(), xrd_init(), z_fetch_url(), z_path(), z_root(), zfinger_init(), zid_init(), zotfeed_init(), and zping_content().

$args['data'] = base64_decode($j['data'])
$args['filename'] = $j['filename']
$args['resource_id'] = $j['resource-id']
$args['scale'] = $j['scale']
$args['album'] = $j['album']
$args['not_visible'] = 1
$args['created'] = $j['created']
$args['edited'] = $j['edited']
$args['title'] = $j['title']
$args['description'] = $j['desc']
$args['type'] = $j['type']
$ch = curl_init($fr_server . '/api/friendica/photo?f=&photo_id=' . $photo_id)
if (!$c) $channel = $c[0]

Referenced by admin_page_channels(), api_call(), api_user(), appman_content(), attach_mkdir(), attach_store(), bbcode(), blocks_content(), bookmark_add(), bookmarks_content(), build_sync_packet(), channel_content(), channel_init(), channel_remove(), chat_content(), chat_init(), chat_post(), chatroom_create(), chatroom_destroy(), cloud_init(), connections_init(), connections_post(), connedit_content(), connedit_init(), connedit_post(), conversation(), design_tools(), directory_run(), display_content(), editblock_content(), editlayout_content(), editpost_content(), editwebpage_content(), event_addtocal(), events_content(), events_post(), feed_init(), filestorage_content(), filestorage_post(), fix_attached_file_permissions(), frphotos_init(), get_feed_for(), get_public_feed(), handle_tag(), hcard_init(), home_init(), import_post(), importelm_post(), invite_content(), is_public_profile(), item_photo_menu(), item_post(), item_store(), item_store_update(), items_fetch(), layouts_content(), magic_init(), mail_content(), mail_post(), menu_add_item(), menu_edit_item(), message_content(), mitem_content(), mitem_post(), mood_init(), nav(), network_content(), network_init(), new_contact(), notifier_run(), parse_app_description(), photo_upload(), photos_albums_list(), photos_content(), photos_create_item(), photos_list_photos(), ping_init(), poke_init(), post_activity_item(), post_to_red_delete_comment(), post_to_red_delete_post(), post_to_red_displayAdminContent(), post_to_red_post(), probe_content(), process_channel_sync_delivery(), process_delivery(), process_mail_delivery(), profile_init(), profile_photo_init(), profile_photo_post(), profiles_content(), profiles_post(), profperm_init(), rbmark_content(), rbmark_post(), rpost_content(), send_message(), settings_post(), sources_post(), tagger_content(), thing_content(), thing_init(), uexport_init(), update_remote_id(), wall_attach_post(), wall_upload_post(), webpages_content(), wfinger_init(), widget_settings_menu(), zot_build_packet(), zot_finger(), and zot_refresh().

$cookies = 'store/[data]/frphoto_cookie_' . $channel_address

Referenced by frphotos_init().

$fr_server = urldecode($argv[3])

Referenced by frphotos_init().

$photo_id = $argv[1]
$r
Initial value:
= q("select * from photo where resource_id = '%s' and uid = %d limit 1",
dbesc($args['resource_id']),
intval($channel['channel_id'])
)

Referenced by abook_connections(), abook_self(), abook_toggle_flag(), account_remove(), account_total(), account_verify_password(), achievements_content(), acl_init(), add_source_route(), admin_content(), admin_page_dbsync(), admin_page_hubloc_post(), admin_page_summary(), all_friends(), allowed_public_recips(), api_call(), api_direct_messages_box(), api_direct_messages_new(), api_favorites(), api_ff_ids(), api_format_items(), api_get_user(), api_login(), api_oauth_access_token(), api_oauth_request_token(), api_statuses_destroy(), api_statuses_f(), api_statuses_home_timeline(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_repeat(), api_statuses_show(), api_statuses_user_timeline(), app_destroy(), app_installed(), app_list(), app_store(), app_update(), appman_content(), attach_by_hash(), attach_by_hash_nodata(), attach_change_permissions(), attach_count_files(), attach_delete(), attach_init(), attach_list_files(), attach_mkdir(), attach_store(), authenticate_success(), autoname(), bb_translate_video(), block_content(), blocks_content(), bookmark_add(), build_sync_packet(), categories_widget(), change_channel(), chanman_remove_everything_from_network(), channel_content(), channel_remove(), channel_total(), channelx_by_hash(), channelx_by_n(), channelx_by_nick(), chanview_content(), chat_content(), chat_message(), chatroom_create(), chatroom_destroy(), chatroom_enter(), chatroom_leave(), chatroom_list(), chatsvc_content(), chatsvc_post(), check_account_email(), check_account_invite(), check_config(), check_item_source(), check_webbie(), collect_recipients(), comanche_block(), common_content(), common_friends(), common_friends_visitor_widget(), common_friends_zcid(), connect_init(), connect_post(), connections_content(), connections_post(), connedit_init(), connedit_post(), construct_activity_object(), construct_activity_target(), consume_feed(), contact_block(), contact_profile_assign(), contact_remove(), contact_select(), contactgroup_content(), count_all_friends(), count_common_friends(), count_common_friends_zcid(), create_account(), create_identity(), RedDirectory\createDirectory(), RedDirectory\createFile(), current_theme(), delegate_content(), delete_imported_item(), delete_item_lowlevel(), deliver_run(), diaspora_asphoto(), diaspora_comment(), diaspora_conversation(), diaspora_dispatch_public(), diaspora_get_contact_by_handle(), diaspora_handle_from_contact(), diaspora_like(), diaspora_message(), diaspora_photo(), diaspora_post(), diaspora_profile(), diaspora_request(), diaspora_reshare(), diaspora_retraction(), diaspora_send_images(), diaspora_send_mail(), diaspora_signed_retraction(), diaspora_transmit(), dir_tagadelic(), dir_tagblock(), dirprofile_init(), dirsearch_content(), display_content(), downgrade_accounts(), drop_item(), editlayout_content(), editwebpage_content(), encode_item(), event_addtocal(), event_store_event(), event_store_item(), events_content(), expand_groups(), expire_run(), externals_run(), fbrowser_content(), feed_init(), fileas_widget(), filer_content(), filerm_content(), filestorage_content(), find_diaspora_person_by_handle(), find_filename_by_hash(), find_folder_hash_by_attach_hash(), RedBrowser\findAttachHash(), RedBrowser\findAttachIdByHash(), first_post_date(), fix_attached_photo_permissions(), fix_private_photos(), fix_system_urls(), frphotos_init(), fsuggest_content(), fsuggest_post(), RedBrowser\generateDirectoryIndex(), Cache\get(), RedFile\get(), get_all_perms(), get_birthdays(), get_channel_by_nick(), get_cloudpath(), get_diaspora_key(), get_events(), get_item_elements(), get_online_status(), get_plugin_info(), get_sys_channel(), get_theme_info(), get_things(), get_words(), RedDirectory\getDir(), RedDirectory\getLastModified(), gprobe_run(), group_add(), group_add_member(), group_byname(), group_content(), group_get_members(), group_post(), group_rec_byhash(), group_rmv(), group_rmv_member(), group_select(), group_side(), groups_containing(), handle_tag(), hcard_init(), home_content(), identity_basic_export(), identity_check_service_class(), identity_selector(), import_author_rss(), import_author_zot(), import_channel_photo(), import_directory_keywords(), import_directory_profile(), import_post(), import_profile_photo(), import_site(), import_xchan(), importelm_post(), install_plugin(), invite_post(), is_matrix_url(), is_sys_channel(), item_add_cid(), item_check_service_class(), item_expire(), item_getfeedattach(), item_message_id(), item_post(), item_remove_cid(), item_store(), item_store_update(), items_fetch(), layout_select(), layouts_content(), like_content(), list_public_sites(), load_config(), load_contact_links(), load_database(), load_hooks(), load_pconfig(), load_xconfig(), local_dir_update(), lockview_content(), FKOAuth1\loginUser(), FKOAuthDataStore\lookup_consumer(), FKOAuthDataStore\lookup_nonce(), FKOAuthDataStore\lookup_token(), lostpass_content(), lostpass_post(), magic_init(), mail_content(), mail_store(), manage_content(), mark_orphan_hubsxchans(), match_content(), match_openid(), member_of(), menu_add_item(), menu_content(), menu_create(), menu_del_item(), menu_delete(), menu_delete_id(), menu_edit(), menu_edit_item(), menu_fetch(), menu_fetch_id(), menu_list(), menu_post(), message_content(), mimetype_select(), mini_group_select(), mitem_content(), mitem_post(), mood_init(), msearch_post(), netgrowth_content(), network_content(), FKOAuthDataStore\new_access_token(), new_contact(), FKOAuthDataStore\new_request_token(), notification(), notifications_content(), notifications_post(), notifier_run(), notify_content(), notify_init(), oauth_get_client(), onedirsync_run(), onepoll_run(), openid_content(), page_content(), pagelist_widget(), pdl_selector(), perm_is_allowed(), photo_init(), photo_new_resource(), photo_upload(), photos_album_exists(), photos_album_get_db_idstr(), photos_content(), photos_list_photos(), photos_post(), ping_init(), plugin_is_installed(), poco_init(), poco_load(), poke_content(), poke_init(), poller_run(), post_activity_item(), post_post(), preg_heart(), private_messages_drop(), private_messages_fetch_conversation(), private_messages_fetch_message(), private_messages_list(), process_channel_sync_delivery(), process_delivery(), process_mail_delivery(), process_profile_delivery(), profile_init(), profile_load(), profile_photo_post(), profile_photo_set_profile_perms(), profile_sidebar(), profiles_content(), profiles_init(), profiles_post(), profperm_content(), prune_hub_reinstalls(), public_recips(), RedFile\put(), dba_mysql\q(), dba_mysqli\q(), queue_run(), random_profile(), rconnect_url(), receive_post(), RedChannelList(), RedCollectionData(), RedFileData(), ref_session_read(), ref_session_write(), register_content(), register_hook(), register_post(), relative_date(), reload_plugins(), remote_online_status(), remove_all_xchan_resources(), remove_community_tag(), replace_macros(), FriendicaSmartyEngine\replace_macros(), retain_item(), rmagic_init(), rmagic_post(), rpost_content(), photo_driver\save(), search_ac_init(), search_content(), send_message(), send_reg_approval_email(), send_status_notifications(), service_class_allows(), service_class_fetch(), Cache\set(), set_default_login_identity(), RedDirectory\setName(), RedFile\setName(), settings_post(), setup_content(), share_init(), siteinfo_content(), siteinfo_init(), sitelist_init(), sources_content(), sources_post(), starred_init(), photo_driver\store(), store_item_tag(), stream_perms_api_uids(), stream_perms_xchans(), subthread_content(), suggest_content(), suggestion_query(), sync_directories(), tag_deliver(), tagadelic(), tagblock(), tagger_content(), tagrm_content(), tagrm_post(), tgroup_check(), theme_attachments(), thing_content(), thing_init(), unregister_hook(), update_birthdays(), update_directory_entry(), update_remote_id(), update_suggestions(), user_allow(), user_approve(), user_deny(), RedBasicAuth\validateUserPass(), vcard_from_xchan(), verify_email_address(), viewconnections_content(), viewsrc_content(), vote_content(), vote_init(), vote_post(), wall_attach_post(), webpages_content(), wfinger_init(), widget_bookmarkedchats(), widget_chatroom_list(), widget_filer(), widget_follow(), widget_item(), widget_savedsearch(), widget_suggestedchats(), widget_suggestions(), widget_tagcloud(), xchan_content(), xrd_init(), z_input_filter(), z_readdir(), zfinger_init(), zid_init(), zot_feed(), zot_finger(), zot_gethub(), zot_import(), zot_process_response(), zot_refresh(), zotfeed_init(), and zping_content().

if ($r) $ret = photo_upload($channel,$channel,$args)

Referenced by Template\_replcb_debug(), Template\_replcb_for(), Template\_replcb_inc(), activity_sanitise(), api_apply_template(), api_direct_messages_box(), api_direct_messages_new(), api_favorites(), api_ff_ids(), api_format_as(), api_format_items(), api_format_messages(), api_get_user(), api_item_get_user(), api_statuses_f(), api_statuses_home_timeline(), api_statuses_mentions(), api_statuses_public_timeline(), api_statuses_show(), api_statuses_user_timeline(), app_encode(), app_store(), app_update(), array_sanitise(), attach_by_hash(), attach_by_hash_nodata(), attach_count_files(), attach_list_files(), attach_mkdir(), attach_store(), build_querystring(), change_channel(), chanman_remove_everything_from_network(), chanview_content(), chat_content(), chat_message(), chatroom_create(), chatroom_destroy(), chatsvc_content(), chatsvc_init(), chatsvc_post(), comanche_webpage(), create_identity(), day_translate(), dbq(), decode_tags(), del_config(), del_pconfig(), del_xconfig(), diaspora_dispatch(), diaspora_is_reshare(), diaspora_request(), diaspora_send_status(), dir_parse_query(), dir_query_build(), dirsearch_content(), downgrade_accounts(), encode_item_flags(), encode_item_terms(), encode_item_xchan(), expand_acl(), expand_groups(), format_notification(), get_all_perms(), get_config_from_storage(), get_online_status(), get_perms(), get_system_apps(), get_tags(), get_terms_oftype(), App\get_widgets(), RedFile\getETag(), group_add(), group_get_members(), group_rmv(), groups_containing(), home_init(), identity_basic_export(), identity_check_service_class(), import_post(), import_xchan(), item_check_service_class(), item_getfeedattach(), item_getfeedtags(), item_post(), item_store(), item_store_update(), list_post_dates(), list_public_sites(), load_contact_links(), magic_init(), mail_post(), netgrowth_content(), FKOAuthDataStore\new_access_token(), new_contact(), normalise_link(), notes_init(), oembed_format_object(), oexchange_content(), online_init(), parse_app_description(), perms2str(), photo_upload(), photos_albums_list(), photos_content(), photos_list_photos(), poco_init(), post_activity_item(), post_init(), post_post(), posted_dates(), probe_well_known(), pubsites_content(), receive_post(), RedChannelList(), RedCollectionData(), send_message(), set_config(), set_pconfig(), set_xconfig(), site_default_perms(), stream_perms_api_uids(), stream_perms_xchans(), string_splitter(), tagger_content(), thing_init(), unxmlify(), update_suggestions(), user_allow(), user_approve(), RedBrowser\userReadableSize(), wall_upload_post(), widget_archive(), z_fetch_url(), z_post_url(), z_readdir(), zfinger_init(), and zot_get_hublocs().