aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-24 21:11:05 -0700
committerFriendika <info@friendika.com>2011-10-24 21:11:05 -0700
commitefe3365431f4641c27f01e67d63832db261ffb82 (patch)
tree4f6a8f9045f51ab5e4b32f363a0533c3d8d13b8e /mod
parentb20afbc9e49f00fa01c61e9705889247e7cb505e (diff)
downloadvolse-hubzilla-efe3365431f4641c27f01e67d63832db261ffb82.tar.gz
volse-hubzilla-efe3365431f4641c27f01e67d63832db261ffb82.tar.bz2
volse-hubzilla-efe3365431f4641c27f01e67d63832db261ffb82.zip
tag privacy settings
Diffstat (limited to 'mod')
-rw-r--r--mod/settings.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 8ed03dba5..522ae52de 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -170,6 +170,7 @@ function settings_post(&$a) {
$old_visibility = (((x($_POST,'visibility')) && (intval($_POST['visibility']) == 1)) ? 1 : 0);
$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!
+ $blocktags = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted!
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
$hidewall = (($_POST['hidewall'] == 1) ? 1: 0);
@@ -244,7 +245,7 @@ function settings_post(&$a) {
$openidserver = '';
}
- $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d WHERE `uid` = %d LIMIT 1",
+ $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d WHERE `uid` = %d LIMIT 1",
dbesc($username),
dbesc($email),
dbesc($openid),
@@ -263,6 +264,7 @@ function settings_post(&$a) {
dbesc($openidserver),
intval($blockwall),
intval($hidewall),
+ intval($blocktags),
intval(local_user())
);
if($r)
@@ -450,6 +452,7 @@ function settings_content(&$a) {
$maxreq = $a->user['maxreq'];
$expire = ((intval($a->user['expire'])) ? $a->user['expire'] : '');
$blockwall = $a->user['blockwall'];
+ $blocktags = $a->user['blocktags'];
if(! strlen($a->user['timezone']))
$timezone = date_default_timezone_get();
@@ -513,6 +516,17 @@ function settings_content(&$a) {
));
+ $blockwall = replace_macros($opt_tpl,array(
+ '$field' => array('blockwall', t('Allow friends to post to your profile page?'), ! $a->user['blockwall'], '', array(t('No'),t('Yes'))),
+
+ ));
+
+
+ $blocktags = replace_macros($opt_tpl,array(
+ '$field' => array('blocktags', t('Allow friends to tag your posts?'), ! $a->user['blocktags'], '', array(t('No'),t('Yes'))),
+
+ ));
+
$invisible = (((! $profile['publish']) && (! $profile['net-publish']))
? true : false);
@@ -588,7 +602,8 @@ function settings_content(&$a) {
'$visibility' => $profile['net-publish'],
'$aclselect' => populate_acl($a->user,$celeb),
- '$blockwall'=> array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
+ '$blockwall'=> $blockwall, // array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
+ '$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
'$expire' => array('expire', t("Automatically expire posts after days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
'$profile_in_dir' => $profile_in_dir,