@@ -, +, @@ --- C4/Context.pm | 18 ------------------ Koha/FrameworkPlugin.pm | 2 +- admin/auth_subfields_structure.pl | 4 ++-- admin/marc_subfields_structure.pl | 4 ++-- reports/manager.pl | 2 +- 5 files changed, 6 insertions(+), 24 deletions(-) --- a/C4/Context.pm +++ a/C4/Context.pm @@ -622,24 +622,6 @@ sub set_preference { } } -# AUTOLOAD -# This implements C4::Config->foo, and simply returns -# C4::Context->config("foo"), as described in the documentation for -# &config, above. - -# FIXME - Perhaps this should be extended to check &config first, and -# then &preference if that fails. OTOH, AUTOLOAD could lead to crappy -# code, so it'd probably be best to delete it altogether so as not to -# encourage people to use it. -sub AUTOLOAD -{ - my $self = shift; - - $AUTOLOAD =~ s/.*:://; # Chop off the package name, - # leaving only the function name. - return $self->config($AUTOLOAD); -} - =head2 Zconn $Zconn = C4::Context->Zconn --- a/Koha/FrameworkPlugin.pm +++ a/Koha/FrameworkPlugin.pm @@ -256,7 +256,7 @@ sub _load { } sub _valuebuilderpath { - return C4::Context->intranetdir . "/cataloguing/value_builder"; + return C4::Context->config('intranetdir') . "/cataloguing/value_builder"; #Formerly, intranetdir/cgi-bin was tested first. #But the intranetdir from koha-conf already includes cgi-bin for #package installs, single and standard installs. --- a/admin/auth_subfields_structure.pl +++ a/admin/auth_subfields_structure.pl @@ -108,9 +108,9 @@ if ($op eq 'add_form') { # 2 cases here : on CVS install, $cgidir does not need a /cgi-bin # on a standard install, /cgi-bin need to be added. # test one, then the other - my $cgidir = C4::Context->intranetdir ."/cgi-bin"; + my $cgidir = C4::Context->config('intranetdir') ."/cgi-bin"; unless (opendir(DIR, "$cgidir/cataloguing/value_builder")) { - $cgidir = C4::Context->intranetdir; + $cgidir = C4::Context->config('intranetdir'); opendir(DIR, "$cgidir/cataloguing/value_builder") || die "can't opendir $cgidir/value_builder: $!"; } while (my $line = readdir(DIR)) { --- a/admin/marc_subfields_structure.pl +++ a/admin/marc_subfields_structure.pl @@ -154,9 +154,9 @@ if ( $op eq 'add_form' ) { # 2 cases here : on CVS install, $cgidir does not need a /cgi-bin # on a standard install, /cgi-bin need to be added. # test one, then the other - my $cgidir = C4::Context->intranetdir . "/cgi-bin"; + my $cgidir = C4::Context->config('intranetdir') . "/cgi-bin"; unless ( opendir( DIR, "$cgidir/cataloguing/value_builder" ) ) { - $cgidir = C4::Context->intranetdir; + $cgidir = C4::Context->config('intranetdir'); opendir( DIR, "$cgidir/cataloguing/value_builder" ) || die "can't opendir $cgidir/value_builder: $!"; } --- a/reports/manager.pl +++ a/reports/manager.pl @@ -44,7 +44,7 @@ $template->param(do_it => $do_it, ); my $cgidir = C4::Context->config('intranetdir')."/cgi-bin/reports/"; unless (-r $cgidir and -d $cgidir) { - $cgidir = C4::Context->intranetdir."/reports/"; + $cgidir = C4::Context->config('intranetdir')."/reports/"; } my $plugin = $cgidir.$report_name.".plugin"; require $plugin; --