[dw-free] taglists truncated when crossposting
[commit: http://hg.dwscoalition.org/dw-free/rev/4992f776cde9]
http://bugs.dwscoalition.org/show_bug.cgi?id=1964
The taglist entryprop stored in the database is not canonical, so load the
entry tags (from LJ::Tags) and rebuild into a comma-separated list.
Patch by
rb.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=1964
The taglist entryprop stored in the database is not canonical, so load the
entry tags (from LJ::Tags) and rebuild into a comma-separated list.
Patch by
Files modified:
- cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
--------------------------------------------------------------------------------
diff -r a6aa1d25ea3c -r 4992f776cde9 cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm
--- a/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm Tue Oct 18 23:47:19 2011 +0800
+++ b/cgi-bin/DW/External/XPostProtocol/LJXMLRPC.pm Tue Oct 18 23:56:03 2011 +0800
@@ -315,10 +315,15 @@
my $entryprops = $entry->props;
$req->{props} = {};
# only bring over these properties
- for my $entrykey (qw ( adult_content current_coords current_location current_music opt_backdated opt_nocomments opt_noemail opt_preformatted opt_screening taglist used_rte pingback )) {
+ for my $entrykey (qw ( adult_content current_coords current_location current_music opt_backdated opt_nocomments opt_noemail opt_preformatted opt_screening used_rte pingback )) {
$req->{props}->{$entrykey} = $entryprops->{$entrykey} if defined $entryprops->{$entrykey};
}
+ # the taglist entryprop stored in the DB is not canonical, and may be truncated if there are too many tags
+ # so let's grab the actual tag items and rebuild a string
+ my @tags = $entry->tags;
+ $req->{props}->{taglist} = join( ', ', @tags);
+
# and regenerate this one from data
$req->{props}->{picture_keyword} = $entry->userpic_kw;
--------------------------------------------------------------------------------
