[dw-free] The bio contains the title/subtitle, import those if we can
[commit: http://hg.dwscoalition.org/dw-free/rev/11a1f280a6bf]
The bio contains the title/subtitle, import those if we can
Patch by
mark.
Files modified:
The bio contains the title/subtitle, import those if we can
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm
- cgi-bin/DW/Worker/ContentImporter/Local/Bio.pm
-------------------------------------------------------------------------------- diff -r 684ceb031470 -r 11a1f280a6bf cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm --- a/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Thu Dec 29 19:47:25 2011 +0000 +++ b/cgi-bin/DW/Worker/ContentImporter/LiveJournal.pm Thu Dec 29 21:29:28 2011 +0000 @@ -8,7 +8,7 @@ # Andrea Nall <anall@andreanall.com> # Mark Smith <mark@dreamwidth.org> # -# Copyright (c) 2009 by Dreamwidth Studios, LLC. +# Copyright (c) 2009-2011 by Dreamwidth Studios, LLC. # # This program is free software; you may redistribute it and/or modify it under # the same terms as Perl itself. For a copy of the license, please reference @@ -484,6 +484,8 @@ 'foaf:msnChatID' => 'msn', 'foaf:yahooChatID' => 'yahoo', 'ya:bio' => 'bio', + 'lj:journaltitle' => 'journaltitle', + 'lj:journalsubtitle' => 'journalsubtitle', ); my %wanted_attrib_items = ( 'foaf:homepage' => { _tag => 'homepage', 'rdf:resource' => 'url', 'dc:title' => 'title' }, @@ -568,7 +570,7 @@ =head1 COPYRIGHT AND LICENSE -Copyright (c) 2009 by Dreamwidth Studios, LLC. +Copyright (c) 2009-2011 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference diff -r 684ceb031470 -r 11a1f280a6bf cgi-bin/DW/Worker/ContentImporter/Local/Bio.pm --- a/cgi-bin/DW/Worker/ContentImporter/Local/Bio.pm Thu Dec 29 19:47:25 2011 +0000 +++ b/cgi-bin/DW/Worker/ContentImporter/Local/Bio.pm Thu Dec 29 21:29:28 2011 +0000 @@ -59,20 +59,14 @@ $u->set_bio( $items->{'bio'} ) if defined( $items->{'bio'} ); - my %propMap = ( - 'icq' => 'icq', - 'aolim' => 'aolim', - 'jabber' => 'jabber', - 'msn' => 'msn', - 'yahoo' => 'yahoo', - ); - foreach my $key ( keys %propMap ) { - $u->set_prop( $propMap{$key}, $items->{$key} ) if defined($items->{$key}); + foreach my $prop ( qw/ icq aolim jabber msn yahoo journaltitle journalsubtitle / ) { + $u->set_prop( $prop => $items->{$prop} ) + if defined $items->{$prop}; } - if ( defined( $items->{'foaf:homepage'} ) ) { - $u->set_prop( 'url', $items->{'homepage'}->{'url'} ); - $u->set_prop( 'urlname', $items->{'homepage'}->{'title'} ); + if ( defined $items->{homepage} ) { + $u->set_prop( url => $items->{'homepage'}->{'url'} ); + $u->set_prop( urlname => $items->{'homepage'}->{'title'} ); } } --------------------------------------------------------------------------------