Committer: amyshkin
LJSUP-10144: XML RPC return 2 incorrect postU trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl =================================================================== --- trunk/cgi-bin/ljprotocol.pl 2011-10-14 11:03:12 UTC (rev 20322) +++ trunk/cgi-bin/ljprotocol.pl 2011-10-14 11:34:49 UTC (rev 20323) @@ -3066,9 +3066,7 @@ $uowner = LJ::load_userid( $req->{journalid} ); } - my $sticky_id = $uowner->prop("sticky_entries") || undef; - my $dbr = LJ::get_db_reader(); my $sth; @@ -3286,7 +3284,7 @@ $orderby = "ORDER BY $rtime_what"; unless ($skip) { - $where .= "OR jitemid=$sticky_id" if defined $sticky_id; + $where .= "OR ( journalid=$ownerid $secwhere $where AND jitemid=$sticky_id)" if defined $sticky_id; } } elsif ($req->{'selecttype'} eq "one" && $req->{'itemid'} eq "-1") {