Lines 187-204
build a HTML select with the following code :
Link Here
|
187 |
=cut |
187 |
=cut |
188 |
|
188 |
|
189 |
sub GetSupportList{ |
189 |
sub GetSupportList{ |
190 |
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes"); |
190 |
my ( $params ) = @_; |
|
|
191 |
my $use_SuggestionsHideItemTypes = $params->{SuggestionsHideItemTypes}; |
191 |
|
192 |
|
192 |
my $hidden_item_types = join( ',', map{ qq{'$_'} } split(qq{ }, C4::Context->preference("SuggestionsHideItemTypes") ) ); |
193 |
my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes"); |
193 |
my $hide_sql = $hidden_item_types ? "WHERE itemtype NOT IN ( $hidden_item_types )" : qq{}; |
|
|
194 |
|
194 |
|
195 |
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { |
195 |
if (!$advanced_search_types or $advanced_search_types eq 'itemtypes') { |
196 |
my $query = qq| |
196 |
|
197 |
SELECT * |
197 |
my $where; |
198 |
FROM itemtypes |
198 |
if ( $use_SuggestionsHideItemTypes ) { |
199 |
$hide_sql |
199 |
my $hidden_item_types = join( ',', map{ qq{'$_'} } split(q{ }, C4::Context->preference("SuggestionsHideItemTypes") ) ); |
200 |
ORDER BY description |
200 |
$where = $hidden_item_types ? "WHERE itemtype NOT IN ( $hidden_item_types )" : qq{}; |
201 |
|; |
201 |
} |
|
|
202 |
|
203 |
my $query = qq{ SELECT * FROM itemtypes $where ORDER BY description }; |
202 |
my $sth = C4::Context->dbh->prepare($query); |
204 |
my $sth = C4::Context->dbh->prepare($query); |
203 |
$sth->execute; |
205 |
$sth->execute; |
204 |
return $sth->fetchall_arrayref({}); |
206 |
return $sth->fetchall_arrayref({}); |