View | Details | Raw Unified | Return to bug 9006
Collapse All | Expand All

(-)a/C4/Context.pm (-18 lines)
Lines 622-645 sub set_preference { Link Here
622
    }
622
    }
623
}
623
}
624
624
625
# AUTOLOAD
626
# This implements C4::Config->foo, and simply returns
627
# C4::Context->config("foo"), as described in the documentation for
628
# &config, above.
629
630
# FIXME - Perhaps this should be extended to check &config first, and
631
# then &preference if that fails. OTOH, AUTOLOAD could lead to crappy
632
# code, so it'd probably be best to delete it altogether so as not to
633
# encourage people to use it.
634
sub AUTOLOAD
635
{
636
    my $self = shift;
637
638
    $AUTOLOAD =~ s/.*:://;        # Chop off the package name,
639
                    # leaving only the function name.
640
    return $self->config($AUTOLOAD);
641
}
642
643
=head2 Zconn
625
=head2 Zconn
644
626
645
  $Zconn = C4::Context->Zconn
627
  $Zconn = C4::Context->Zconn
(-)a/Koha/FrameworkPlugin.pm (-1 / +1 lines)
Lines 256-262 sub _load { Link Here
256
}
256
}
257
257
258
sub _valuebuilderpath {
258
sub _valuebuilderpath {
259
    return C4::Context->intranetdir . "/cataloguing/value_builder";
259
    return C4::Context->config('intranetdir') . "/cataloguing/value_builder";
260
    #Formerly, intranetdir/cgi-bin was tested first.
260
    #Formerly, intranetdir/cgi-bin was tested first.
261
    #But the intranetdir from koha-conf already includes cgi-bin for
261
    #But the intranetdir from koha-conf already includes cgi-bin for
262
    #package installs, single and standard installs.
262
    #package installs, single and standard installs.
(-)a/admin/auth_subfields_structure.pl (-2 / +2 lines)
Lines 108-116 if ($op eq 'add_form') { Link Here
108
	# 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
108
	# 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
109
	# on a standard install, /cgi-bin need to be added. 
109
	# on a standard install, /cgi-bin need to be added. 
110
	# test one, then the other
110
	# test one, then the other
111
	my $cgidir = C4::Context->intranetdir ."/cgi-bin";
111
    my $cgidir = C4::Context->config('intranetdir') ."/cgi-bin";
112
	unless (opendir(DIR, "$cgidir/cataloguing/value_builder")) {
112
	unless (opendir(DIR, "$cgidir/cataloguing/value_builder")) {
113
		$cgidir = C4::Context->intranetdir;
113
        $cgidir = C4::Context->config('intranetdir');
114
		opendir(DIR, "$cgidir/cataloguing/value_builder") || die "can't opendir $cgidir/value_builder: $!";
114
		opendir(DIR, "$cgidir/cataloguing/value_builder") || die "can't opendir $cgidir/value_builder: $!";
115
	} 
115
	} 
116
	while (my $line = readdir(DIR)) {
116
	while (my $line = readdir(DIR)) {
(-)a/admin/marc_subfields_structure.pl (-2 / +2 lines)
Lines 154-162 if ( $op eq 'add_form' ) { Link Here
154
    # 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
154
    # 2 cases here : on CVS install, $cgidir does not need a /cgi-bin
155
    # on a standard install, /cgi-bin need to be added.
155
    # on a standard install, /cgi-bin need to be added.
156
    # test one, then the other
156
    # test one, then the other
157
    my $cgidir = C4::Context->intranetdir . "/cgi-bin";
157
    my $cgidir = C4::Context->config('intranetdir') . "/cgi-bin";
158
    unless ( opendir( DIR, "$cgidir/cataloguing/value_builder" ) ) {
158
    unless ( opendir( DIR, "$cgidir/cataloguing/value_builder" ) ) {
159
        $cgidir = C4::Context->intranetdir;
159
        $cgidir = C4::Context->config('intranetdir');
160
        opendir( DIR, "$cgidir/cataloguing/value_builder" )
160
        opendir( DIR, "$cgidir/cataloguing/value_builder" )
161
          || die "can't opendir $cgidir/value_builder: $!";
161
          || die "can't opendir $cgidir/value_builder: $!";
162
    }
162
    }
(-)a/reports/manager.pl (-2 / +1 lines)
Lines 44-50 $template->param(do_it => $do_it, Link Here
44
		);
44
		);
45
my $cgidir = C4::Context->config('intranetdir')."/cgi-bin/reports/";
45
my $cgidir = C4::Context->config('intranetdir')."/cgi-bin/reports/";
46
unless (-r $cgidir and -d $cgidir) {
46
unless (-r $cgidir and -d $cgidir) {
47
	$cgidir = C4::Context->intranetdir."/reports/";
47
    $cgidir = C4::Context->config('intranetdir')."/reports/";
48
} 
48
} 
49
my $plugin = $cgidir.$report_name.".plugin";
49
my $plugin = $cgidir.$report_name.".plugin";
50
require $plugin;
50
require $plugin;
51
- 

Return to bug 9006