mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2012-01-23 10:18 am

[dw-free] Create mapid in the right place

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

Create mapid in the right place

$pu is the person who posted the comment, $u is the location. We need to
have the mapid on the $pu, not on the $u.

Patch by [staff profile] mark.

Files modified:
  • cgi-bin/DW/Worker/ContentImporter/Local/Comments.pm
--------------------------------------------------------------------------------
diff -r bc78983b6e85 -r 037883470f4e cgi-bin/DW/Worker/ContentImporter/Local/Comments.pm
--- a/cgi-bin/DW/Worker/ContentImporter/Local/Comments.pm	Mon Jan 23 11:27:43 2012 +0800
+++ b/cgi-bin/DW/Worker/ContentImporter/Local/Comments.pm	Mon Jan 23 10:19:28 2012 +0000
@@ -116,7 +116,7 @@
 
     my $pu = $c->poster;
     if ( $pu && $pu->userpic_have_mapid ) {
-        $c->set_prop( picture_mapid => $u->get_mapid_from_keyword( $cmt->{props}->{picture_keyword}, create => 1 ) );
+        $c->set_prop( picture_mapid => $pu->get_mapid_from_keyword( $cmt->{props}->{picture_keyword}, create => 1 ) );
     } else {
         $c->set_prop( picture_keyword => $cmt->{props}->{picture_keyword} );
     }
--------------------------------------------------------------------------------