Changeset 28999

Show
Ignore:
Timestamp:
28.04.2014 15:38:21 (5 years ago)
Author:
ak19
Message:

To get a working RSS link to a document, the document's title needs to be set. It used to only look for dc.Title. Now, if no dc.Title can be found for a document, it falls back on using ex.Title.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r28997 r28999  
    909909    my $top_section = $doc_obj->get_top_section(); 
    910910 
    911     my $dc_titles = $doc_obj->get_metadata($top_section,"dc.Title"); 
    912     my $dc_title = join("; ", @$dc_titles); 
     911    my $titles = $doc_obj->get_metadata($top_section,"dc.Title"); 
     912 
     913    # if there are no titles for this document, then use ex.Title as fallback 
     914    if(scalar(@$titles) == 0) { 
     915        $titles = $doc_obj->get_metadata($top_section,"Title"); 
     916    } 
     917 
     918    my $dc_title = join("; ", @$titles); 
    913919 
    914920    if ($oid_files->{'index-status'} eq "R") {