bug fixed: on admin/stopwords, the calculation of the number of pages to
[koha_gimpoz] / plugin_launcher.pl
index e9269c0..1cbcd3f 100755 (executable)
@@ -29,5 +29,12 @@ use C4::Output;
 my $input = new CGI;
 my $plugin_name=$input->param("plugin_name");
 my $plugin_name="value_builder/".$input->param("plugin_name");
-require $plugin_name;
+
+# opening plugin. Just check wether we are on a developper computer on a production one
+# (the cgidir differs)
+my $cgidir = C4::Context->intranetdir ."/cgi-bin";
+unless (opendir(DIR, "$cgidir/value_builder")) {
+       $cgidir = C4::Context->intranetdir;
+} 
+require $cgidir."/".$plugin_name;
 &plugin($input);