Ignore:
Timestamp:
2007-01-30T17:31:46+13:00 (17 years ago)
Author:
kjdon
Message:

trying to tidy up gs2 links in display items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/bin/script/convert_coll_from_gs2.pl

    r13228 r13828  
    2929    print STDOUT "   -defaultlang        The language that is considered the default (for display text etc). defaults to 'en'\n\n";
    3030}
     31
    3132
    3233sub main {
     
    154155            $value = format_icon_value($value);
    155156            } else {
    156             $value = tidy_up_metadata($value);
     157            $value = tidy_up_display_item($value);
    157158            }
    158159            &output_display($collwriter, $name, $lang, $value);
     
    518519    my ($value) = @_;
    519520    if ($value =~ /^_/) {
    520     my ($newvalue) = $value =~ /\/([^\/]*)$/;
     521    my ($newvalue) = $value =~ /images\/(.*)$/;
    521522    if ($newvalue) {
    522523        return $newvalue;
     
    526527}
    527528
    528 sub tidy_up_metadata {
     529sub tidy_up_display_item {
    529530    my ($value) = @_;
    530531    # remove \n
     
    534535    # replace \" with "
    535536    $value =~ s/\\\"/\"/g;
     537    # replace _httpprefix_ with _httpsite_
     538    $value =~ s/_httpprefix_/_httpsite_/;
     539    $value =~ s/_gwcgi_//;
     540    $value =~ s/[a-z][a-z]?=_cgiarg[a-z][a-z]?_&?//;
    536541    return $value;
    537542}
Note: See TracChangeset for help on using the changeset viewer.