User: remove legacy public_level / is_public field
This commit is contained in:
parent
c32b93ff4d
commit
c5957fbdfd
5 changed files with 9 additions and 11 deletions
|
@ -183,9 +183,9 @@ sub profile {
|
||||||
'profile',
|
'profile',
|
||||||
name => $name,
|
name => $name,
|
||||||
uid => $user->{id},
|
uid => $user->{id},
|
||||||
|
privacy => $user,
|
||||||
bio => $profile->{bio}{html},
|
bio => $profile->{bio}{html},
|
||||||
metadata => $profile->{metadata},
|
metadata => $profile->{metadata},
|
||||||
public_level => $user->{public_level},
|
|
||||||
is_self => $is_self,
|
is_self => $is_self,
|
||||||
following => ( $relation and $relation eq 'follows' ) ? 1 : 0,
|
following => ( $relation and $relation eq 'follows' ) ? 1 : 0,
|
||||||
follow_requested => ( $relation and $relation eq 'requests_follow' )
|
follow_requested => ( $relation and $relation eq 'requests_follow' )
|
||||||
|
@ -533,7 +533,7 @@ sub user_status {
|
||||||
any => {
|
any => {
|
||||||
template => 'user_status',
|
template => 'user_status',
|
||||||
name => $name,
|
name => $name,
|
||||||
public_level => $user->{public_level},
|
privacy => $user,
|
||||||
journey => $status,
|
journey => $status,
|
||||||
journey_visibility => $visibility,
|
journey_visibility => $visibility,
|
||||||
twitter => \%tw_data,
|
twitter => \%tw_data,
|
||||||
|
@ -615,7 +615,7 @@ sub status_card {
|
||||||
$self->render(
|
$self->render(
|
||||||
'_public_status_card',
|
'_public_status_card',
|
||||||
name => $name,
|
name => $name,
|
||||||
public_level => $user->{public_level},
|
privacy => $user,
|
||||||
journey => $status,
|
journey => $status,
|
||||||
journey_visibility => $visibility,
|
journey_visibility => $visibility,
|
||||||
from_profile => $self->param('profile') ? 1 : 0,
|
from_profile => $self->param('profile') ? 1 : 0,
|
||||||
|
|
|
@ -188,7 +188,6 @@ sub get_privacy_by {
|
||||||
return {
|
return {
|
||||||
id => $user->{id},
|
id => $user->{id},
|
||||||
name => $user->{name},
|
name => $user->{name},
|
||||||
public_level => $user->{public_level}, # todo remove?
|
|
||||||
default_visibility => $user->{public_level} & 0x7f,
|
default_visibility => $user->{public_level} & 0x7f,
|
||||||
default_visibility_str =>
|
default_visibility_str =>
|
||||||
$visibility_itoa{ $user->{public_level} & 0x7f },
|
$visibility_itoa{ $user->{public_level} & 0x7f },
|
||||||
|
@ -414,7 +413,6 @@ sub get {
|
||||||
notifications => $user->{notifications},
|
notifications => $user->{notifications},
|
||||||
accept_follows => $user->{accept_follows} == 2 ? 1 : 0,
|
accept_follows => $user->{accept_follows} == 2 ? 1 : 0,
|
||||||
accept_follow_requests => $user->{accept_follows} == 1 ? 1 : 0,
|
accept_follow_requests => $user->{accept_follows} == 1 ? 1 : 0,
|
||||||
is_public => $user->{public_level},
|
|
||||||
default_visibility => $user->{public_level} & 0x7f,
|
default_visibility => $user->{public_level} & 0x7f,
|
||||||
default_visibility_str =>
|
default_visibility_str =>
|
||||||
$visibility_itoa{ $user->{public_level} & 0x7f },
|
$visibility_itoa{ $user->{public_level} & 0x7f },
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<i class="material-icons right"><%= visibility_icon($journey_visibility) %></i>
|
<i class="material-icons right"><%= visibility_icon($journey_visibility) %></i>
|
||||||
% }
|
% }
|
||||||
</span>
|
</span>
|
||||||
% if ($public_level & 0x04 and $journey->{comment}) {
|
% if ($privacy->{comments_visible} and $journey->{comment}) {
|
||||||
<p>„<%= $journey->{comment} %>“</p>
|
<p>„<%= $journey->{comment} %>“</p>
|
||||||
% }
|
% }
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 publicstatuscol" data-user="<%= $name %>" data-profile="1">
|
<div class="col s12 publicstatuscol" data-user="<%= $name %>" data-profile="1">
|
||||||
%= include '_public_status_card', name => $name, public_level => $public_level, journey => $journey, journey_visibility => $journey_visibility, from_profile => 1
|
%= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, journey_visibility => $journey_visibility, from_profile => 1
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
% if ($journeys and @{$journeys}) {
|
% if ($journeys and @{$journeys}) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 publicstatuscol" data-user="<%= $name %>">
|
<div class="col s12 publicstatuscol" data-user="<%= $name %>">
|
||||||
%= include '_public_status_card', name => $name, public_level => $public_level, journey => $journey, journey_visibility => $journey_visibility
|
%= include '_public_status_card', name => $name, privacy => $privacy, journey => $journey, journey_visibility => $journey_visibility
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue