Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r18136: LJINT-362 (Comments for side projects)

Committer: ailyin
LJINT-362 (Comments for side projects)
U   trunk/cgi-bin/LJ/Comment.pm
U   trunk/htdocs/gadgets/logcom.bml
Modified: trunk/cgi-bin/LJ/Comment.pm
===================================================================
--- trunk/cgi-bin/LJ/Comment.pm	2011-01-28 11:33:17 UTC (rev 18135)
+++ trunk/cgi-bin/LJ/Comment.pm	2011-01-28 11:39:27 UTC (rev 18136)
@@ -1518,13 +1518,15 @@
 
     if ( defined $partner ) {
         my $docid = $partner->docid_from_entry($entry);
-        my $article_link = $partner->article_link($docid);
-        my $comment_link
-            = $partner->article_link( $docid,
-                                      { 'thread' => $self->dtalkid } );
+        if ($docid) {
+            my $article_link = $partner->article_link($docid);
+            my $comment_link
+                = $partner->article_link( $docid,
+                                          { 'thread' => $self->dtalkid } );
 
-        $t->param( 'article_link' => $article_link,
-                   'comment_link' => $comment_link, );
+            $t->param( 'article_link' => $article_link,
+                       'comment_link' => $comment_link, );
+        }
 
     }
 }

Modified: trunk/htdocs/gadgets/logcom.bml
===================================================================
--- trunk/htdocs/gadgets/logcom.bml	2011-01-28 11:33:17 UTC (rev 18135)
+++ trunk/htdocs/gadgets/logcom.bml	2011-01-28 11:39:27 UTC (rev 18136)
@@ -29,7 +29,8 @@
     my $journal = $partner->journal;
 
     return 'rate limit exceeded'
-        unless LJ::RateLimit->check( $journal, $partner->rate_limits );
+        unless ! $partner->rate_limits
+            || LJ::RateLimit->check( $journal, $partner->rate_limits );
 
     my $js_check_domain = $partner->domain_check_js(
         {

Tags: andy, bml, livejournal, 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