Changeset 31742

Show
Ignore:
Timestamp:
19.06.2017 17:14:28 (5 months ago)
Author:
ak19
Message:

No need to hardcode the plugin name

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/PowerPointPlugin.pm

    r31492 r31742  
    406406    = &File::Basename::fileparse($input_filename, "\\.[^\\.]+\$"); 
    407407 
     408    my $plugin_name = $self->{'plugin_type'}; 
     409 
    408410    # find all the files in the directory 
    409411    if (!opendir (DIR, $dirname)) { 
    410     print $outhandle "PowerPointPlugin: Couldn't read directory $dirname\n"; 
     412    print $outhandle "$plugin_name: Couldn't read directory $dirname\n"; 
    411413    return $input_filename; 
    412414    } 
     
    420422    # encoding specification???? 
    421423    if (!open (ITEMFILE, ">$itemfile_name")) { 
    422     print $outhandle "PowerPOintPlugin: Couldn't open $itemfile_name for writing\n"; 
    423     } 
    424     print ITEMFILE "<GeneratedBy>PowerPointPlugin\n"; 
     424    print $outhandle "$plugin_name: Couldn't open $itemfile_name for writing\n"; 
     425    } 
     426    print ITEMFILE "<GeneratedBy>$plugin_name\n"; 
    425427    # print the first page 
    426428    my @sorted_dir = sort alphanum_sort @dir;