# along with Koha; if not, see <http://www.gnu.org/licenses>.
use Modern::Perl;
-use Data::Dumper;
-use POSIX;
+use POSIX qw( ceil exit );
use CGI qw ( -utf8 );
use CGI::Cookie; # need to check cookies before having CGI parse the POST request
-use URI::Escape;
-use C4::Auth qw(:DEFAULT check_cookie_auth);
+use URI::Escape qw( uri_escape_utf8 );
+use C4::Auth qw( check_cookie_auth get_template_and_user );
use C4::Context;
-use Koha::DateUtils;
-# use C4::Koha;
-use C4::Output qw(:html :ajax pagination_bar);
-use C4::Tags qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved);
+use Koha::DateUtils qw( dt_from_string output_pref );
+use C4::Output qw( output_with_http_headers is_ajax pagination_bar output_html_with_http_headers );
+use C4::Tags qw(
+ approval_counts
+ blacklist
+ get_approval_rows
+ is_approved
+ whitelist
+);
my $script_name = "/cgi-bin/koha/tags/review.pl";
my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created.
my %cookies = CGI::Cookie->fetch;
my $input = CGI->new;
my $sessid = $cookies{'CGISESSID'}->value;
- my ($auth_status, $auth_sessid) = check_cookie_auth($sessid, $needed_flags);
+ my ($auth_status) = check_cookie_auth($sessid, $needed_flags);
if ($auth_status ne "ok") {
output_with_http_headers $input, undef,
"window.alert('Your CGI session cookie ($sessid) is not current. " .