mirror of
https://github.com/friendica/friendica
synced 2024-12-23 02:00:17 +00:00
tag privacy settings
This commit is contained in:
parent
b20afbc9e4
commit
efe3365431
2 changed files with 23 additions and 7 deletions
|
@ -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,
|
||||
|
|
|
@ -51,6 +51,12 @@ $hide_friends
|
|||
|
||||
$hide_wall
|
||||
|
||||
$blockwall
|
||||
|
||||
$blocktags
|
||||
|
||||
{{inc field_input.tpl with $field=$expire }}{{endinc}}
|
||||
|
||||
<div id="settings-default-perms" class="settings-default-perms" >
|
||||
<div id="settings-default-perms-menu" class="fakelink" onClick="openClose('settings-default-perms-select');" >$permissions $permdesc</div>
|
||||
<div id="settings-default-perms-menu-end"></div>
|
||||
|
@ -63,11 +69,6 @@ $hide_wall
|
|||
</div>
|
||||
<div id="settings-default-perms-end"></div>
|
||||
|
||||
{{inc field_checkbox.tpl with $field=$blockwall }}{{endinc}}
|
||||
|
||||
{{inc field_input.tpl with $field=$expire }}{{endinc}}
|
||||
|
||||
|
||||
|
||||
<div class="settings-submit-wrapper" >
|
||||
<input type="submit" name="submit" class="settings-submit" value="Submit" />
|
||||
|
|
Loading…
Reference in a new issue