Lines 16-48
return {
Link Here
|
16 |
subject => 'Topics', |
16 |
subject => 'Topics', |
17 |
ln => 'Languages', |
17 |
ln => 'Languages', |
18 |
}; |
18 |
}; |
|
|
19 |
|
19 |
# Do not update the label if different from the original one |
20 |
# Do not update the label if different from the original one |
20 |
my $sth = $dbh->prepare(q{ |
21 |
my $sth = $dbh->prepare( |
|
|
22 |
q{ |
21 |
UPDATE search_field |
23 |
UPDATE search_field |
22 |
SET label = ? |
24 |
SET label = ? |
23 |
WHERE name = ? AND label = ? |
25 |
WHERE name = ? AND label = ? |
24 |
}); |
26 |
} |
|
|
27 |
); |
25 |
while ( my ( $name, $label ) = each %$facets ) { |
28 |
while ( my ( $name, $label ) = each %$facets ) { |
26 |
$sth->execute( $label, $name, $name ); |
29 |
$sth->execute( $label, $name, $name ); |
27 |
} |
30 |
} |
28 |
|
31 |
|
29 |
$sth->execute( 'Collections', 'ccode', 'collection-code'); |
32 |
$sth->execute( 'Collections', 'ccode', 'collection-code' ); |
30 |
|
33 |
|
31 |
# Deal with DisplayLibraryFacets |
34 |
# Deal with DisplayLibraryFacets |
32 |
my ($DisplayLibraryFacets) = $dbh->selectrow_array(q{ |
35 |
my ($DisplayLibraryFacets) = $dbh->selectrow_array( |
|
|
36 |
q{ |
33 |
SELECT value FROM systempreferences WHERE variable='DisplayLibraryFacets' |
37 |
SELECT value FROM systempreferences WHERE variable='DisplayLibraryFacets' |
34 |
}); |
38 |
} |
35 |
my ($homebranch, $holdingbranch); |
39 |
); |
|
|
40 |
my ( $homebranch, $holdingbranch ); |
36 |
if ( $DisplayLibraryFacets eq 'both' ) { |
41 |
if ( $DisplayLibraryFacets eq 'both' ) { |
37 |
$homebranch = 1; |
42 |
$homebranch = 1; |
38 |
$holdingbranch = 1; |
43 |
$holdingbranch = 1; |
39 |
} elsif ( $DisplayLibraryFacets eq 'holding' ) { |
44 |
} elsif ( $DisplayLibraryFacets eq 'holding' ) { |
40 |
$holdingbranch = 1; |
45 |
$holdingbranch = 1; |
41 |
} elsif ( $DisplayLibraryFacets eq 'home' ) { |
46 |
} elsif ( $DisplayLibraryFacets eq 'home' ) { |
42 |
$homebranch = 1; |
47 |
$homebranch = 1; |
43 |
} |
48 |
} |
44 |
$sth->execute( 'Holding libraries', 'holdingbranch', 'holdinglibrary') if $holdingbranch; |
49 |
$sth->execute( 'Holding libraries', 'holdingbranch', 'holdinglibrary' ) if $holdingbranch; |
45 |
$sth->execute( 'Home libraries', 'homebranch', 'homelibrary') if $homebranch; |
50 |
$sth->execute( 'Home libraries', 'homebranch', 'homelibrary' ) if $homebranch; |
46 |
|
51 |
|
47 |
}, |
52 |
}, |
48 |
}; |
53 |
}; |
49 |
- |
|
|