madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r20491: LJSUP-10281: Auto create 2 temporary sch...

Committer: sbelyaev
LJSUP-10281: Auto create 2 temporary scheduled entries
U   trunk/cgi-bin/LJ/DelayedEntry.pm
U   trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/LJ/DelayedEntry.pm
===================================================================
--- trunk/cgi-bin/LJ/DelayedEntry.pm	2011-11-08 08:30:38 UTC (rev 20490)
+++ trunk/cgi-bin/LJ/DelayedEntry.pm	2011-11-08 08:53:24 UTC (rev 20491)
@@ -1236,7 +1236,8 @@
     my ($self) = @_;
     my $req = $self->{data};
     
-    my $flags = { 'noauth' => 1, 
+    my $flags = { 'noauth' => 1,
+                  'use_custom_time' => 0, 
                   'u' => $self->poster };
 
     my $err = 0;
@@ -1250,6 +1251,7 @@
 sub convert_from_data {
     my ($self, $req) = @_;
     my $flags = { 'noauth' => 1,
+                  'use_custom_time' => 0,
                   'u' => $self->poster };
 
     my $err = 0;

Modified: trunk/cgi-bin/ljprotocol.pl
===================================================================
--- trunk/cgi-bin/ljprotocol.pl	2011-11-08 08:30:38 UTC (rev 20490)
+++ trunk/cgi-bin/ljprotocol.pl	2011-11-08 08:53:24 UTC (rev 20491)
@@ -2151,8 +2151,8 @@
     }
 
     if ( $req->{ver} > 1  && LJ::is_enabled("delayed_entries") ) {
-        my $use_delayed = $req->{'custom_time'} ||
-                    !(exists $flags->{'use_custom_time'});
+        my $use_delayed = ($req->{'custom_time'} && $flags->{'use_custom_time'}) ||
+                            !(exists $flags->{'use_custom_time'});
         if ( $use_delayed && LJ::DelayedEntry::is_future_date($req) ) {
             return fail($err, 215) unless $req->{tz};
 
@@ -2166,7 +2166,7 @@
             $req->{usejournal} = $req->{usejournal} || '';
   
             my $entry = LJ::DelayedEntry->create( $req, { journal => $uowner,
-                                                      poster  => $u,} );
+                                                          poster  => $u,} );
             return fail($err, 507) unless $entry;
             $res->{delayedid} = $entry->delayedid;
             $res->{type}      = 'delayed';

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