Lines 31-50
use C4::Acquisition;
Link Here
|
31 |
use C4::Koha; # XXX subfield_is_koha_internal_p |
31 |
use C4::Koha; # XXX subfield_is_koha_internal_p |
32 |
use C4::Biblio; |
32 |
use C4::Biblio; |
33 |
|
33 |
|
34 |
my $query = new CGI; |
34 |
my $query = new CGI; |
35 |
my $op = $query->param('op'); |
35 |
my $op = $query->param('op'); |
36 |
$op ||= q{}; |
36 |
$op ||= q{}; |
37 |
my $authtypecode = $query->param('authtypecode'); |
37 |
my $authtypecode = $query->param('authtypecode'); |
38 |
$authtypecode ||= q{}; |
38 |
$authtypecode ||= q{}; |
39 |
my $dbh = C4::Context->dbh; |
39 |
my $dbh = C4::Context->dbh; |
40 |
|
40 |
|
41 |
my $authid = $query->param('authid'); |
41 |
my $authid = $query->param('authid'); |
42 |
my ( $template, $loggedinuser, $cookie ); |
42 |
my ( $template, $loggedinuser, $cookie ); |
43 |
|
43 |
|
44 |
my $authtypes = getauthtypes; |
44 |
my $authtypes = getauthtypes; |
45 |
my @authtypesloop; |
45 |
my @authtypesloop; |
46 |
foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} } |
46 |
foreach my $thisauthtype ( |
47 |
keys %$authtypes ) |
47 |
sort { |
|
|
48 |
$authtypes->{$a}{'authtypetext'} cmp $authtypes->{$b}{'authtypetext'} |
49 |
} |
50 |
keys %$authtypes |
51 |
) |
48 |
{ |
52 |
{ |
49 |
my %row = ( |
53 |
my %row = ( |
50 |
value => $thisauthtype, |
54 |
value => $thisauthtype, |
Lines 66-72
if ( $op eq "delete" ) {
Link Here
|
66 |
} |
70 |
} |
67 |
); |
71 |
); |
68 |
&DelAuthority( $authid, 1 ); |
72 |
&DelAuthority( $authid, 1 ); |
69 |
|
73 |
|
70 |
$op = "do_search"; |
74 |
$op = "do_search"; |
71 |
} |
75 |
} |
72 |
if ( $op eq "do_search" ) { |
76 |
if ( $op eq "do_search" ) { |
Lines 115-133
if ( $op eq "do_search" ) {
Link Here
|
115 |
# next/previous would not work anymore |
119 |
# next/previous would not work anymore |
116 |
my @marclist_ini = $query->param('marclist'); |
120 |
my @marclist_ini = $query->param('marclist'); |
117 |
for ( my $i = 0 ; $i <= $#marclist ; $i++ ) { |
121 |
for ( my $i = 0 ; $i <= $#marclist ; $i++ ) { |
118 |
if ($value[$i]){ |
122 |
if ( $value[$i] ) { |
119 |
push @field_data, { term => "marclist", val => $marclist_ini[$i] }; |
123 |
push @field_data, { term => "marclist", val => $marclist_ini[$i] }; |
120 |
if (!defined $and_or[$i]) { |
124 |
if ( !defined $and_or[$i] ) { |
121 |
$and_or[$i] = q{}; |
125 |
$and_or[$i] = q{}; |
122 |
} |
126 |
} |
123 |
push @field_data, { term => "and_or", val => $and_or[$i] }; |
127 |
push @field_data, { term => "and_or", val => $and_or[$i] }; |
124 |
if (!defined $excluding[$i]) { |
128 |
if ( !defined $excluding[$i] ) { |
125 |
$excluding[$i] = q{}; |
129 |
$excluding[$i] = q{}; |
126 |
} |
130 |
} |
127 |
push @field_data, { term => "excluding", val => $excluding[$i] }; |
131 |
push @field_data, { term => "excluding", val => $excluding[$i] }; |
128 |
push @field_data, { term => "operator", val => $operator[$i] }; |
132 |
push @field_data, { term => "operator", val => $operator[$i] }; |
129 |
push @field_data, { term => "value", val => $value[$i] }; |
133 |
push @field_data, { term => "value", val => $value[$i] }; |
130 |
} |
134 |
} |
131 |
} |
135 |
} |
132 |
|
136 |
|
133 |
# construction of the url of each page |
137 |
# construction of the url of each page |
Lines 148-154
if ( $op eq "do_search" ) {
Link Here
|
148 |
|
152 |
|
149 |
my $from = ( $startfrom - 1 ) * $resultsperpage + 1; |
153 |
my $from = ( $startfrom - 1 ) * $resultsperpage + 1; |
150 |
my $to; |
154 |
my $to; |
151 |
if (!defined $total) { |
155 |
if ( !defined $total ) { |
152 |
$total = 0; |
156 |
$total = 0; |
153 |
} |
157 |
} |
154 |
|
158 |
|
Lines 187-195
if ( $op eq '' ) {
Link Here
|
187 |
|
191 |
|
188 |
} |
192 |
} |
189 |
|
193 |
|
190 |
$template->param( |
194 |
$template->param( authtypesloop => \@authtypesloop, ); |
191 |
authtypesloop => \@authtypesloop, |
|
|
192 |
); |
193 |
|
195 |
|
194 |
$template->{VARS}->{marcflavour} = C4::Context->preference("marcflavour"); |
196 |
$template->{VARS}->{marcflavour} = C4::Context->preference("marcflavour"); |
195 |
|
197 |
|
196 |
- |
|
|