madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r21810: LJSV-2198: Creates two duplicate entries...

Committer: sbelyaev
LJSV-2198: Creates two duplicate entries when you create scheduled entry
U   trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm
U   trunk/cgi-bin/LJ/DelayedEntry.pm
Modified: trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm
===================================================================
--- trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm	2012-04-26 11:38:18 UTC (rev 21809)
+++ trunk/cgi-bin/LJ/DelayedEntry/Scheduler.pm	2012-04-26 11:48:00 UTC (rev 21810)
@@ -147,7 +147,7 @@
                         print "The entry with subject " . $entry->subject;
                         print "\ndelayed id = " . $entry->delayedid . 
                         print " and post date " . $entry->posttime;
-                        print " is deleted becouse USER CANNOT POST\n";
+                        print " is deleted because USER CANNOT POST\n";
                     }
 
                     __notify_user(  $entry->poster,
@@ -159,16 +159,12 @@
                 my $post_status = $entry->convert();
 
                 # do we need to send error
-                if ( $post_status->{error_message} ) {
-                    __send_error($entry->poster, 
-                                $entry->data->{subject},
-                                $post_status->{error_message});
-
-                    if ($verbose) {
-                        print "(posting failed)The entry with subject " . $entry->subject;
-                        print "\ndelayed id = " . $entry->delayedid . 
-                        print " and post date " . $entry->posttime . "\n";
-                    }
+                if ( $post_status->{'error_message'} ) {
+                    warn "(posting failed) The entry with subject " . $entry->subject .
+                          "\ndelayed id = " . $entry->delayedid . 
+                          " and post date " . $entry->posttime . 
+                          " error : " . $post_status->{'error_message'};
+                    
                 } elsif ($verbose) {
                         print "(posting)The entry with subject " . $entry->subject;
                         print "\ndelayed id = " . $entry->delayedid . 

Modified: trunk/cgi-bin/LJ/DelayedEntry.pm
===================================================================
--- trunk/cgi-bin/LJ/DelayedEntry.pm	2012-04-26 11:38:18 UTC (rev 21809)
+++ trunk/cgi-bin/LJ/DelayedEntry.pm	2012-04-26 11:48:00 UTC (rev 21810)
@@ -207,7 +207,8 @@
     my $res = LJ::Protocol::do_request("postevent", $req, \$err, $flags);
     my $fail = !defined $res->{itemid} && $res->{message};
 
-    return { 'delete_entry' => (!$fail || $err < 500),
+    return { 'delete_entry'  => (!$fail || $err < 500),
+             'error_message' => $res->{message},
              'res' => $res };
 }
 

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