madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22340: LJSUP-12727: Remove junk code from get_l...

Committer: sbelyaev
LJSUP-12727: Remove junk code from get_latest_ditemid (LJ::Entry)
U   trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2012-06-27 11:56:29 UTC (rev 22339)
+++ trunk/cgi-bin/LJ/Entry.pm	2012-06-27 12:38:50 UTC (rev 22340)
@@ -2279,11 +2279,7 @@
     }
 
     # Do I need to skip sticky entry?
-    my $skip_sticky_item_sql = '';
     my $sticky_id = $u->get_sticky_entry_id;
-    if ( $opts->{'skip_sticky_item'} && $sticky_id ) {
-        #$skip_sticky_item_sql = "AND jitemid <> $sticky_id";
-    }
 
     my $jid = $u->userid;
     my $field = $u->is_person ? "revttime" : "rlogtime";
@@ -2302,7 +2298,7 @@
     }
 
     my $res = $dbr->selectcol_arrayref( "SELECT jitemid, anum FROM log2 use index (rlogtime,revttime) ".
-                                        "WHERE journalid=? $skip_sticky_item_sql ".
+                                        "WHERE journalid=? ".
                                         $secwhere. " ".
                                         "ORDER BY $field LIMIT 1", undef, $jid);
     my $itemid = $res->[0];

Tags: livejournal, madeon, pm, sbelyaev
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