Alexander Nazarov (nfokz) wrote in changelog,
Alexander Nazarov
nfokz
changelog

[livejournal] r21116: LJSUP-10910: View comments in My Style s...

Committer: anazarov
LJSUP-10910: View comments in My Style setting
U   trunk/cgi-bin/LJ/Setting/StyleMine.pm
U   trunk/cgi-bin/LJ/User.pm
Modified: trunk/cgi-bin/LJ/Setting/StyleMine.pm
===================================================================
--- trunk/cgi-bin/LJ/Setting/StyleMine.pm	2012-02-07 12:17:52 UTC (rev 21115)
+++ trunk/cgi-bin/LJ/Setting/StyleMine.pm	2012-02-07 12:31:36 UTC (rev 21116)
@@ -5,7 +5,7 @@
 
 sub should_render {
     my ($class, $u) = @_;
-
+    return 0 if LJ::is_enabled('comments_style_mine');
     return !$u || $u->is_community ? 0 : 1;
 }
 

Modified: trunk/cgi-bin/LJ/User.pm
===================================================================
--- trunk/cgi-bin/LJ/User.pm	2012-02-07 12:17:52 UTC (rev 21115)
+++ trunk/cgi-bin/LJ/User.pm	2012-02-07 12:31:36 UTC (rev 21116)
@@ -4182,6 +4182,12 @@
     my $u = shift;
 
     return 0 unless $u->can_use_commentsstylemine;
+
+    if ( $u->raw_prop('opt_stylemine') ) {
+        $u->set_prop( opt_stylemine => 0 );
+        $u->set_prop( opt_commentsstylemine => 'Y' );
+    }
+
     return $u->raw_prop('opt_commentsstylemine') eq 'Y'? 1 : 0;
 }
 

Tags: anazarov, livejournal, nfokz, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments