Bug 17600: Standardize our EXPORT_OK
[srvgit] / offline_circ / download.pl
index 713057c..87388bf 100755 (executable)
@@ -4,31 +4,29 @@
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 3 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use Modern::Perl;
 use CGI qw ( -utf8 );
-use JSON;
-use C4::Auth;
+use JSON qw( to_json );
+use C4::Auth qw( checkauth );
 use C4::Output;
 use C4::Context;
 use C4::Koha;
 
-my $query = new CGI;
-my ( $template, $loggedinuser, $cookie, $flags ) =
-  checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
+my $query = CGI->new;
+checkauth( $query, undef, { circulate => "circulate_remaining_permissions" },
     "intranet" );
 
 my $page     = $query->param('page') || 0;
@@ -69,6 +67,7 @@ my $issues_query = q{SELECT
     issues.date_due AS date_due,
     issues.issuedate AS issuedate,
     issues.renewals AS renewals,
+    issues.unseen_renewals AS unseen_renewals,
     borrowers.cardnumber AS cardnumber,
     CONCAT(borrowers.surname, ', ', borrowers.firstname) AS borrower_name
     FROM issues