madeon (madeon) wrote in changelog,
madeon
madeon
changelog

[livejournal] r22257: LJSUP-12531: Repost: Error: Not able to ...

Committer: sbelyaev
LJSUP-12531: Repost: Error: Not able to create new entry
U   trunk/cgi-bin/LJ/Entry/Repost.pm
Modified: trunk/cgi-bin/LJ/Entry/Repost.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry/Repost.pm	2012-06-15 11:17:22 UTC (rev 22256)
+++ trunk/cgi-bin/LJ/Entry/Repost.pm	2012-06-15 11:29:34 UTC (rev 22257)
@@ -124,25 +124,32 @@
                 'tz'          => $timezone,
               );
 
-    warn "----------------------------";
-    warn "request " . LJ::D(%req);
-
     # move to LJ::API
     my $res = LJ::Protocol::do_request("postevent", \%req, \$err, $flags);
 
-    $flags->{u} = undef;
-    warn "flags: " . LJ::D($flags);
-    warn "result: " . LJ::D($res);
-    warn "error: $err" if $err;
-    warn "---------------------------------";
 
     my $fail = !defined $res->{itemid} && $res->{message};
     if ($fail) {
+         warn "----------------------------";
+         warn "request " . LJ::D(%req);
+         warn "flags: " . LJ::D($flags);
+         warn "result: " . LJ::D($res);
+         warn "error: $err" if $err;
+         warn "---------------------------------";
+
          $$error = LJ::API::Error->make_error( $res->{message},($err || -10000) );
          return;
     }
 
     if ($err) {
+            
+        warn "----------------------------";
+        warn "request " . LJ::D(%req);
+        warn "flags: " . LJ::D($flags);
+        warn "result: " . LJ::D($res);
+        warn "error: $err";
+        warn "---------------------------------";
+
         $$error = LJ::API::Error->get_error('create_entry_failed');
         return;
     }

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