summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Travelynx.pm3
-rw-r--r--lib/Travelynx/Controller/Account.pm18
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index 2b34b99..661572e 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -187,6 +187,9 @@ sub startup {
status_intern => 0x01,
status_extern => 0x02,
status_comment => 0x04,
+ history_intern => 0x10,
+ history_latest => 0x20,
+ history_full => 0x40,
};
}
);
diff --git a/lib/Travelynx/Controller/Account.pm b/lib/Travelynx/Controller/Account.pm
index cef79a5..135c52b 100644
--- a/lib/Travelynx/Controller/Account.pm
+++ b/lib/Travelynx/Controller/Account.pm
@@ -236,6 +236,19 @@ sub privacy {
else {
$public_level &= ~0x04;
}
+
+ if ( $self->param('history_level') eq 'intern' ) {
+ $public_level |= 0x10;
+ $public_level &= ~0x20;
+ }
+ elsif ( $self->param('history_level') eq 'extern' ) {
+ $public_level |= 0x20;
+ $public_level &= ~0x10;
+ }
+ else {
+ $public_level &= ~0x30;
+ }
+
$self->set_privacy( $user->{id}, $public_level );
$self->flash( success => 'privacy' );
@@ -248,6 +261,11 @@ sub privacy {
: 'private'
);
$self->param( public_comment => $public_level & 0x04 ? 1 : 0 );
+ $self->param(
+ history_level => $public_level & 0x10 ? 'intern'
+ : $public_level & 0x20 ? 'extern'
+ : 'private'
+ );
$self->render( 'privacy', name => $user->{name} );
}
}