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

(-)a/C4/Context.pm (-1 / +1 lines)
Lines 616-622 sub set_preference { Link Here
616
    $value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );
616
    $value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );
617
617
618
    # force explicit protocol on OPACBaseURL
618
    # force explicit protocol on OPACBaseURL
619
    if ( $variable eq 'opacbaseurl' && substr( $value, 0, 4 ) !~ /http/ ) {
619
    if ( $variable eq 'opacbaseurl' && $value && substr( $value, 0, 4 ) !~ /http/ ) {
620
        $value = 'http://' . $value;
620
        $value = 'http://' . $value;
621
    }
621
    }
622
622
(-)a/t/db_dependent/Context.t (-1 / +4 lines)
Lines 39-44 C4::Context->clear_syspref_cache(); Link Here
39
$OPACBaseURL = C4::Context->preference('OPACBaseURL');
39
$OPACBaseURL = C4::Context->preference('OPACBaseURL');
40
is($OPACBaseURL,'http://junk2','OPACBaseURL saved with http:// as specified');
40
is($OPACBaseURL,'http://junk2','OPACBaseURL saved with http:// as specified');
41
41
42
C4::Context->set_preference('OPACBaseURL', '');
43
$OPACBaseURL = C4::Context->preference('OPACBaseURL');
44
is($OPACBaseURL,'','OPACBaseURL saved empty as specified');
45
42
C4::Context->set_preference('SillyPreference','random');
46
C4::Context->set_preference('SillyPreference','random');
43
C4::Context->clear_syspref_cache();
47
C4::Context->clear_syspref_cache();
44
my $SillyPeference = C4::Context->preference('SillyPreference');
48
my $SillyPeference = C4::Context->preference('SillyPreference');
45
- 

Return to bug 16813