aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-04 16:47:49 -0700
committerfriendica <info@friendica.com>2014-08-04 16:48:40 -0700
commit00fc23bf4e169b4a48ae0bafae12cc3946b38cd6 (patch)
treea6353842e1cb0785e36483a41647d1500a5a5318 /include
parenta0695fa04fdc73a20beb216060573e1204950df6 (diff)
downloadvolse-hubzilla-00fc23bf4e169b4a48ae0bafae12cc3946b38cd6.tar.gz
volse-hubzilla-00fc23bf4e169b4a48ae0bafae12cc3946b38cd6.tar.bz2
volse-hubzilla-00fc23bf4e169b4a48ae0bafae12cc3946b38cd6.zip
issue #551 provide import/export of profiles (if this feature is enabled)
Diffstat (limited to 'include')
-rw-r--r--include/features.php4
-rw-r--r--include/identity.php16
2 files changed, 9 insertions, 11 deletions
diff --git a/include/features.php b/include/features.php
index 383cb739f..6bb444cb6 100644
--- a/include/features.php
+++ b/include/features.php
@@ -24,8 +24,8 @@ function get_features() {
// This is per post, and different from fixed expiration 'expire' which isn't working yet
array('content_expire', t('Content Expiration'), t('Remove posts/comments and/or private messages at a future time')),
array('multi_profiles', t('Multiple Profiles'), t('Ability to create multiple profiles')),
- array('advanced_profiles', t('Advanced Profiles'), t('Additional profile sections and selections')),
-
+ array('advanced_profiles', t('Advanced Profiles'), t('Additional profile sections and selections')),
+ array('profile_export', t('Profile Import/Export'), t('Save and load profile details across sites/channels')),
array('webpages', t('Web Pages'), t('Provide managed web pages on your channel')),
array('private_notes', t('Private Notes'), t('Enables a tool to store notes and reminders')),
// prettyphoto has licensing issues and will no longer be provided in core -
diff --git a/include/identity.php b/include/identity.php
index feb249ea3..643961465 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -1313,12 +1313,12 @@ function is_public_profile() {
return false;
}
-function get_profile_fields_basic() {
- $profile_fields_basic = get_config('system','profile_fields_basic');
+function get_profile_fields_basic($filter = 0) {
+
+ $profile_fields_basic = (($filter == 0) ? get_config('system','profile_fields_basic') : null);
if(! $profile_fields_basic)
- $profile_fields_basic = array('name','pdesc','gender','dob','address','locality','region','postal_code','country_name','marital','sexual','homepage','hometown','keywords','about','contact');
+ $profile_fields_basic = array('name','pdesc','chandesc','gender','dob','dob_tz','address','locality','region','postal_code','country_name','marital','sexual','homepage','hometown','keywords','about','contact');
-// return $profile_fields_basic;
$x = array();
if($profile_fields_basic)
foreach($profile_fields_basic as $f)
@@ -1329,14 +1329,12 @@ function get_profile_fields_basic() {
}
-function get_profile_fields_advanced() {
- $basic = get_profile_fields_basic();
- $profile_fields_advanced = get_config('system','profile_fields_advanced');
+function get_profile_fields_advanced($filter = 0) {
+ $basic = get_profile_fields_basic($filter);
+ $profile_fields_advanced = (($filter == 0) ? get_config('system','profile_fields_advanced') : null);
if(! $profile_fields_advanced)
$profile_fields_advanced = array('with','howlong','politic','religion','likes','dislikes','interest','channels','music','book','film','tv','romance','work','education');
-// return $profile_fields_advanced;
-
$x = array();
if($basic)
foreach($basic as $f => $v)