Committer: dnikolaev
LJSUP-8562: Restore controlstrip settings at /customize/options.bmlU trunk/cgi-bin/LJ/Hooks/ControlStrip.pm
Modified: trunk/cgi-bin/LJ/Hooks/ControlStrip.pm =================================================================== --- trunk/cgi-bin/LJ/Hooks/ControlStrip.pm 2011-04-15 08:45:12 UTC (rev 10391) +++ trunk/cgi-bin/LJ/Hooks/ControlStrip.pm 2011-04-18 02:51:37 UTC (rev 10392) @@ -67,8 +67,6 @@ } }); -if ($LJ::DISABLED{control_strip_new}) -{ LJ::register_hook('show_control_strip', sub { my $opts = shift; @@ -102,22 +100,7 @@ return 1 if $remote && $remote->prop('view_control_strip'); return undef; }); -} else { -LJ::register_hook('show_control_strip', sub { - my $opts = shift; - return undef unless $LJ::USE_CONTROL_STRIP; - return undef if $LJ::DISABLED{'control_strip'}; - - my $remote = LJ::get_remote(); - - return 1 unless $remote; - return 1 if $remote->prop('show_control_strip'); - - return undef; -}); -} - # this will need_res required controlstrip css # does not return anything LJ::register_hook('control_strip_stylesheet_link', sub { @@ -144,9 +127,9 @@ my %GET = LJ::Request->args; my $stylemine = $GET{'style'} eq 'mine' && $remote && $u->id != $remote->id; - if ($u->prop('show_control_strip') && !$stylemine) { + if ($u && $u->prop('show_control_strip') && !$stylemine) { $color = $u->prop('show_control_strip'); - } elsif ($remote->prop('view_control_strip')) { + } elsif ($remote && $remote->prop('view_control_strip')) { $color = $remote->prop('view_control_strip'); }