$work = escape_tags(trim($_POST['work']));
$education = escape_tags(trim($_POST['education']));
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
- $hidewall = (($_POST['hidewall'] == 1) ? 1: 0);
-
$r = q("UPDATE `profile`
SET `profile-name` = '%s',
`romance` = '%s',
`work` = '%s',
`education` = '%s',
- `hide-friends` = %d,
- `hidewall` = %d
+ `hide-friends` = %d
WHERE `id` = %d AND `uid` = %d LIMIT 1",
dbesc($profile_name),
dbesc($name),
dbesc($work),
dbesc($education),
intval($hide_friends),
- intval($hidewall),
intval($a->argv[1]),
intval($_SESSION['uid'])
);
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
));
- $opt_tpl = get_markup_template("profile-hide-wall.tpl");
- $hide_wall = replace_macros($opt_tpl,array(
- '$desc' => t('Hide profile details and all your messages from unknown viewers?'),
- '$yes_str' => t('Yes'),
- '$no_str' => t('No'),
- '$yes_selected' => (($r[0]['hidewall']) ? " checked=\"checked\" " : ""),
- '$no_selected' => (($r[0]['hidewall'] == 0) ? " checked=\"checked\" " : "")
- ));
-
-
$a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl()));
$a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"include/country.js\" ></script>";
'$pdesc' => $r[0]['pdesc'],
'$dob' => dob($r[0]['dob']),
'$hide_friends' => $hide_friends,
- '$hide_wall' => $hide_wall,
'$address' => $r[0]['address'],
'$locality' => $r[0]['locality'],
'$region' => $r[0]['region'],
$page_flags = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0);
$blockwall = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted!
+ $hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
+ $hidewall = (($_POST['hidewall'] == 1) ? 1: 0);
+
+
+
+
$mail_server = ((x($_POST,'mail_server')) ? $_POST['mail_server'] : '');
$mail_port = ((x($_POST,'mail_port')) ? $_POST['mail_port'] : '');
$mail_ssl = ((x($_POST,'mail_ssl')) ? strtolower(trim($_POST['mail_ssl'])) : '');
info( t('Settings updated.') . EOL);
$r = q("UPDATE `profile`
- SET `publish` = %d, `net-publish` = %d
+ SET `publish` = %d,
+ `net-publish` = %d,
+ `hide-friends` = %d,
+ `hidewall` = %d
WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
intval($publish),
intval($net_publish),
+ intval($hide_friends),
+ intval($hidewall),
intval(local_user())
);
else {
$opt_tpl = get_markup_template("profile-in-directory.tpl");
$profile_in_dir = replace_macros($opt_tpl,array(
- '$desc' => t('Publish your default profile in site directory?'),
+ '$desc' => t('Publish your default profile in your local site directory?'),
'$yes_str' => t('Yes'),
'$no_str' => t('No'),
'$yes_selected' => (($profile['publish']) ? " checked=\"checked\" " : ""),
$opt_tpl = get_markup_template("profile-in-netdir.tpl");
$profile_in_net_dir = replace_macros($opt_tpl,array(
- '$desc' => t('Publish your default profile in global social directory?'),
+ '$desc' => t('Publish your default profile in the global social directory?'),
'$yes_str' => t('Yes'),
'$no_str' => t('No'),
'$yes_selected' => (($profile['net-publish']) ? " checked=\"checked\" " : ""),
else
$profile_in_net_dir = '';
+
+ $opt_tpl = get_markup_template("profile-hide-friends.tpl");
+ $hide_friends = replace_macros($opt_tpl,array(
+ '$desc' => t('Hide your contact/friend list from viewers of your default profile?'),
+ '$yes_str' => t('Yes'),
+ '$no_str' => t('No'),
+ '$yes_selected' => (($profile['hide-friends']) ? " checked=\"checked\" " : ""),
+ '$no_selected' => (($profile['hide-friends'] == 0) ? " checked=\"checked\" " : "")
+ ));
+
+ $opt_tpl = get_markup_template("profile-hide-wall.tpl");
+ $hide_wall = replace_macros($opt_tpl,array(
+ '$desc' => t('Hide profile details and all your messages from unknown viewers?'),
+ '$yes_str' => t('Yes'),
+ '$no_str' => t('No'),
+ '$yes_selected' => (($profile['hidewall']) ? " checked=\"checked\" " : ""),
+ '$no_selected' => (($profile['hidewall'] == 0) ? " checked=\"checked\" " : "")
+ ));
+
+
+
+
+
+
$loc_checked = (($a->user['allow_location'] == 1) ? " checked=\"checked\" " : "");
$invisible = (((! $profile['publish']) && (! $profile['net-publish']))
'$lbl_pass4' => t('Confirm:'),
'$lbl_advn' => t('Advanced Page Settings'),
'$baseurl' => $a->get_baseurl(),
+ '$hide_friends' => $hide_friends,
+ '$hide_wall' => $hide_wall,
'$oidhtml' => $oidhtml,
'$uexport' => $uexport,
'$uid' => local_user(),