Ignore:
Timestamp:
Oct 23, 2005, 3:45:00 PM (16 years ago)
Author:
Earle Martin
Message:

locales also needed escaping; plus fixed strange mixture of array and reference

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/RDF.pm

    r696 r697  
    44
    55use vars qw( $VERSION );
    6 $VERSION = '0.08';
     6$VERSION = '0.071';
    77
    88use CGI::Wiki::Plugin::RSS::ModWiki;
     
    7676    my $os_x               = $node_data{metadata}{os_x}[0]               || '';
    7777    my $os_y               = $node_data{metadata}{os_y}[0]               || '';
    78     my $catrefs            = $node_data{metadata}{category};
     78    my @categories         = @{ $node_data{metadata}{category} || [] };
    7979    my @locales            = @{ $node_data{metadata}{locale} || [] };
    8080    my $summary            = $node_data{metadata}{summary}[0]            || '';
     
    8383    foreach ($phone, $fax, $website, $opening_hours_text, $address, $postcode,
    8484             $city, $country, $latitude, $longitude, $version, $os_x, $os_y,
    85              $catrefs, @locales, $summary)
     85             @categories, @locales, $summary)
    8686    {
    8787      if ($_)
     
    144144    $rdf .= "    <dc:description>$summary</dc:description>\n" if $summary;
    145145
    146     $rdf .= "\n    <!-- categories -->\n\n" if $catrefs;
    147     $rdf .= "    <dc:subject>$_</dc:subject>\n" foreach @{$catrefs};
     146    $rdf .= "\n    <!-- categories -->\n\n" if @categories;
     147    $rdf .= "    <dc:subject>$_</dc:subject>\n" foreach @categories;
    148148   
    149149    if ($is_geospatial)
Note: See TracChangeset for help on using the changeset viewer.