Bug 13967: (RM followup) fix merge error

When I merged 13967 into master (with 5010 already on it) I inadvertedly
removed a few lines that add a check for bad OPACBaseURL values.

While I don't agree with that check it should be discussed on a separate
bug anyway.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2015-06-04 15:15:32 -03:00
parent 2e11350fe3
commit fed5e7b6bb
1 changed files with 5 additions and 0 deletions

View File

@ -604,6 +604,11 @@ sub set_preference {
$value = 0 if ( $type && $type eq 'YesNo' && $value eq '' );
# force explicit protocol on OPACBaseURL
if ($var eq 'opacbaseurl' && substr($value,0,4) !~ /http/) {
$value = 'http://' . $value;
}
if ($syspref) {
$syspref = $syspref->set( { value => $value } )->store();
}