Ignore:
Timestamp:
2002-06-17T10:28:16+12:00 (22 years ago)
Author:
jrm21
Message:

If a document has associated files that are also given a subdirectory, that subdirectory is now a subdir of the HASH... dir and not just a subdir of the assoc dir. If the given subdir starts with a '/' then it will be a subdir of the assoc dir.

Eg
"1.jpg" will be put into building/assoc/HASHnnn.dir/1.jpg
"0/1.jpg" will be put into building/assoc/HASHnnn.dir/0/1.jpg
"/foo/1.jpg" -> building/assoc/foo/1.jpg

This is because HTMLPlug was putting first 1000 assoc files into "assoc/0", next thousand into "assoc/1", etc. But this meant that if you updated a collection, files in "0" would get overridden.

The only change to HTMLPlug is to use the _httpdocimg_ macro instead of the _httpcolling_ so we link to the right place.

File:
1 edited

Legend:

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

    r3135 r3148  
    149149      $file =~ s@(\\)+@/@g;
    150150    }
     151
     152    # reset per-doc stuff...
     153    $self->{'aux_files'} = {};
     154    $self->{'dir_num'} = 0;
     155    $self->{'file_num'} = 0;
     156
    151157    my $cursection = $doc_obj->get_top_section();
    152158
     
    372378    }
    373379    $doc_obj->associate_file($filename, $newname, undef, $section);
    374     return "_httpcollimg_/$newname";
     380    return "_httpdocimg_/$newname";
    375381
    376382    } else {
Note: See TracChangeset for help on using the changeset viewer.