[Koha-devel] Plugin patches

Ernesto Silva - Webmaster silva at ort.edu.uy
Mon Jan 24 11:55:13 CET 2005


Paul,

	2 things:

A) we had some troubles with plugins, specifically the paths. These may 
be two possible patches:

/*******************************************************************************/

--- /usr/local/koha2/intranet/cgi-bin/acqui.simple/addbiblio.pl 
2005-01-19 10:09:02.304408216 -0300
+++ addbiblio.pl        2005-01-24 17:40:36.637461064 -0300
@@ -179,7 +179,7 @@
                 $subfield_data{marc_value}="<input type=\"text\" 
name=\"field_value\" value=\"$value\" size=\"47\" maxlength=\"255\" 
DISABLE READONLY> <a 
href=\"javascript:Dopop('../authorities/auth_finder.pl?category=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$i',$i)\">...</a>";
         # it's a plugin field
         } elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
-               my 
$plugin="../value_builder/".$tagslib->{$tag}->{$subfield}->{'value_builder'};
+               my 
$plugin=C4::Context->config('intranetdir')."/cgi-bin/value_builder/".$tagslib->{$tag}->{$subfield}->{'value_builder'};
                 require $plugin;
                 my $extended_param = 
plugin_parameters($dbh,$rec,$tagslib,$i,$tabloop);
                 my ($function_name,$javascript) = 
plugin_javascript($dbh,$rec,$tagslib,$i,$tabloop);
@@ -495,4 +495,4 @@
                 frameworkcode => $frameworkcode,
                 itemtype => $frameworkcode # HINT: if the library has 
itemtype = framework, itemtype is auto filled !
                 );
-output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
+output_html_with_http_headers $input, $cookie, $template->output;



/*******************************************************************************/

--- /usr/local/koha2/intranet/cgi-bin/plugin_launcher.pl 
2005-01-19 10:09:02.315406544 -0300
+++ plugin_launcher.pl  2005-01-24 17:44:32.273638920 -0300
@@ -28,6 +28,6 @@

  my $input = new CGI;
  my $plugin_name=$input->param("plugin_name");
-my $plugin_name="value_builder/".$input->param("plugin_name");
+my 
$plugin_name=C4::Context->config('intranetdir')."/cgi-bin/value_builder/".$input->param("plugin_name");
  require $plugin_name;
  &plugin($input);


/*******************************************************************************/


B) In "intranet/cgi-bin/acqui.simple/addbiblio.pl" there's this line(184):

my $extended_param = plugin_parameters($dbh,$rec,$tagslib,$i,$tabloop);

which I supouse is for sending extra parameters to the plugin, but the 
$extended_param variable isn't used anywhere else, any ideas? should I 
modify the line that generates the javascript link to plugin_launcher.pl 
and add the extra parameters?



Regards
Ernesto.




More information about the Koha-devel mailing list