madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20496: LJSUP-10072: There is no sticky entry on...

Committer: sbelyaev
LJSUP-10072: There is no sticky entry on editjournal.bml page
U   trunk/cgi-bin/ljprotocol.pl
U   trunk/htdocs/editjournal.bml
Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2011-11-08 11:43:03 UTC (rev 20495)
+++ trunk/cgi-bin/ljprotocol.pl	2011-11-08 12:07:21 UTC (rev 20496)
@@ -2653,10 +2653,6 @@
             return fail( $err, 217 ) if $req->{itemid} || $req->{anum};
             return fail( $err, 215 ) unless $req->{tz};                        
 
-            # updating an entry:
-            return undef
-                unless common_event_validation($req, $err, $flags);
-
             $req->{ext}->{flags} = $flags;
             $req->{ext}->{flags}->{u} = undef; # it's no need to be stored
             $req->{usejournal} = $req->{usejournal}  || '';
@@ -2681,6 +2677,11 @@
                 return $res;
             }
 
+
+            # updating an entry:
+            return undef
+                unless common_event_validation($req, $err, $flags);
+
             if ( LJ::DelayedEntry::is_future_date($req) ) {
                 $entry->update($req);
                 $res->{type} = 'delayed';   
@@ -3206,7 +3207,7 @@
                 );
 
                 for my $did ( @$ids ) {
-                    my $entry, LJ::DelayedEntry::get_entry_by_id(
+                    my $entry = LJ::DelayedEntry::get_entry_by_id(
                         $uowner,
                         $did,
                         { userid => $flags->{user}->id },
@@ -3228,7 +3229,7 @@
                 }
             }
             elsif ( $req->{selecttype} eq 'one' ) {
-                my $entry, LJ::DelayedEntry::get_entry_by_id(
+                my $entry = LJ::DelayedEntry::get_entry_by_id(
                     $uowner,
                     $req->{delayedid},
                     { userid => $flags->{user}->id },
@@ -3255,7 +3256,7 @@
         elsif ( $req->{delayedids} ) {
             if ( $req->{selecttype} eq 'multiple' ) {
                 for my $did ( @$req->{delayedids} ) {
-                    my $entry, LJ::DelayedEntry::get_entry_by_id(
+                    my $entry = LJ::DelayedEntry::get_entry_by_id(
                         $uowner,
                         $did,
                         { userid => $flags->{user}->id },

Modified: trunk/htdocs/editjournal.bml
===================================================================
--- trunk/htdocs/editjournal.bml	2011-11-08 11:43:03 UTC (rev 20495)
+++ trunk/htdocs/editjournal.bml	2011-11-08 12:07:21 UTC (rev 20496)
@@ -908,11 +908,10 @@
                 }
             }
 
-            warn "delayed entries count: $delayed_entries_count";
-
             if ($delayed_entries_count > 0) {
-                warn "recent update\n";
                 @recent_entries = $append_delayed->($usejournal_u, \@recent, $delayed_entries);
+            } else {
+                @recent_entries = @recent;
             }
 
         }

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