Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r20197: LJSUP-9987: Error in LJ.XMLRPC.getevents...

Committer: amyshkin
LJSUP-9987: Error in LJ.XMLRPC.getevents function
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2011-10-03 08:17:23 UTC (rev 20196)
+++ trunk/cgi-bin/ljprotocol.pl	2011-10-03 08:30:25 UTC (rev 20197)
@@ -3037,7 +3037,7 @@
 
 
     my $sticky_id = $uowner->prop("sticky_entries") || undef;
-    
+
     my $dbr = LJ::get_db_reader();
     my $sth;
 
@@ -3110,7 +3110,7 @@
     my $skip = $req->{'skip'} + 0;
 
     $skip = 500 if $skip > 500;
-    
+
     if ( $req->{ver} > 1 ) {
         my $res = {};
 
@@ -3131,11 +3131,11 @@
                         $did,
                         { userid => $flags->{user}->id },
                     );
-                    
+
                     my $re = {};
 
                     $re->{$_} = $entry->{$_} for qw(delayedid subject event props logtime);
-                                                    
+
                     $re->{eventtime}       = $entry->{posttime};
                     $re->{event_timestamp} = $entry->{posttime_unixtime};
                     $re->{url}             = $entry->url;
@@ -3153,11 +3153,11 @@
                     $req->{delayedid},
                     { userid => $flags->{user}->id },
                 );
-                    
+
                 my $re = {};
 
                 $re->{$_} = $entry->{$_} for qw(delayedid subject event props logtime);
-                                                    
+
                 $re->{eventtime}       = $entry->{posttime};
                 $re->{event_timestamp} = $entry->{posttime_unixtime};
                 $re->{url}             = $entry->url;
@@ -3180,11 +3180,11 @@
                         $did,
                         { userid => $flags->{user}->id },
                     );
-                    
+
                     my $re = {};
 
                     $re->{$_} = $entry->{$_} for qw(delayedid subject event props logtime);
-                                                    
+
                     $re->{eventtime}       = $entry->{posttime};
                     $re->{event_timestamp} = $entry->{posttime_unixtime};
                     $re->{url}             = $entry->url;
@@ -3255,7 +3255,7 @@
         $orderby = "ORDER BY $rtime_what";
 
         unless ($skip) {
-            $where .= "OR jitemid=$sticky_id";
+            $where .= "OR jitemid=$sticky_id" if defined $sticky_id;
         }
     }
     elsif ($req->{'selecttype'} eq "one" && $req->{'itemid'} eq "-1") {

Tags: livejournal, pl, zilogic
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