afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-04-12 04:49 pm

[dw-free] Allow entries to be posted with non-existent userpic keywords.

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

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

Save the given userpic keyword, even if there's no current corresponding
userpic.

Patch by [personal profile] exor674.

Files modified:
  • cgi-bin/ljprotocol.pl
--------------------------------------------------------------------------------
diff -r 80b4818c9e5b -r 9f5d51d29d5b cgi-bin/ljprotocol.pl
--- a/cgi-bin/ljprotocol.pl	Sun Apr 12 16:44:48 2009 +0000
+++ b/cgi-bin/ljprotocol.pl	Sun Apr 12 16:49:22 2009 +0000
@@ -984,16 +984,6 @@ sub common_event_validation
         if ($pname eq "current_coords" && ! eval { LJ::Location->new(coords => $val) }) {
             return fail($err,204,"Property \"current_coords\" has invalid value");
         }
-    }
-
-    # check props for inactive userpic
-    if (my $pickwd = $req->{'props'}->{'picture_keyword'}) {
-        my $pic = LJ::get_pic_from_keyword($flags->{'u'}, $pickwd);
-
-        # need to make sure they aren't trying to post with an inactive keyword, but also
-        # we don't want to allow them to post with a keyword that has no pic at all to prevent
-        # them from deleting the keyword, posting, then adding it back with editpics.bml
-        delete $req->{'props'}->{'picture_keyword'} if ! $pic || $pic->{'state'} eq 'I';
     }
 
     # validate incoming list of tags
--------------------------------------------------------------------------------

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