@@ -, +, @@ - Removes printcirculationslips system preference - Removes table printers - Removes branchprinter column from branches - Go to administration - Open any age there, but change the last bit to: printers.pl - Apply patch, run the database update - Verify the hidden page no longer exists - Verify that logging in and out still works correctly - Verify that checkout and returns work correctly - Switch to another branch using the "Set library" option --- C4/Auth.pm | 37 ++--- C4/Context.pm | 5 +- C4/InstallAuth.pm | 3 +- C4/Koha.pm | 40 ----- C4/Print.pm | 104 ------------ admin/printers.pl | 137 ---------------- circ/circulation.pl | 18 +-- circ/returns.pl | 7 - circ/selectbranchprinter.pl | 45 ------ .../mysql/atomicupdate/bug_17845_remove_printers | 4 + installer/data/mysql/kohastructure.sql | 14 -- .../data/mysql/ru-RU/optional/example_branches.sql | 18 +-- installer/data/mysql/sysprefs.sql | 1 - .../en/modules/admin/preferences/circulation.pref | 1 - .../prog/en/modules/admin/printers.tt | 174 --------------------- .../prog/en/modules/circ/selectbranchprinter.tt | 15 -- t/Print.t | 15 -- 17 files changed, 33 insertions(+), 605 deletions(-) delete mode 100644 C4/Print.pm delete mode 100755 admin/printers.pl create mode 100644 installer/data/mysql/atomicupdate/bug_17845_remove_printers delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt delete mode 100755 t/Print.t --- a/C4/Auth.pm +++ a/C4/Auth.pm @@ -853,7 +853,7 @@ sub checkauth { $session->param('cardnumber'), $session->param('firstname'), $session->param('surname'), $session->param('branch'), $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), $session->param('branchprinter'), + $session->param('emailaddress'), $session->param('shibboleth') ); C4::Context::set_shelves_userenv( 'bar', $session->param('barshelves') ); @@ -1076,14 +1076,12 @@ sub checkauth { C4::Context->_unset_userenv($sessionID); } my ( $borrowernumber, $firstname, $surname, $userflags, - $branchcode, $branchname, $branchprinter, $emailaddress ); + $branchcode, $branchname, $emailaddress ); if ( $return == 1 ) { my $select = " SELECT borrowernumber, firstname, surname, flags, borrowers.branchcode, - branches.branchname as branchname, - branches.branchprinter as branchprinter, - email + branches.branchname as branchname, email FROM borrowers LEFT JOIN branches on borrowers.branchcode=branches.branchcode "; @@ -1104,7 +1102,7 @@ sub checkauth { } if ( $sth->rows ) { ( $borrowernumber, $firstname, $surname, $userflags, - $branchcode, $branchname, $branchprinter, $emailaddress ) = $sth->fetchrow; + $branchcode, $branchname, $emailaddress ) = $sth->fetchrow; $debug and print STDERR "AUTH_3 results: " . "$cardnumber,$borrowernumber,$userid,$firstname,$surname,$userflags,$branchcode,$emailaddress\n"; } else { @@ -1146,8 +1144,7 @@ sub checkauth { if ( $domain && $ip =~ /^$domain/ ) { $branchcode = $branches->{$br}->{'branchcode'}; - # new op dev : add the branchprinter and branchname in the cookie - $branchprinter = $branches->{$br}->{'branchprinter'}; + # new op dev : add the branchname to the cookie $branchname = $branches->{$br}->{'branchname'}; } } @@ -1171,8 +1168,7 @@ sub checkauth { $session->param('cardnumber'), $session->param('firstname'), $session->param('surname'), $session->param('branch'), $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), $session->param('branchprinter'), - $session->param('shibboleth') + $session->param('emailaddress'), $session->param('shibboleth') ); } @@ -1439,7 +1435,7 @@ sub check_api_auth { $session->param('cardnumber'), $session->param('firstname'), $session->param('surname'), $session->param('branch'), $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), $session->param('branchprinter') + $session->param('emailaddress') ); my $ip = $session->param('ip'); @@ -1527,35 +1523,35 @@ sub check_api_auth { my ( $borrowernumber, $firstname, $surname, $userflags, $branchcode, $branchname, - $branchprinter, $emailaddress + $emailaddress ); my $sth = $dbh->prepare( -"select borrowernumber, firstname, surname, flags, borrowers.branchcode, branches.branchname as branchname,branches.branchprinter as branchprinter, email from borrowers left join branches on borrowers.branchcode=branches.branchcode where userid=?" +"select borrowernumber, firstname, surname, flags, borrowers.branchcode, branches.branchname as branchname, email from borrowers left join branches on borrowers.branchcode=branches.branchcode where userid=?" ); $sth->execute($userid); ( $borrowernumber, $firstname, $surname, $userflags, $branchcode, $branchname, - $branchprinter, $emailaddress + $emailaddress ) = $sth->fetchrow if ( $sth->rows ); unless ( $sth->rows ) { my $sth = $dbh->prepare( -"select borrowernumber, firstname, surname, flags, borrowers.branchcode, branches.branchname as branchname, branches.branchprinter as branchprinter, email from borrowers left join branches on borrowers.branchcode=branches.branchcode where cardnumber=?" +"select borrowernumber, firstname, surname, flags, borrowers.branchcode, branches.branchname as branchname, email from borrowers left join branches on borrowers.branchcode=branches.branchcode where cardnumber=?" ); $sth->execute($cardnumber); ( $borrowernumber, $firstname, $surname, $userflags, $branchcode, $branchname, - $branchprinter, $emailaddress + $emailaddress ) = $sth->fetchrow if ( $sth->rows ); unless ( $sth->rows ) { $sth->execute($userid); ( $borrowernumber, $firstname, $surname, $userflags, - $branchcode, $branchname, $branchprinter, $emailaddress + $branchcode, $branchname, $emailaddress ) = $sth->fetchrow if ( $sth->rows ); } } @@ -1576,8 +1572,7 @@ sub check_api_auth { if ( $domain && $ip =~ /^$domain/ ) { $branchcode = $branches->{$br}->{'branchcode'}; - # new op dev : add the branchprinter and branchname in the cookie - $branchprinter = $branches->{$br}->{'branchprinter'}; + # new op dev : add the branchname to the cookie $branchname = $branches->{$br}->{'branchname'}; } } @@ -1599,7 +1594,7 @@ sub check_api_auth { $session->param('cardnumber'), $session->param('firstname'), $session->param('surname'), $session->param('branch'), $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), $session->param('branchprinter') + $session->param('emailaddress') ); return ( "ok", $cookie, $sessionID ); } else { @@ -1682,7 +1677,7 @@ sub check_cookie_auth { $session->param('cardnumber'), $session->param('firstname'), $session->param('surname'), $session->param('branch'), $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), $session->param('branchprinter') + $session->param('emailaddress') ); my $ip = $session->param('ip'); --- a/C4/Context.pm +++ a/C4/Context.pm @@ -835,7 +835,7 @@ sub userenv { C4::Context->set_userenv($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, - $emailaddress, $branchprinter, $shibboleth); + $emailaddress, $shibboleth); Establish a hash of user environment variables. @@ -846,7 +846,7 @@ set_userenv is called in Auth.pm #' sub set_userenv { shift @_; - my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $branchprinter, $shibboleth)= + my ($usernum, $userid, $usercnum, $userfirstname, $usersurname, $userbranch, $branchname, $userflags, $emailaddress, $shibboleth)= map { Encode::is_utf8( $_ ) ? $_ : Encode::decode('UTF-8', $_) } # CGI::Session doesn't handle utf-8, so we decode it here @_; my $var=$context->{"activeuser"} || ''; @@ -861,7 +861,6 @@ sub set_userenv { "branchname" => $branchname, "flags" => $userflags, "emailaddress" => $emailaddress, - "branchprinter" => $branchprinter, "shibboleth" => $shibboleth, }; $context->{userenv}->{$var} = $cell; --- a/C4/InstallAuth.pm +++ a/C4/InstallAuth.pm @@ -260,8 +260,7 @@ sub checkauth { $session->param('branch'), $session->param('branchname'), $session->param('flags'), - $session->param('emailaddress'), - $session->param('branchprinter') + $session->param('emailaddress') ); $cookie = $query->cookie( -name => 'CGISESSID', --- a/C4/Koha.pm +++ a/C4/Koha.pm @@ -40,7 +40,6 @@ BEGIN { require Exporter; @ISA = qw(Exporter); @EXPORT = qw( - &GetPrinters &GetPrinter &GetItemTypesCategorized &getallthemes &getFacets @@ -277,45 +276,6 @@ sub getImageSets { return \@imagesets; } -=head2 GetPrinters - - $printers = &GetPrinters(); - @queues = keys %$printers; - -Returns information about existing printer queues. - -C<$printers> is a reference-to-hash whose keys are the print queues -defined in the printers table of the Koha database. The values are -references-to-hash, whose keys are the fields in the printers table. - -=cut - -sub GetPrinters { - my %printers; - my $dbh = C4::Context->dbh; - my $sth = $dbh->prepare("select * from printers"); - $sth->execute; - while ( my $printer = $sth->fetchrow_hashref ) { - $printers{ $printer->{'printqueue'} } = $printer; - } - return ( \%printers ); -} - -=head2 GetPrinter - - $printer = GetPrinter( $query, $printers ); - -=cut - -sub GetPrinter { - my ( $query, $printers ) = @_; # get printer for this query from printers - my $printer = $query->param('printer'); - my %cookie = $query->cookie('userenv'); - ($printer) || ( $printer = $cookie{'printer'} ) || ( $printer = '' ); - ( $printers->{$printer} ) || ( $printer = ( keys %$printers )[0] ); - return $printer; -} - =head2 getnbpages Returns the number of pages to display in a pagination bar, given the number --- a/C4/Print.pm +++ a/C4/Print.pm @@ -1,104 +0,0 @@ -package C4::Print; - -# Copyright 2000-2002 Katipo Communications -# -# 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 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 . - -use strict; -#use warnings; FIXME - Bug 2505 -use C4::Context; - -use vars qw(@ISA @EXPORT); - -BEGIN { - require Exporter; - @ISA = qw(Exporter); - @EXPORT = qw(&NetworkPrint); -} - -=head1 NAME - -C4::Print - Koha module dealing with printing - -=head1 SYNOPSIS - - use C4::Print; - -=head1 DESCRIPTION - -The functions in this module handle sending text to a printer. - -=head1 FUNCTIONS - -=head2 NetworkPrint - - &NetworkPrint($text) - -Queue some text for printing on the selected branch printer - -=cut - -sub NetworkPrint { - my ($text) = @_; - -# FIXME - It'd be nifty if this could generate pretty PostScript. - - my $queue = ''; - - # FIXME - If 'queue' is undefined or empty, then presumably it should - # mean "use the default queue", whatever the default is. Presumably - # the default depends on the physical location of the machine. - # FIXME - Perhaps "print to file" should be a supported option. Just - # set the queue to "file" (or " file", if real queues aren't allowed - # to have spaces in them). Or perhaps if $queue eq "" and - # $env->{file} ne "", then that should mean "print to $env->{file}". - - my $fh; - if ( $queue eq "" || $queue eq 'nulllp' ) { - return; - #open( $fh, ">/tmp/kohaiss" ); - } - else { - - # FIXME - This assumes that 'lpr' exists, and works as expected. - # This is a reasonable assumption, but only because every other - # printing package has a wrapper script called 'lpr'. It'd still - # be better to be able to customize this. - open( $fh, "-|", "lpr -P $queue > /dev/null" ) - or die "Couldn't write to queue:$queue!\n"; - } - - # print $queue; - #open (FILE,">/tmp/$file"); - print $fh $text; - print $fh "\r\n" x 7 ; - close $fh; - - #system("lpr /tmp/$file"); -} - -1; -__END__ - -=head1 AUTHOR - -Koha Development Team - -=head1 SEE ALSO - -C4::Circulation::Circ2(3) - -=cut --- a/admin/printers.pl +++ a/admin/printers.pl @@ -1,137 +0,0 @@ -#!/usr/bin/perl - -#script to administer the aqbudget table -#written 20/02/2002 by paul.poulain@free.fr -# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html) - -# ALGO : -# this script use an $op to know what to do. -# if $op is empty or none of the above values, -# - the default screen is build (with all records, or filtered datas). -# - the user can clic on add, modify or delete record. -# if $op=add_form -# - if primkey exists, this is a modification,so we read the $primkey record -# - builds the add/modify form -# if $op=add_validate -# - the user has just send datas, so we create/modify the record -# if $op=delete_form -# - we show the record having primkey=$primkey and ask for deletion validation form -# if $op=delete_confirm -# - we delete the record having primkey=$primkey - - -# Copyright 2000-2002 Katipo Communications -# -# 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 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 . - -use Modern::Perl; -use CGI qw ( -utf8 ); -use C4::Context; -use C4::Output; -use C4::Auth; - -sub StringSearch { - my ($searchstring,$type)=@_; # why bother with $type if we don't use it?! - $searchstring=~ s/\'/\\\'/g; - my @data=split(' ',$searchstring); - my $sth = C4::Context->dbh->prepare(" - SELECT printername,printqueue,printtype from printers - WHERE (printername like ?) order by printername - "); - $sth->execute("$data[0]%"); - my $data=$sth->fetchall_arrayref({}); - return (scalar(@$data),$data); -} - -my $input = new CGI; -my $searchfield=$input->param('searchfield'); -#my $branchcode=$input->param('branchcode'); -my $script_name="/cgi-bin/koha/admin/printers.pl"; - -my $op = $input->param('op'); -$searchfield=~ s/\,//g; - -my ($template, $loggedinuser, $cookie) = get_template_and_user( - { - template_name => "admin/printers.tt", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, - debug => 1, - } -); - -$template->param(searchfield => $searchfield, - script_name => $script_name); - -#start the page and read in includes - -my $dbh = C4::Context->dbh; -################## ADD_FORM ################################## -# called by default. Used to create form to add or modify a record -if ($op eq 'add_form') { - $template->param(add_form => 1); - #---- if primkey exists, it's a modify action, so read values to modify... - my $data; - if ($searchfield) { - my $sth=$dbh->prepare("SELECT printername,printqueue,printtype from printers where printername=?"); - $sth->execute($searchfield); - $data=$sth->fetchrow_hashref; - } - - $template->param(printqueue => $data->{'printqueue'}, - printtype => $data->{'printtype'}); - # END $OP eq ADD_FORM -################## ADD_VALIDATE ################################## -# called by add_form, used to insert/modify data in DB -} elsif ($op eq 'add_validate') { - $template->param(add_validate => 1); - if ($input->param('add')){ - my $sth=$dbh->prepare("INSERT INTO printers (printername,printqueue,printtype) VALUES (?,?,?)"); - $sth->execute($input->param('printername'),$input->param('printqueue'),$input->param('printtype')); - } else { - my $sth=$dbh->prepare("UPDATE printers SET printqueue=?,printtype=? WHERE printername=?"); - $sth->execute($input->param('printqueue'),$input->param('printtype'),$input->param('printername')); - } - # END $OP eq ADD_VALIDATE -################## DELETE_CONFIRM ################################## -# called by default form, used to confirm deletion of data in DB -} elsif ($op eq 'delete_confirm') { - $template->param(delete_confirm => 1); - my $sth=$dbh->prepare("select printername,printqueue,printtype from printers where printername=?"); - $sth->execute($searchfield); - my $data=$sth->fetchrow_hashref; - $template->param(printqueue => $data->{'printqueue'}, - printtype => $data->{'printtype'}); - # END $OP eq DELETE_CONFIRM -################## DELETE_CONFIRMED ################################## -# called by delete_confirm, used to effectively confirm deletion of data in DB -} elsif ($op eq 'delete_confirmed') { - $template->param(delete_confirmed => 1); - my $sth=$dbh->prepare("delete from printers where printername=?"); - $sth->execute($searchfield); - # END $OP eq DELETE_CONFIRMED -################## DEFAULT ########################################### -} else { # DEFAULT - $template->param(else => 1); - my ($count,$results)=StringSearch($searchfield,'web'); - $template->param(loop => $results); - -} #---- END $OP eq DEFAULT - -output_html_with_http_headers $input, $cookie, $template->output; - --- a/circ/circulation.pl +++ a/circ/circulation.pl @@ -30,9 +30,8 @@ use DateTime; use DateTime::Duration; use Scalar::Util qw( looks_like_number ); use C4::Output; -use C4::Print; use C4::Auth qw/:DEFAULT get_session haspermission/; -use C4::Koha; # GetPrinter +use C4::Koha; use C4::Circulation; use C4::Utils::DataTables::Members; use C4::Members; @@ -184,7 +183,6 @@ if ( $restoreduedatespec && $restoreduedatespec eq "highholds_empty" ) { } my $issueconfirmed = $query->param('issueconfirmed'); my $cancelreserve = $query->param('cancelreserve'); -my $print = $query->param('print') || q{}; my $debt_confirmed = $query->param('debt_confirmed') || 0; # Don't show the debt error dialog twice my $charges = $query->param('charges') || q{}; @@ -218,11 +216,6 @@ if( $onsite_checkout && !$duedatespec_allow ) { } } -# check and see if we should print -if ( @$barcodes == 0 && $print eq 'maybe' ) { - $print = 'yes'; -} - my $inprocess = (@$barcodes == 0) ? '' : $query->param('inprocess'); if ( @$barcodes == 0 && $charges eq 'yes' ) { $template->param( @@ -231,15 +224,6 @@ if ( @$barcodes == 0 && $charges eq 'yes' ) { ); } -if ( $print eq 'yes' && $borrowernumber ne '' ) { - if ( C4::Context->boolean_preference('printcirculationslips') ) { - my $letter = IssueSlip($branch, $borrowernumber, "QUICK"); - NetworkPrint($letter->{content}); - } - $query->param( 'borrowernumber', '' ); - $borrowernumber = ''; -} - # # STEP 2 : FIND BORROWER # if there is a list of find borrowers.... --- a/circ/returns.pl +++ a/circ/returns.pl @@ -37,7 +37,6 @@ use C4::Context; use C4::Auth qw/:DEFAULT get_session/; use C4::Output; use C4::Circulation; -use C4::Print; use C4::Reserves; use C4::Biblio; use C4::Items; @@ -86,16 +85,11 @@ if ( $query->param('print_slip') ) { ##################### #Global vars -my $printers = GetPrinters(); my $userenv = C4::Context->userenv; my $userenv_branch = $userenv->{'branch'} // ''; -my $printer = $userenv->{'branchprinter'} // ''; my $forgivemanualholdsexpire = $query->param('forgivemanualholdsexpire'); my $overduecharges = (C4::Context->preference('finesMode') && C4::Context->preference('finesMode') ne 'off'); - # -# Some code to handle the error if there is no branch or printer setting..... -# # Set up the item stack .... my %returneditems; @@ -612,7 +606,6 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $template->param( riloop => \@riloop, - printer => $printer, errmsgloop => \@errmsgloop, exemptfine => $exemptfine, dropboxmode => $dropboxmode, --- a/circ/selectbranchprinter.pl +++ a/circ/selectbranchprinter.pl @@ -23,13 +23,10 @@ use CGI qw ( -utf8 ); use C4::Context; use C4::Output; use C4::Auth qw/:DEFAULT get_session/; -use C4::Print; # GetPrinters use C4::Koha; use Koha::BiblioFrameworks; use Koha::Libraries; -# this will be the script that chooses branch and printer settings.... - my $query = CGI->new(); my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user({ @@ -44,14 +41,8 @@ my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user({ my $sessionID = $query->cookie("CGISESSID"); my $session = get_session($sessionID); -# try to get the branch and printer settings from http, fallback to userenv -my $printers = GetPrinters(); my $branch = $query->param('branch' ); -my $printer = $query->param('printer'); -# fallbacks for $branch and $printer after possible session updates - my $userenv_branch = C4::Context->userenv->{'branch'} || ''; -my $userenv_printer = C4::Context->userenv->{'branchprinter'} || ''; my @updated; # $session lddines here are doing the updating @@ -72,47 +63,12 @@ if ( $branch and my $library = Koha::Libraries->find($branch) ) { $branch = $userenv_branch; # fallback value } -# FIXME: branchprinter is not retained by session. This feature was not adequately -# ported from Koha 2.2.3 where it had been a separate cookie. -# So this needs to be fixed for Koha 3 or removed outright. -# --atz (w/ info from chris cormack) - -if ($printer) { - if (! $userenv_printer or $userenv_printer ne $printer ) { - $session->param('branchprinter', $printer); # update sesssion in DB - $session->flush(); - $template->param('new_printer', $printer); # update template - push @updated, { - updated_printer => 1, - old_printer => $userenv_printer, - }; - } # else printer is the same, no update -} else { - $printer = $userenv_printer; # fallback value -} - $template->param(updated => \@updated) if (scalar @updated); -my @printkeys = sort keys %$printers; -if (scalar(@printkeys) == 1 or not $printers->{$printer}) { - $printer = $printkeys[0]; # if printer didn't really exist, or there is only 1 anyway, then replace it w/ one that does -} - -my @printerloop; -foreach ( @printkeys ) { - next unless ($_); # skip printer if blank. - push @printerloop, { - selected => ( $_ eq $printer ), - name => $printers->{$_}->{'printername'}, - value => $_, - }; -} - my @recycle_loop; foreach ($query->param()) { $_ or next; # disclude blanks $_ eq "branch" and next; # disclude branch - $_ eq "printer" and next; # disclude printer $_ eq "oldreferer" and next; # disclude oldreferer push @recycle_loop, { param => $_, @@ -130,7 +86,6 @@ if (scalar @updated and not scalar @recycle_loop) { $template->param( referer => $referer, - printerloop => \@printerloop, branch => $branch, recycle_loop=> \@recycle_loop, ); --- a/installer/data/mysql/atomicupdate/bug_17845_remove_printers +++ a/installer/data/mysql/atomicupdate/bug_17845_remove_printers @@ -0,0 +1,4 @@ +DROP TABLE IF EXISTS printers; +ALTER TABLE branches DROP COLUMN branchprinter; +DELETE FROM systempreferences WHERE variable = "printcirculationslips"; +-- Bug 17845: Drop unused table printers and branchprinter column --- a/installer/data/mysql/kohastructure.sql +++ a/installer/data/mysql/kohastructure.sql @@ -262,7 +262,6 @@ CREATE TABLE `branches` ( -- information about your libraries or branches are st `branchurl` LONGTEXT, -- the URL for your library or branch's website `issuing` tinyint(4) default NULL, -- unused in Koha `branchip` varchar(15) default NULL, -- the IP address for your library or branch - `branchprinter` varchar(100) default NULL, -- unused in Koha `branchnotes` LONGTEXT, -- notes related to your library or branch opac_info MEDIUMTEXT, -- HTML that displays in OPAC `geolocation` VARCHAR(255) default NULL, -- geolocation of your library @@ -1348,19 +1347,6 @@ CREATE TABLE pending_offline_operations ( PRIMARY KEY (operationid) ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - --- --- Table structure for table `printers` --- - -DROP TABLE IF EXISTS `printers`; -CREATE TABLE `printers` ( - `printername` varchar(40) NOT NULL default '', - `printqueue` varchar(20) default NULL, - `printtype` varchar(20) default NULL, - PRIMARY KEY (`printername`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; - -- -- Table structure for table `printers_profile` -- --- a/installer/data/mysql/ru-RU/optional/example_branches.sql +++ a/installer/data/mysql/ru-RU/optional/example_branches.sql @@ -1,19 +1,19 @@ TRUNCATE branches; -INSERT INTO `branches` (`branchcode`, `branchname`, `branchaddress1`, `branchaddress2`, `branchaddress3`, `branchphone`, `branchfax`, `branchemail`, `issuing`, `branchip`, `branchprinter`) VALUES +INSERT INTO `branches` (`branchcode`, `branchname`, `branchaddress1`, `branchaddress2`, `branchaddress3`, `branchphone`, `branchfax`, `branchemail`, `issuing`, `branchip`) VALUES ('AB', 'Абонемент', - 'Украина', 'г. Тернополь', 'кабинет 53 (2-ой этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, '', NULL), + 'Украина', 'г. Тернополь', 'кабинет 53 (2-ой этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, ''), ('ABH', 'Абонемент художественной литературы', - 'Украина', 'г. Тернополь', 'кабинет 53 (2-ой этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, '', NULL), + 'Украина', 'г. Тернополь', 'кабинет 53 (2-ой этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, ''), ('CHZ', 'Читательский зал', - 'Украина', 'г. Тернополь', 'кабинет 58 (3-ий этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, '', NULL), + 'Украина', 'г. Тернополь', 'кабинет 58 (3-ий этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, ''), ('CHZP', 'Читательский зал периодики, каталог', - 'Украина', 'г. Тернополь', 'кабинет 2 (1-ый этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, '', NULL), + 'Украина', 'г. Тернополь', 'кабинет 2 (1-ый этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, ''), ('ECHZ', 'Электронный читательский зал', - 'Украина', 'г. Тернополь', 'кабинет 54 (2-ой этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, '', NULL), + 'Украина', 'г. Тернополь', 'кабинет 54 (2-ой этаж)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, ''), ('LNSL', 'Львовская национальная научная библиотека им. В.Стефаника НАНУ', - 'Украина', 'г. Львов', 'ул. Стефаника 2', '8 (032) 272-45-36', '', 'library@library.lviv.ua', NULL, '', NULL), + 'Украина', 'г. Львов', 'ул. Стефаника 2', '8 (032) 272-45-36', '', 'library@library.lviv.ua', NULL, ''), ('STL', 'Научно-техническая библиотека Тернопольского государственного техниеского университета им. Ив Пулюя', - 'Украина', 'м. Тернопіль', 'ул. Руська 56, кабинет 5 (второй корпус)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, '', NULL), + 'Украина', 'м. Тернопіль', 'ул. Руська 56, кабинет 5 (второй корпус)', '8 (0352) 52-53-45', '', 'lib@tu.edu.te.ua', NULL, ''), ('NPLU', 'Национальная парламентская библиотека Украины', - 'Украина', 'г. Киев', 'ул. Грушевского, 1', '38 (044) 278-85-12', '38 (044) 278-85-12', 'office@nplu.org', NULL, '192.168.1.*', NULL); + 'Украина', 'г. Киев', 'ул. Грушевского, 1', '38 (044) 278-85-12', '38 (044) 278-85-12', 'office@nplu.org', NULL, '192.168.1.*'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -441,7 +441,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PayPalUser', '', NULL , 'Your PayPal API username ( email address )', 'Free'), ('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'), ('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'), -('printcirculationslips','1','','If ON, enable printing circulation receipts','YesNo'), ('PrintNoticesMaxLines','0','','If greater than 0, sets the maximum number of lines an overdue notice will print. If the number of items is greater than this number, the notice will end with a warning asking the borrower to check their online account for a full list of overdue items.','Integer'), ('PrivacyPolicyURL','',NULL,'This URL is used in messages about GDPR consents.', 'Free'), ('ProcessingFeeNote', '', NULL, 'Set the text to be recorded in the column note, table accountlines when the processing fee (defined in item type) is applied', 'textarea'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -1,5 +1,4 @@ Circulation: -# FIXME: printcirculationslips is also omitted. It _technically_ could work, but C4::Print is HLT specific and needs a little bit of refactoring. Interface: - - pref: CircSidebar --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/printers.tt @@ -1,174 +0,0 @@ -[% USE raw %] -[% USE Asset %] -[% INCLUDE 'doc-head-open.inc' %] -Koha › Administration › -[% IF ( add_form ) %][% IF ( searchfield ) %] Printers › Modify printer '[% searchfield | html %]'[% ELSE %] Printers › New printer[% END %][% END %] -[% IF ( add_validate ) %] Printers › Printer added[% END %] -[% IF ( delete_confirm ) %] Printers › Confirm deletion of printer '[% searchfield | html %]'[% END %] -[% IF ( delete_confirmed ) %] Printers › Printer deleted[% END %] -[% IF ( else ) %]Printers[% END %] -[% INCLUDE 'doc-head-close.inc' %] -[% IF ( loop ) %] -[% Asset.css("css/datatables.css") | $raw %] -[% INCLUDE 'datatables.inc' %] - -[% END %] - - -[% INCLUDE 'header.inc' %] -[% INCLUDE 'cat-search.inc' %] - - - -
-
-
-
- -[% IF ( add_form ) %] - -[% IF ( searchfield ) %] -

Modify printer

- [% ELSE %] -

New printer

- [% END %] -
- - [% IF ( searchfield ) %] - - [% ELSE %] - - [% END %] -
-
    [% IF ( searchfield ) %] -
  1. - Printer name: - [% searchfield | html %] -
  2. - [% ELSE %] -
  3. - - - Required -
  4. - [% END %] -
  5. - - - Required -
  6. -
  7. - - -
-
-
Cancel
-
- -[% END %] - -[% IF ( add_validate ) %] -

Printer added

-
-
-
-[% END %] - -[% IF ( delete_confirm ) %] -
-

Confirm deletion of printer [% searchfield | html %]

- - - - - - - - - - - -
Printer: [% searchfield | html %]
Queue: [% printqueue | html %]
Type: [% printtype | html %]
- -
- - - -
-
- -
-
-[% END %] - -[% IF ( delete_confirmed ) %] -
-

Printer deleted

-
- -
-
- -[% END %] - -[% IF ( else ) %] - - - -

Printers

- [% IF ( searchfield ) %] - You searched for [% searchfield | html %] - [% END %] - -[% IF ( loop ) %] - - - - - - - - - - - [% FOREACH loo IN loop %] - - - - - - - [% END %] - -
NameQueueType 
[% loo.printername | html %][% loo.printqueue | html %][% loo.printtype | html %] Edit Delete
[% ELSE %]
No printers defined.
[% END %] -[% END %] - -
-
- -
- -
-
- -[% INCLUDE 'intranet-bottom.inc' %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/selectbranchprinter.tt @@ -29,8 +29,6 @@ Updated:
    [% FOREACH update IN updated %] [% IF ( update.updated_branch ) %]
  • Library: [% update.old_branch or "?" | html %] ⇒ [% update.LoginBranchcode or "?" | html %]
  • - [% ELSIF ( update.updated_printer ) %] - [% ELSE %]
  • ERROR - unknown
  • [% END %] @@ -59,19 +57,6 @@ Updated:
      [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %] [% END %] -
      --- a/t/Print.t +++ a/t/Print.t @@ -1,15 +0,0 @@ -#!/usr/bin/perl -# -# This Koha test module is a stub! -# Add more tests here!!! - -use strict; -use warnings; - -use Test::More tests => 2; - -BEGIN { - use_ok('C4::Print'); -} -ok( !NetworkPrint("")); - --