kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2011-01-17 02:45 am

[dw-free] xposter needs to check if entry still exists before trying to xpost it

[commit: http://hg.dwscoalition.org/dw-free/rev/daca6070e1a4]

http://bugs.dwscoalition.org/show_bug.cgi?id=3370

Detect and abort attempts to crosspost invalid entries.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/DW/Worker/XPostWorker.pm
--------------------------------------------------------------------------------
diff -r 64dbecb7fe3f -r daca6070e1a4 cgi-bin/DW/Worker/XPostWorker.pm
--- a/cgi-bin/DW/Worker/XPostWorker.pm	Sun Jan 16 20:14:09 2011 -0600
+++ b/cgi-bin/DW/Worker/XPostWorker.pm	Sun Jan 16 20:45:02 2011 -0600
@@ -66,7 +66,7 @@ sub work {
     return $job->failed("Unable to load account $acctid for uid $uid") unless defined $acct;
 
     my $entry = LJ::Entry->new($u, ditemid => $ditemid);
-    return $job->failed("Unable to load entry $ditemid for uid $uid") unless defined $entry;
+    return $job->failed("Unable to load entry $ditemid for uid $uid") unless defined $entry && $entry->valid;
 
     my %auth;
     if ($auth_response) {
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org