Committer: afedorov
LJSUP-8119: Remove "Comments from non friends with link" from privacy settingsU trunk/cgi-bin/LJ/Setting/CommentScreening.pm U trunk/cgi-bin/LJ/Talk.pm
Modified: trunk/cgi-bin/LJ/Setting/CommentScreening.pm =================================================================== --- trunk/cgi-bin/LJ/Setting/CommentScreening.pm 2011-03-11 05:30:46 UTC (rev 18509) +++ trunk/cgi-bin/LJ/Setting/CommentScreening.pm 2011-03-11 05:40:11 UTC (rev 18510) @@ -31,14 +31,13 @@ N => $class->ml('setting.commentscreening.option.select.none'), R => $class->ml('setting.commentscreening.option.select.anon'), F => $u->is_community ? $class->ml('setting.commentscreening.option.select.nonmembers') : $class->ml('setting.commentscreening.option.select.nonfriends'), - L => $class->ml('setting.commentscreening.option.select.links'), A => $class->ml('setting.commentscreening.option.select.all'), ); my $select = LJ::html_select({ name => "${key}commentscreening", id => "${key}commentscreening", - selected => $commentscreening || 'L', + selected => $commentscreening || 'R', }, @options); return "<label for='${key}commentscreening'>" . $class->ml('setting.commentscreening.option', { options => $select }) . "</label>"; @@ -48,7 +47,7 @@ my ($class, $u, $args) = @_; my $val = $class->get_arg($args, "commentscreening"); - $val = "L" unless $val =~ /^[NRFLA]$/; + $val = "R" unless $val =~ /^[NRFA]$/; $u->set_prop( opt_whoscreened => $val ); Modified: trunk/cgi-bin/LJ/Talk.pm =================================================================== --- trunk/cgi-bin/LJ/Talk.pm 2011-03-11 05:30:46 UTC (rev 18509) +++ trunk/cgi-bin/LJ/Talk.pm 2011-03-11 05:40:11 UTC (rev 18510) @@ -419,7 +419,11 @@ # now return userprop, as it's our last chance LJ::load_user_props($journalu, 'opt_whoscreened'); return if $journalu->{opt_whoscreened} eq 'N'; - return $journalu->{opt_whoscreened} || 'L'; + if ($journalu->{opt_whoscreened} eq 'L') { + $journalu->set_prop( opt_whoscreened => 'R' ); + $journalu->{opt_whoscreened} = 'R'; + } + return $journalu->{opt_whoscreened} || 'R'; } sub update_commentalter {