Changeset 18404
- Timestamp:
- 2009-01-16T18:23:59+13:00 (15 years ago)
- Location:
- gsdl/trunk/perllib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/BasePlugin.pm
r18398 r18404 52 52 { 'name' => "base64", 53 53 'desc' => "{BasePlugin.rename_method.base64}" }, 54 { 'name' => " inherited",55 'desc' => "{BasePlugin.rename_method. inherited}",54 { 'name' => "none", 55 'desc' => "{BasePlugin.rename_method.none}", 56 56 'hiddengli' => "yes" } ]; 57 57 … … 776 776 # If using URL encoding, then SourceFile is the url-reference to url-encoded 777 777 # filemeta: it's a url that refers to the actual file on the system 778 $filemeta = &unicode::filename_to_url($filemeta , $self->{'file_rename_method'});778 $filemeta = &unicode::filename_to_url($filemeta); 779 779 780 780 $doc_obj->set_utf8_metadata_element($top_section, "SourceFile", $filemeta); … … 1043 1043 # If the filename is url_encoded, we need to encode the % signs 1044 1044 # in the filename, so that it works in a url 1045 my $url_tail_filename = &unicode::filename_to_url($tail_filename , $self->{'file_rename_method'});1045 my $url_tail_filename = &unicode::filename_to_url($tail_filename); 1046 1046 # work out extended tail extension (i.e. matching tail re) 1047 1047 -
gsdl/trunk/perllib/plugins/HTMLPlugin.pm
r18401 r18404 1149 1149 # of filenames, URL-encode the additional percent signs of the URL-encoded filename 1150 1150 my $newname_url = $newname; 1151 $newname_url = &unicode::filename_to_url($newname_url , $self->{'file_rename_method'});1151 $newname_url = &unicode::filename_to_url($newname_url); 1152 1152 return "_httpdocimg_/$newname_url"; 1153 1153 } -
gsdl/trunk/perllib/plugins/ImageConverter.pm
r18403 r18404 188 188 # The images that will get generated may contain percent signs in their src filenames 189 189 # Encode those percent signs themselves so that urls to the imgs refer to them correctly 190 my $url_to_filehead = &unicode::filename_to_url($filehead , $self->{'file_rename_method'});191 my $url_to_filename_no_path = &unicode::filename_to_url($filename_no_path , $self->{'file_rename_method'});190 my $url_to_filehead = &unicode::filename_to_url($filehead); 191 my $url_to_filename_no_path = &unicode::filename_to_url($filename_no_path); 192 192 193 193 # Convert the image to a new type (if required). -
gsdl/trunk/perllib/strings.properties
r18321 r18404 722 722 BasePlugin.rename_method.base64:Use base64 encoding in renaming imported files and associated files. 723 723 724 BasePlugin.rename_method.none:Don't rename imported files and associated files. 725 724 726 BibTexPlugin.desc:BibTexPlugin reads bibliography files in BibTex format. BibTexPlugin creates a document object for every reference in the file. It is a subclass of SplitTextFile, so if there are multiple records, all are read. 725 727 -
gsdl/trunk/perllib/unicode.pm
r18379 r18404 620 620 # a url more than once this way. 621 621 sub filename_to_url { 622 my ($text, $rename_method) = @_; 623 624 if(!defined $rename_method || $rename_method eq "url") { 625 if($text !~ m/%25/) { 626 $text =~ s/%/%25/g; 627 } 622 my ($text) = @_; 623 624 if($text !~ m/%25/) { 625 $text =~ s/%/%25/g; 628 626 } 629 627 return $text; -
gsdl/trunk/perllib/util.pm
r18400 r18404 1026 1026 my ($cpackage,$cfilename,$cline,$csubr,$chas_args,$cwantarray) = caller(1); 1027 1027 print STDERR "Calling method: $cfilename:$cline $cpackage->$csubr\n"; 1028 } elsif($rename_method eq "none") { 1029 return $filename; # would have already been renamed 1028 1030 } 1029 1031
Note:
See TracChangeset
for help on using the changeset viewer.