summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Controller/Account.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Controller/Account.pm')
-rw-r--r--lib/Travelynx/Controller/Account.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm
index 10200a6..c68a22c 100644
--- a/lib/Travelynx/Controller/Account.pm
+++ b/lib/Travelynx/Controller/Account.pm
@@ -261,6 +261,13 @@ sub privacy {
$public_level &= ~0x30;
}
+ if ( $self->param('history_age') eq 'infinite' ) {
+ $public_level |= 0x40;
+ }
+ else {
+ $public_level &= ~0x40;
+ }
+
$self->users->set_privacy(
uid => $user->{id},
level => $public_level
@@ -281,6 +288,8 @@ sub privacy {
: $public_level & 0x20 ? 'extern'
: 'private'
);
+ $self->param(
+ history_age => $public_level & 0x40 ? 'infinite' : 'month' );
$self->render( 'privacy', name => $user->{name} );
}
}