Changeset 9169


Ignore:
Timestamp:
2005-02-24T14:13:56+13:00 (19 years ago)
Author:
davidb
Message:

HTMLPlug was always setting URL metadata. This only makes sense if 'file_is_url'
flag is on. Added if statement to check for this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/HTMLPlug.pm

    r9143 r9169  
    233233    unless $self->{'no_metadata'} || $self->{'description_tags'};
    234234
    235     # Store URL for page as metadata - this can be used for an
    236     # altavista style search interface. The URL won't be valid
    237     # unless the file structure contains the domain name (i.e.
    238     # like when w3mir is used to download a website).
    239     my $web_url = "http://$file";
    240     $doc_obj->add_metadata($cursection, "URL", $web_url);
    241     $doc_obj->add_metadata($cursection, "weblink", "<a href=\"$web_url\">");
    242     $doc_obj->add_metadata($cursection, "webicon", "_iconworld_");
    243     $doc_obj->add_metadata($cursection, "/weblink", "</a>");
     235    if ($self->{'file_is_url'}) {
     236    # Store URL for page as metadata - this can be used for an
     237    # altavista style search interface. The URL won't be valid
     238    # unless the file structure contains the domain name (i.e.
     239    # like when w3mir is used to download a website).
     240    my $web_url = "http://$file";
     241    $doc_obj->add_metadata($cursection, "URL", $web_url);
     242    $doc_obj->add_metadata($cursection, "weblink", "<a href=\"$web_url\">");
     243    $doc_obj->add_metadata($cursection, "webicon", "_iconworld_");
     244    $doc_obj->add_metadata($cursection, "/weblink", "</a>");
     245    }
    244246
    245247    if ($self->{'description_tags'}) {
Note: See TracChangeset for help on using the changeset viewer.