wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r18173: LJSUP-7841. Can't call method "can_moder...

Committer: gprochaev
LJSUP-7841. Can't call method "can_moderate"

U   trunk/cgi-bin/LJ/Talk.pm
Modified: trunk/cgi-bin/LJ/Talk.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk.pm	2011-02-01 06:57:40 UTC (rev 18172)
+++ trunk/cgi-bin/LJ/Talk.pm	2011-02-01 07:49:12 UTC (rev 18173)
@@ -353,11 +353,13 @@
 }
 
 sub can_unscreen {
+    return 0 unless $_[0];
     return 0 if !($_[0]->can_manage($_[1]) || $_[0]->can_moderate($_[1])) && $_[0]->can_moderate($_[1]);
     return LJ::Talk::can_screen(@_);
 }
 
 sub can_view_screened {
+    return 0 unless $_[0];
     return 0 if $_[0]->can_moderate($_[1]);
     return LJ::Talk::can_delete(@_);
 }
@@ -367,6 +369,7 @@
 }
 
 sub can_unfreeze {
+    return 0 unless $_[0];
     return 1 if $_[0]->can_moderate($_[1]);
     return LJ::Talk::can_unscreen(@_);
 }

Tags: livejournal, pm, wisest-owl
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