aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-19 16:47:03 -0700
committerFriendika <info@friendika.com>2011-06-19 16:47:03 -0700
commitc2dcff0d02e3e4ca5b728b6d3e41a07601163011 (patch)
tree63295f064fd03864f9795ae0d935d1eb9a78eba9 /mod
parent76ddbff0b5184c85be1e7ad2ffe6fb918ed65b65 (diff)
downloadvolse-hubzilla-c2dcff0d02e3e4ca5b728b6d3e41a07601163011.tar.gz
volse-hubzilla-c2dcff0d02e3e4ca5b728b6d3e41a07601163011.tar.bz2
volse-hubzilla-c2dcff0d02e3e4ca5b728b6d3e41a07601163011.zip
move profile privacy settings to the Privacy section of the Settings page
Diffstat (limited to 'mod')
-rw-r--r--mod/newmember.php2
-rw-r--r--mod/profiles.php17
-rw-r--r--mod/settings.php43
3 files changed, 42 insertions, 20 deletions
diff --git a/mod/newmember.php b/mod/newmember.php
index eff258d21..fc53e7112 100644
--- a/mod/newmember.php
+++ b/mod/newmember.php
@@ -15,7 +15,7 @@ function newmember_content(&$a) {
$o .= '<li>' . '<a href="settings">' . t('On your <em>Settings</em> page - change your initial password. Also make a note of your Identity Address. This will be useful in making friends.') . '</a></li>' . EOL;
- $o .= '<li>' . '<a href="settings">' . t('Review the other settings, particularly the choice of publishing your profile to various directories. An unpublished directory is like an unlisted phone number. Great for privacy - but unless you inform all your friends, nobody can find you.') . '</a></li>' . EOL;
+ $o .= '<li>' . '<a href="settings">' . t('Review the other settings, particularly the privacy settings. An unpublished directory listing is like having an unlisted phone number. In general, you should probably publish your listing - unless all of your friends and potential friends know exactly how to find you.') . '</a></li>' . EOL;
$o .= '<li>' . '<a href="profile_photo">' . t('Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not.') . '</a></li>' . EOL;
diff --git a/mod/profiles.php b/mod/profiles.php
index f0821a4f8..160ca13bc 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -129,8 +129,6 @@ function profiles_post(&$a) {
$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',
@@ -161,8 +159,7 @@ function profiles_post(&$a) {
`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),
@@ -193,7 +190,6 @@ function profiles_post(&$a) {
dbesc($work),
dbesc($education),
intval($hide_friends),
- intval($hidewall),
intval($a->argv[1]),
intval($_SESSION['uid'])
);
@@ -361,16 +357,6 @@ function profiles_content(&$a) {
'$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>";
@@ -426,7 +412,6 @@ function profiles_content(&$a) {
'$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'],
diff --git a/mod/settings.php b/mod/settings.php
index 916e04270..2e942231a 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -99,6 +99,12 @@ function settings_post(&$a) {
$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'])) : '');
@@ -248,10 +254,15 @@ function settings_post(&$a) {
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())
);
@@ -388,7 +399,7 @@ function settings_content(&$a) {
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\" " : ""),
@@ -400,7 +411,7 @@ function settings_content(&$a) {
$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\" " : ""),
@@ -410,6 +421,30 @@ function settings_content(&$a) {
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']))
@@ -486,6 +521,8 @@ function settings_content(&$a) {
'$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(),