require Exporter;
use CGI;
use C4::Auth;
-use HTML::Template;
+
use C4::Context;
-use C4::Search;
use C4::Auth;
use C4::Output;
-use C4::Interface::CGI::Output;
use C4::AuthoritiesMarc;
-use C4::SearchMarc;
use C4::Acquisition;
use C4::Koha; # XXX subfield_is_koha_internal_p
+use C4::Biblio;
my $query=new CGI;
my $op = $query->param('op');
my @and_or = $query->param('and_or');
my @excluding = $query->param('excluding');
my @operator = $query->param('operator');
+ my $orderby = $query->param('orderby');
my @value = $query->param('value');
my $startfrom = $query->param('startfrom') || 1;
my $resultsperpage = $query->param('resultsperpage') || 19;
- my ($results,$total) = authoritysearch(
- $dbh,
+ my ($results,$total) = SearchAuthorities(
\@marclist,
\@and_or,
\@excluding,
\@value,
($startfrom - 1)*$resultsperpage,
$resultsperpage,
- $authtypecode
+ $authtypecode,
+ $orderby
);
($template, $loggedinuser, $cookie)
query => $query,
type => 'intranet',
authnotrequired => 0,
- flagsrequired => {borrowers => 1},
flagsrequired => {catalogue => 1},
debug => 1,
});
{term => 'resultsperpage', val => $resultsperpage},
{term => 'type' , val => 'intranet'},
{term => 'op' , val => 'do_search'},
- {term => 'authtypecode' , val => $authtypecode}
+ {term => 'authtypecode' , val => $authtypecode},
+ {term => 'orderby' , val => $orderby},
)
)
;
} elsif ($op eq "delete") {
- &AUTHdelauthority($dbh,$authid, 1);
+ &DelAuthority($authid, 1);
($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "authorities/authorities-home.tmpl",