Ignore:
Timestamp:
2017-08-17T16:15:10+12:00 (7 years ago)
Author:
ak19
Message:

With Kathy's commit 31896 doing away with the need for the recently introduced gsprintf_multiline() by moving the regex replacements of backslash-n (and backslash-t) with newline and tab into gsprint::lookup_string, can now shift WebDownload calls to gsprintf_multine to use regular gsprintf. Putting back the original gsprintf method as gsprintf_multiline is no longer needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/gsprintf.pm

    r31896 r31898  
    7171sub gsprintf
    7272{
    73     my ($handle, $text_string, @text_arguments) = @_;   
    74     _gsprintf($handle, $text_string, 0, @text_arguments);
    75 }
    76 
    77 sub gsprintf_multiline
    78 {
    7973    my ($handle, $text_string, @text_arguments) = @_;
    80     _gsprintf($handle, $text_string, 1, @text_arguments);
    81 }
    82 
    83 sub _gsprintf
    84 {
    85     my ($handle, $text_string, $multiline, @text_arguments) = @_;
    8674
    8775    # Return unless the required arguments were supplied
     
    9381    # Resolve the string arguments using sprintf, then write out to the handle
    9482    my $text_string_resolved = sprintf($text_string, @text_arguments);
    95 
    96     if($multiline) { # replace newlines
    97     $text_string_resolved =~ s@\\n@\n@g;
    98     }
    9983   
    10084    if ($freetext_xml_mode) {
Note: See TracChangeset for help on using the changeset viewer.