|
Lines 54-59
foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtype
Link Here
|
| 54 |
push @authtypesloop, \%row; |
54 |
push @authtypesloop, \%row; |
| 55 |
} |
55 |
} |
| 56 |
|
56 |
|
|
|
57 |
if ( $op eq "delete" ) { |
| 58 |
( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 59 |
{ |
| 60 |
template_name => "authorities/authorities-home.tmpl", |
| 61 |
query => $query, |
| 62 |
type => 'intranet', |
| 63 |
authnotrequired => 0, |
| 64 |
flagsrequired => { catalogue => 1 }, |
| 65 |
debug => 1, |
| 66 |
} |
| 67 |
); |
| 68 |
&DelAuthority( $authid, 1 ); |
| 69 |
|
| 70 |
$op = "do_search"; |
| 71 |
} |
| 57 |
if ( $op eq "do_search" ) { |
72 |
if ( $op eq "do_search" ) { |
| 58 |
my @marclist = $query->param('marclist'); |
73 |
my @marclist = $query->param('marclist'); |
| 59 |
my @and_or = $query->param('and_or'); |
74 |
my @and_or = $query->param('and_or'); |
|
Lines 69-75
if ( $op eq "do_search" ) {
Link Here
|
| 69 |
SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, |
84 |
SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, |
| 70 |
( $startfrom - 1 ) * $resultsperpage, |
85 |
( $startfrom - 1 ) * $resultsperpage, |
| 71 |
$resultsperpage, $authtypecode, $orderby ); |
86 |
$resultsperpage, $authtypecode, $orderby ); |
| 72 |
# use Data::Dumper; warn Data::Dumper::Dumper(@$results); |
87 |
|
| 73 |
( $template, $loggedinuser, $cookie ) = get_template_and_user( |
88 |
( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 74 |
{ |
89 |
{ |
| 75 |
template_name => "authorities/searchresultlist.tmpl", |
90 |
template_name => "authorities/searchresultlist.tmpl", |
|
Lines 81-86
if ( $op eq "do_search" ) {
Link Here
|
| 81 |
} |
96 |
} |
| 82 |
); |
97 |
); |
| 83 |
|
98 |
|
|
|
99 |
$template->param( |
| 100 |
marclist => $query->param('marclist'), |
| 101 |
and_or => $query->param('and_or'), |
| 102 |
excluding => $query->param('excluding'), |
| 103 |
operator => $query->param('operator'), |
| 104 |
orderby => $query->param('orderby'), |
| 105 |
value => $query->param('value'), |
| 106 |
authtypecode => $query->param('authtypecode'), |
| 107 |
startfrom => $startfrom, |
| 108 |
resultsperpage => $resultsperpage, |
| 109 |
); |
| 110 |
|
| 84 |
my @field_data = (); |
111 |
my @field_data = (); |
| 85 |
|
112 |
|
| 86 |
# we must get parameters once again. Because if there is a mainentry, it |
113 |
# we must get parameters once again. Because if there is a mainentry, it |
|
Lines 146-165
if ( $op eq "do_search" ) {
Link Here
|
| 146 |
); |
173 |
); |
| 147 |
|
174 |
|
| 148 |
} |
175 |
} |
| 149 |
elsif ( $op eq "delete" ) { |
176 |
if ( $op eq '' ) { |
| 150 |
( $template, $loggedinuser, $cookie ) = get_template_and_user( |
|
|
| 151 |
{ |
| 152 |
template_name => "authorities/authorities-home.tmpl", |
| 153 |
query => $query, |
| 154 |
type => 'intranet', |
| 155 |
authnotrequired => 0, |
| 156 |
flagsrequired => { catalogue => 1 }, |
| 157 |
debug => 1, |
| 158 |
} |
| 159 |
); |
| 160 |
&DelAuthority( $authid, 1 ); |
| 161 |
} |
| 162 |
else { |
| 163 |
( $template, $loggedinuser, $cookie ) = get_template_and_user( |
177 |
( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 164 |
{ |
178 |
{ |
| 165 |
template_name => "authorities/authorities-home.tmpl", |
179 |
template_name => "authorities/authorities-home.tmpl", |