The Hubzilla
 All Classes Namespaces Files Functions Variables Pages
config.php File Reference

Arbitrary configuration storage. More...

Functions

 load_config ($family)
 
 get_config ($family, $key, $default=false)
 
 set_config ($family, $key, $value)
 
 del_config ($family, $key)
 
 load_pconfig ($uid)
 
 get_pconfig ($uid, $family, $key, $default=false)
 
 set_pconfig ($uid, $family, $key, $value)
 
 del_pconfig ($uid, $family, $key)
 
 load_xconfig ($xchan)
 
 get_xconfig ($xchan, $family, $key, $default=false)
 
 set_xconfig ($xchan, $family, $key, $value)
 
 del_xconfig ($xchan, $family, $key)
 
 load_aconfig ($account_id)
 
 get_aconfig ($account_id, $family, $key, $default=false)
 
 set_aconfig ($account_id, $family, $key, $value)
 
 del_aconfig ($account_id, $family, $key)
 
 load_abconfig ($chan, $xhash, $family= '')
 
 get_abconfig ($chan, $xhash, $family, $key, $default=false)
 
 set_abconfig ($chan, $xhash, $family, $key, $value)
 
 del_abconfig ($chan, $xhash, $family, $key)
 
 load_iconfig (&$item)
 
 get_iconfig (&$item, $family, $key, $default=false)
 
 set_iconfig (&$item, $family, $key, $value, $sharing=false)
 
 del_iconfig (&$item, $family, $key)
 
 load_sconfig ($server_id)
 
 get_sconfig ($server_id, $family, $key, $default=false)
 
 set_sconfig ($server_id, $family, $key, $value)
 
 del_sconfig ($server_id, $family, $key)
 

Detailed Description

Arbitrary configuration storage.

Arrays get stored as serialized strings. Booleans are stored as integer 0/1.

  • 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_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 = App::get_observer_hash();
    if ($observer) {
    $var = get_xconfig($observer, 'category', 'key');
    }
  • get_config() and set_config() can also be done through the command line tool util/config
  • get_pconfig() and set_pconfig() can also be done through the command line tool util/pconfig and takes a channel_id as first argument.

Function Documentation

del_abconfig (   $chan,
  $xhash,
  $family,
  $key 
)
del_aconfig (   $account_id,
  $family,
  $key 
)

Referenced by auto_channel_create().

del_iconfig ( $item,
  $family,
  $key 
)
del_sconfig (   $server_id,
  $family,
  $key 
)
del_xconfig (   $xchan,
  $family,
  $key 
)

Referenced by import_xchan().

get_aconfig (   $account_id,
  $family,
  $key,
  $default = false 
)

Referenced by auto_channel_create().

get_config (   $family,
  $key,
  $default = false 
)

Referenced by Zotlabs\Lib\DB_Upgrade\__construct(), Zotlabs\Lib\ThreadItem\__construct(), Zotlabs\Web\Router\__construct(), account_allow(), account_approve(), account_service_class_fetch(), account_verify_password(), Zotlabs\Module\Admin\admin_page_summary(), allowed_email(), allowed_url(), Zotlabs\Lib\Apps\app_order(), Zotlabs\Lib\Apps\app_render(), attach_store(), Zotlabs\Lib\NativeWikiPage\bbcode(), bbcode(), build_sync_packet(), channel_manual_conv_update(), check_account_admin(), check_account_invite(), check_channelallowed(), check_config(), check_cron_broken(), check_for_new_perms(), check_plugin_versions(), check_siteallowed(), check_upstream_directory(), check_webbie(), check_zotinfo(), cli_startup(), construct_page(), consume_feed(), Zotlabs\Module\Cover_photo\cover_photo_crop_ui_head(), create_account(), create_identity(), create_sys_channel(), Zotlabs\Web\HTTPSig\decrypt_sigheader(), delivery_report_is_storable(), detect_language(), dir_sort_links(), dir_tagadelic(), dlogger(), do_delivery(), dob(), downgrade_accounts(), encode_item(), feature_enabled(), feature_level(), feed_hublinks(), find_upstream_directory(), findpeople_widget(), Zotlabs\Module\Pubsites\get(), Zotlabs\Module\Service_limits\get(), Zotlabs\Module\Apps\get(), Zotlabs\Module\Linkinfo\get(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Admin\Dbsync\get(), Zotlabs\Module\Fhublocs\get(), Zotlabs\Module\Search\get(), Zotlabs\Module\Dirsearch\get(), Zotlabs\Module\Siteinfo\get(), Zotlabs\Module\Profperm\get(), Zotlabs\Module\Admin\Logs\get(), Zotlabs\Module\Admin\Themes\get(), Zotlabs\Module\Admin\Features\get(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Admin\Security\get(), Zotlabs\Module\Home\get(), Zotlabs\Module\Lostpass\get(), Zotlabs\Module\Directory\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Ratings\get(), Zotlabs\Module\Invite\get(), Zotlabs\Module\Settings\Account\get(), Zotlabs\Module\New_channel\get(), Zotlabs\Module\Settings\Display\get(), Zotlabs\Module\Rate\get(), Zotlabs\Module\Poke\get(), Zotlabs\Module\Admin\Site\get(), Zotlabs\Module\Register\get(), Zotlabs\Module\Events\get(), Zotlabs\Module\Settings\Channel\get(), Zotlabs\Module\Connedit\get(), Zotlabs\Module\Profiles\get(), get_all_perms(), Zotlabs\Lib\ThreadItem\get_comment_box(), Zotlabs\Render\Comanche\get_condition_var(), get_default_profile_photo(), get_directory_primary(), get_directory_realm(), get_directory_setting(), get_features(), get_mail_elements(), get_max_import_size(), get_poke_verbs(), get_poller_runtime(), get_profile_fields_advanced(), get_profile_fields_basic(), get_site_info(), Zotlabs\Lib\ThreadItem\get_template_data(), get_zcard(), get_zcard_embed(), guess_image_type(), ical_wrapper(), photo_gd\imageString(), Zotlabs\Module\Import\import_account(), import_xchan(), Zotlabs\Module\Well_known\init(), Zotlabs\Module\Ratingsearch\init(), Zotlabs\Module\Wfinger\init(), Zotlabs\Module\Ratings\init(), Zotlabs\Module\Home\init(), Zotlabs\Module\Photo\init(), Zotlabs\Module\Regdir\init(), Zotlabs\Module\Ping\init(), Zotlabs\Module\Acl\init(), is_public_profile(), item_expire(), photo_imagick\load(), log_failed_login(), logger(), login(), mark_orphan_hubsxchans(), nav(), Zotlabs\Module\Acl\navbar_complete(), ZotOAuth1DataStore\new_access_token(), new_contact(), new_keypair(), observer_prohibited(), oembed_action(), oembed_bbcode2html(), oembed_fetch_url(), owt_init(), Zotlabs\Lib\Apps\parse_app_description(), parseIdentityAwareHTML(), perm_is_allowed(), photo_factory(), photo_upload(), Zotlabs\Module\Settings\Account\post(), Zotlabs\Module\Lostpass\post(), Zotlabs\Module\Invite\post(), Zotlabs\Module\Post\post(), Zotlabs\Module\Register\post(), Zotlabs\Module\New_channel\post(), proc_run(), Zotlabs\Module\Profile_photo\profile_photo_crop_ui_head(), public_recips(), random_profile(), reload_plugins(), remove_all_xchan_resources(), remove_obsolete_hublocs(), Zotlabs\Web\Session\return_check(), Zotlabs\Access\PermissionRoles\role_perms(), Zotlabs\Daemon\Poller\run(), Zotlabs\Daemon\Cron_daily\run(), Zotlabs\Daemon\Cron\run(), Zotlabs\Daemon\Cron_weekly\run(), Zotlabs\Daemon\Expire\run(), Zotlabs\Daemon\Thumbnail\run(), Zotlabs\Daemon\Checksites\run(), Zotlabs\Daemon\Externals\run(), Zotlabs\Daemon\Ratenotif\run(), Zotlabs\Daemon\Directory\run(), Zotlabs\Daemon\Notifier\run(), scale_external_images(), send_reg_approval_email(), send_register_success_email(), service_class_fetch(), site_default_perms(), smilies(), sslify(), Zotlabs\Lib\Enotify\submit(), sync_directories(), tag_deliver(), tgroup_check(), thread_author_menu(), Zotlabs\Thumbs\Video\Thumb(), Zotlabs\Thumbs\Pdf\Thumb(), update_modtime(), update_suggestions(), upgrade_link(), validate_email(), verify_email_address(), Zotlabs\Widget\Notifications\widget(), Zotlabs\Widget\Rating\widget(), z_fetch_url(), z_get_temp_dir(), z_get_upload_dir(), z_mail(), z_obscure(), z_post_url(), z_unobscure(), zot_build_packet(), zot_fetch(), zot_import(), zot_process_response(), zot_reply_auth_check(), zot_reply_message_request(), zot_reply_notify(), zot_reply_ping(), zot_site_info(), and zotinfo().

get_pconfig (   $uid,
  $family,
  $key,
  $default = false 
)

Referenced by Zotlabs\Lib\Permcat\__construct(), Zotlabs\Lib\ThreadStream\__construct(), Zotlabs\Lib\Apps\app_order(), attach_move(), attach_store(), autoperms_upgrade(), App\build_pagehead(), change_channel(), channel_apps(), channel_manual_conv_update(), Zotlabs\Access\Permissions\connect_perms(), construct_page(), contact_block(), contact_remove(), delivery_report_is_storable(), feature_enabled(), Zotlabs\Access\Permissions\FilledAutoperms(), findpeople_widget(), fix_attached_file_permissions(), fix_attached_photo_permissions(), Zotlabs\Module\Pubstream\get(), Zotlabs\Module\Message\get(), Zotlabs\Module\Search\get(), Zotlabs\Module\Display\get(), Zotlabs\Module\Profperm\get(), Zotlabs\Module\Pdledit\get(), Zotlabs\Module\Webpages\get(), Zotlabs\Module\Blocks\get(), Zotlabs\Module\Network\get(), Zotlabs\Module\Hq\get(), Zotlabs\Module\Rpost\get(), Zotlabs\Theme\RedbasicConfig\get(), Zotlabs\Module\Settings\Featured\get(), Zotlabs\Module\Pconfig\get(), Zotlabs\Module\Cal\get(), Zotlabs\Module\Channel\get(), Zotlabs\Module\Group\get(), Zotlabs\Module\Connect\get(), Zotlabs\Module\Chat\get(), Zotlabs\Module\Invite\get(), Zotlabs\Module\Settings\Display\get(), Zotlabs\Module\Mail\get(), Zotlabs\Module\Defperms\get(), Zotlabs\Module\Events\get(), Zotlabs\Module\Settings\Channel\get(), Zotlabs\Module\Connedit\get(), Zotlabs\Module\Photos\get(), Zotlabs\Module\Cdav\get(), Zotlabs\Lib\ThreadItem\get_comment_box(), get_online_status(), Zotlabs\Lib\ThreadItem\get_template_data(), get_theme_uid(), Zotlabs\Module\Import\import_account(), Zotlabs\Module\Notes\init(), Zotlabs\Module\Home\init(), Zotlabs\Module\Network\init(), Zotlabs\Module\Ping\init(), Zotlabs\Module\Acl\init(), item_store(), item_store_update(), items_fetch(), load_pdl(), nav(), new_contact(), Zotlabs\Access\PermissionRoles\new_custom_perms(), oembed_action(), Zotlabs\Module\Pconfig\pconfig_form(), populate_acl(), Zotlabs\Module\Settings\Channel\post(), Zotlabs\Module\Invite\post(), Zotlabs\Module\Wall_attach\post(), Zotlabs\Module\Getfile\post(), Zotlabs\Module\Item\post(), Zotlabs\Module\Connedit\post(), profile_activity(), profile_load(), profile_sidebar(), remove_community_tag(), Zotlabs\Web\Session\return_check(), Zotlabs\Daemon\Notifier\run(), set_linkified_perms(), smilies(), Zotlabs\Lib\Enotify\submit(), tag_deliver(), Zotlabs\Widget\Notes\widget(), Zotlabs\Widget\Settings_menu\widget(), Zotlabs\Widget\Archive\widget(), Zotlabs\Widget\Cdav\widget(), zot_refresh(), zot_reply_auth_check(), and zotinfo().

get_sconfig (   $server_id,
  $family,
  $key,
  $default = false 
)
get_xconfig (   $xchan,
  $family,
  $key,
  $default = false 
)
load_aconfig (   $account_id)
load_config (   $family)

Referenced by get_site_info(), and sys_boot().

load_iconfig ( $item)
load_sconfig (   $server_id)
load_xconfig (   $xchan)

Referenced by Zotlabs\Lib\XConfig\Get().

set_aconfig (   $account_id,
  $family,
  $key,
  $value 
)
set_sconfig (   $server_id,
  $family,
  $key,
  $value 
)

Referenced by import_site().

set_xconfig (   $xchan,
  $family,
  $key,
  $value 
)