X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofiles.php;h=208f8545e3a6c7c7b609a19794e06c44ceacea0a;hb=9b0584e59338f0b75c6b8a9a1b5def33da5de5f6;hp=3f5980ba69d5bf1ac051bf8fcc260b8597b2f44c;hpb=a42c9616f97125b059f395b9b023fe1516a52d75;p=friendica.git diff --git a/mod/profiles.php b/mod/profiles.php index 3f5980ba69..208f8545e3 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -63,8 +63,6 @@ function profiles_post(&$a) { $education = escape_tags(trim($_POST['education'])); if(x($_POST,'profile_in_directory')) $publish = (($_POST['profile_in_directory'] == 1) ? 1: 0); - if(! in_array($gender,array('','Male','Female','Other'))) - $gender = ''; $r = q("UPDATE `profile` SET `profile-name` = '%s', @@ -278,6 +276,12 @@ function profiles_content(&$a) { '$no_selected' => (($r[0]['publish'] == 0) ? " checked=\"checked\" " : "") )); + $opt_tpl = file_get_contents("view/profile-hide-friends.tpl"); + $hide_friends = replace_macros($opt_tpl,array( + '$yes_selected' => (($r[0]['hide-friends']) ? " checked=\"checked\" " : ""), + '$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "") + )); + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); $a->page['htmlhead'] .= ""; @@ -295,7 +299,7 @@ function profiles_content(&$a) { '$default' => (($is_default) ? "

This is your public profile.
It may be visible to anybody using the internet.

" : ""), '$name' => $r[0]['name'], '$dob' => dob($r[0]['dob']), - '$hide_birth' => (($r[0]['dob_hide']) ? " checked=\"checked\" " : ""), + '$hide_friends' => $hide_friends, '$address' => $r[0]['address'], '$locality' => $r[0]['locality'], '$region' => $r[0]['region'],