From 573ac9488f0ef086939a9909e523dfc6d5559814 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 2 Jul 2010 10:56:15 -0400 Subject: [PATCH] remove a bunch of unconditional debug warns Signed-off-by: Galen Charlton --- C4/Acquisition.pm | 3 --- C4/Items.pm | 1 - C4/Labels/Label.pm | 2 +- C4/Letters.pm | 4 ---- C4/Record.pm | 1 - C4/Ris.pm | 3 --- C4/Search.pm | 1 - C4/Z3950.pm | 1 - acqui/neworderbiblio.pl | 1 - acqui/parcel.pl | 2 -- acqui/z3950_search.pl | 1 - cataloguing/value_builder/labs_theses.pl | 3 --- cataloguing/value_builder/marc21_leader_book.pl | 1 - cataloguing/value_builder/marc21_leader_computerfile.pl | 3 --- cataloguing/value_builder/marc21_leader_video.pl | 1 - cataloguing/value_builder/stocknumberam123.pl | 1 - cataloguing/value_builder/unimarc_field_010.pl | 1 - labels/label-edit-template.pl | 1 - members/notices.pl | 1 - opac/changelanguage.pl | 1 - opac/opac-search.pl | 1 - opac/opac-userupdate.pl | 1 - reports/cat_issues_top.pl | 1 - reports/guided_reports.pl | 1 - reports/issues_avg_stats.pl | 2 -- reports/manager.pl | 1 - tools/export.pl | 1 - 27 files changed, 1 insertion(+), 40 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 4ce47fce6b..984c15a5f7 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1012,8 +1012,6 @@ sub ModOrderItem { my $query = "UPDATE aqorders_items set itemnumber=? where itemnumber=? and ordernumber=?"; my @params = ($orderiteminfo->{'newitemnumber'}, $orderiteminfo->{'itemnumber'}, $orderiteminfo->{'ordernumber'}); - warn $query; - warn Data::Dumper::Dumper(@params); my $sth = $dbh->prepare($query); $sth->execute(@params); return 0; @@ -1587,7 +1585,6 @@ sub GetHistory { } } $query .= " ORDER BY id"; - warn $query; my $sth = $dbh->prepare($query); $sth->execute( @query_params ); my $cnt = 1; diff --git a/C4/Items.pm b/C4/Items.pm index 96f60f0187..794bff70d9 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -148,7 +148,6 @@ sub GetItem { my $ssth = $dbh->prepare("SELECT serialseq,publisheddate from serialitems left join serial on serialitems.serialid=serial.serialid where serialitems.itemnumber=?"); $ssth->execute($data->{'itemnumber'}) ; ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array(); - warn $data->{'serialseq'} , $data->{'publisheddate'}; } #if we don't have an items.itype, use biblioitems.itemtype. if( ! $data->{'itype'} ) { diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm index 9fb09f368f..ef5fa1534b 100644 --- a/C4/Labels/Label.pm +++ b/C4/Labels/Label.pm @@ -286,7 +286,7 @@ sub _BIBBAR { my $barcode_y_scale_factor = 0.01 * $self->{'height'}; # this scales the barcode height to 10% of the label height my $line_spacer = ($self->{'font_size'} * 1); # number of pixels between text rows (This is actually leading: baseline to baseline minus font size. Recommended starting point is 20% of font size.). my $text_lly = ($self->{'lly'} + ($self->{'height'} - $self->{'top_text_margin'})); - warn "Label: llx $self->{'llx'}, lly $self->{'lly'}, Text: lly $text_lly, $line_spacer, Barcode: llx $barcode_llx, lly $barcode_lly, $barcode_width, $barcode_y_scale_factor\n"; + $debug and warn "Label: llx $self->{'llx'}, lly $self->{'lly'}, Text: lly $text_lly, $line_spacer, Barcode: llx $barcode_llx, lly $barcode_lly, $barcode_width, $barcode_y_scale_factor\n"; return $self->{'llx'}, $text_lly, $line_spacer, $barcode_llx, $barcode_lly, $barcode_width, $barcode_y_scale_factor; } diff --git a/C4/Letters.pm b/C4/Letters.pm index 3f634e1090..885ed5fb90 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -349,8 +349,6 @@ sub SendAlerts { 'Content-Type' => 'text/plain; charset="utf8"', ); sendmail(%mail) or carp $Mail::Sendmail::error; - warn -"sending to $mail{To} From $mail{From} subj $mail{Subject} Mess $mail{Message}"; } if ( C4::Context->preference("LetterLog") ) { logaction( @@ -439,8 +437,6 @@ sub SendAlerts { . $innerletter->{content} ) if C4::Context->preference("LetterLog"); } - warn -"sending to From $userenv->{emailaddress} subj $innerletter->{title} Mess $innerletter->{content}"; } # send an "account details" notice to a newly created user elsif ( $type eq 'members' ) { diff --git a/C4/Record.pm b/C4/Record.pm index 37fc3e11a8..3b073987fc 100644 --- a/C4/Record.pm +++ b/C4/Record.pm @@ -324,7 +324,6 @@ sub marc2csv { ($preprocess,$postprocess, $fieldprocessing) = YAML::LoadFile($configfile); } - warn $fieldprocessing; # Preprocessing eval $preprocess if ($preprocess); diff --git a/C4/Ris.pm b/C4/Ris.pm index fcb5b89a0b..11873d9305 100644 --- a/C4/Ris.pm +++ b/C4/Ris.pm @@ -278,8 +278,6 @@ sub marc2ris { ## end RIS dataset print "ER - \n"; - warn $outvar; - # Let's re-redirect stdout close STDOUT; open STDOUT, ">&", $oldout; @@ -947,7 +945,6 @@ sub charconv { } elsif ($uniout eq "t") { ## convert to utf-8 - warn "marc8_to_utf8"; return marc8_to_utf8("@_"); } else { diff --git a/C4/Search.pm b/C4/Search.pm index cb9eb716a9..8434886bc4 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1913,7 +1913,6 @@ sub NZanalyse { # depending of operand, intersect, union or exclude both lists # to get a result list if ( $operator eq ' and ' ) { - warn "NZAND"; return NZoperatorAND($leftresult,$rightresult); } elsif ( $operator eq ' or ' ) { diff --git a/C4/Z3950.pm b/C4/Z3950.pm index 3f2f987196..731df99309 100644 --- a/C4/Z3950.pm +++ b/C4/Z3950.pm @@ -232,7 +232,6 @@ sub addz3950queue { # spawn a separate 'cat' process. my $pid=`cat $pidfile`; chomp $pid; - warn "PID : $pid"; # Kill -HUP the Z39.50 daemon to tell it to process # this query. my $processcount=kill 1, $pid; diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl index a06facac55..2333f89d07 100755 --- a/acqui/neworderbiblio.pl +++ b/acqui/neworderbiblio.pl @@ -100,7 +100,6 @@ my ( $builterror, $builtquery, $simple_query, $query_cgi, $query_desc, $limit, $ my ( $error, $marcresults, $total_hits ) = SimpleSearch( $builtquery, $results_per_page * ( $page - 1 ), $results_per_page ); if (defined $error) { - warn "error: ".$error; $template->param( query_error => $error, basketno => $basketno, diff --git a/acqui/parcel.pl b/acqui/parcel.pl index 5ee97b0c72..675b07d7e3 100755 --- a/acqui/parcel.pl +++ b/acqui/parcel.pl @@ -166,8 +166,6 @@ if ($action eq "cancelorder") { } if ($error_delitem || $error_delbiblio) { - warn $error_delitem; - warn $error_delbiblio; if ($error_delitem) { $template->param(error_delitem => 1); } if ($error_delbiblio) { $template->param(error_delbiblio => 1); } } else { diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 1dc551935f..7f04754d12 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -48,7 +48,6 @@ my $error = $input->param('error'); my $biblionumber = $input->param('biblionumber'); $biblionumber = 0 unless $biblionumber; my $frameworkcode = $input->param('frameworkcode'); -warn($frameworkcode); my $title = $input->param('title'); my $author = $input->param('author'); my $isbn = $input->param('isbn'); diff --git a/cataloguing/value_builder/labs_theses.pl b/cataloguing/value_builder/labs_theses.pl index 5f327d2c9c..24ce1e189c 100755 --- a/cataloguing/value_builder/labs_theses.pl +++ b/cataloguing/value_builder/labs_theses.pl @@ -83,8 +83,6 @@ sub plugin { my $strquery = "SELECT authorised_value, lib from authorised_values where category = ? and lib like ?"; # $strquery .= " LIMIT $startfrom,$upperlimit"; - warn 'category : '.$cat_auth.' recherche :'.$search; - warn "$strquery"; $search=~s/\*/%/g; my $sth = $dbh->prepare($strquery); $sth->execute($cat_auth,$search); @@ -176,7 +174,6 @@ sub plugin { $template->param( 'index'=>''.$query->param('index') ) if ($query->param('index')); - warn 'index : '.$query->param('index'); $template->param( 'cat_auth'=>$cat_auth ) if ($cat_auth); diff --git a/cataloguing/value_builder/marc21_leader_book.pl b/cataloguing/value_builder/marc21_leader_book.pl index 010c431c99..6eb0f61ff5 100755 --- a/cataloguing/value_builder/marc21_leader_book.pl +++ b/cataloguing/value_builder/marc21_leader_book.pl @@ -82,7 +82,6 @@ my ($template, $loggedinuser, $cookie) $result = " nam 7a " unless $result; my $f5 = substr($result,5,1); my $f6 = substr($result,6,1); - warn "F6".$f6; my $f7 = substr($result,7,1); my $f8 = substr($result,8,1); my $f9 = substr($result,9,1); diff --git a/cataloguing/value_builder/marc21_leader_computerfile.pl b/cataloguing/value_builder/marc21_leader_computerfile.pl index a8ccf79045..9ce7f914e1 100755 --- a/cataloguing/value_builder/marc21_leader_computerfile.pl +++ b/cataloguing/value_builder/marc21_leader_computerfile.pl @@ -80,12 +80,9 @@ my ($template, $loggedinuser, $cookie) debug => 1, }); $result = " nmm 7a " unless $result; - warn "RESULT:".$result; my $f5 = substr($result,5,1); my $f6 = substr($result,6,1); - warn "F6".$f6; my $f7 = substr($result,7,1); - warn "F7:".$f7; my $f8 = substr($result,8,1); my $f9 = substr($result,9,1); my $f17 = substr($result,17,1); diff --git a/cataloguing/value_builder/marc21_leader_video.pl b/cataloguing/value_builder/marc21_leader_video.pl index 87921bd6bb..62e98da0b8 100755 --- a/cataloguing/value_builder/marc21_leader_video.pl +++ b/cataloguing/value_builder/marc21_leader_video.pl @@ -82,7 +82,6 @@ my ($template, $loggedinuser, $cookie) $result = " ngm 7a " unless $result; my $f5 = substr($result,5,1); my $f6 = substr($result,6,1); - warn "F6".$f6; my $f7 = substr($result,7,1); my $f8 = substr($result,8,1); my $f9 = substr($result,9,1); diff --git a/cataloguing/value_builder/stocknumberam123.pl b/cataloguing/value_builder/stocknumberam123.pl index 99f782ac4a..014fd861f3 100755 --- a/cataloguing/value_builder/stocknumberam123.pl +++ b/cataloguing/value_builder/stocknumberam123.pl @@ -111,7 +111,6 @@ sub plugin { return => $code, ); } - warn $code; output_html_with_http_headers $input, $cookie, $template->output; } diff --git a/cataloguing/value_builder/unimarc_field_010.pl b/cataloguing/value_builder/unimarc_field_010.pl index 3d97994ab5..5e319d946b 100755 --- a/cataloguing/value_builder/unimarc_field_010.pl +++ b/cataloguing/value_builder/unimarc_field_010.pl @@ -92,7 +92,6 @@ sub plugin { my $sth = $dbh->prepare('SELECT publishercode FROM biblioitems WHERE isbn LIKE ? OR isbn LIKE ? LIMIT 1'); $isbn =~ s/-//g; - warn $isbn; if (length ($isbn) == 13){ $isbn = substr($isbn, 3, length($isbn)-3); } diff --git a/labels/label-edit-template.pl b/labels/label-edit-template.pl index 51e6fb5809..a645feec81 100755 --- a/labels/label-edit-template.pl +++ b/labels/label-edit-template.pl @@ -41,7 +41,6 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); my $op = $cgi->param('op'); -warn "operation = $op\n"; my $template_id = $cgi->param('template_id') || $cgi->param('element_id'); my $label_template = undef; my $profile_list = undef; diff --git a/members/notices.pl b/members/notices.pl index fb8e91b7f1..f6680d5061 100755 --- a/members/notices.pl +++ b/members/notices.pl @@ -52,7 +52,6 @@ $template->param( picture => 1 ) if $picture; # Getting the messages my $queued_messages = C4::Letters::GetQueuedMessages({borrowernumber => $borrowernumber}); -warn Data::Dumper::Dumper( $queued_messages ); $template->param( QUEUED_MESSAGES => $queued_messages, BORROWER_INFO => [ $borrower ], diff --git a/opac/changelanguage.pl b/opac/changelanguage.pl index 16ef6d0f22..22b73e4791 100755 --- a/opac/changelanguage.pl +++ b/opac/changelanguage.pl @@ -25,5 +25,4 @@ my $query = new CGI; my $language = $query->param('language'); my $url = $query->referer(); -warn "Language : $query // $language // $url"; setlanguagecookie( $query, $language, $url ); diff --git a/opac/opac-search.pl b/opac/opac-search.pl index a142cb1f93..30bc34a6b9 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -600,7 +600,6 @@ for (my $i=0;$i<=@servers;$i++) { for my $sup_record ( @{$results_hashref->{$server}->{"RECORDS"}} ) { my $marc_record_object = MARC::Record->new_from_usmarc($sup_record); my $title_field = $marc_record_object->field(100); - warn "Authority Found: ".$marc_record_object->as_formatted(); push @inner_sup_results_array, { 'title' => $title_field->subfield('a'), 'link' => "&idx=an&q=".$marc_record_object->field('001')->as_string(), diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl index d15e740205..b38a477a4b 100755 --- a/opac/opac-userupdate.pl +++ b/opac/opac-userupdate.pl @@ -136,7 +136,6 @@ EOF if ( sendmail %mail ) { # do something if it works.... - warn "Mail sent ok\n"; print $query->redirect('/cgi-bin/koha/opac-user.pl?patronupdate=sent'); exit; } diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index d7f2e443f4..d07335e524 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -272,7 +272,6 @@ sub calculate { } $strsth2 .=" group by $colfield"; $strsth2 .=" order by $colorder"; - warn "". $strsth2; my $sth2 = $dbh->prepare( $strsth2 ); if (( @colfilter ) and ($colfilter[1])){ diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 269f7a8c9b..dbda18089c 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -234,7 +234,6 @@ elsif ( $phase eq 'Choose these criteria' ) { $query_criteria .= " AND $crit='$value'"; } } - warn $query_criteria; } $template->param( diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index 678495f72b..8285bec0d6 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -451,7 +451,6 @@ sub calculate { } $strsth2 .=" GROUP BY $colfield"; $strsth2 .=" ORDER BY $colorder"; - warn "". $strsth2; my $sth2 = $dbh->prepare( $strsth2 ); if (( @colfilter ) and ($colfilter[1])){ @@ -522,7 +521,6 @@ sub calculate { $strcalc .= " AND monthname(returndate) like '" . @$filters[6] ."'" if ( @$filters[6] ); $strcalc .= " group by $linefield, $colfield, issuedate, returndate order by $linefield, $colfield"; - warn "SQL :". $strcalc; my $dbcalc = $dbh->prepare($strcalc); $dbcalc->execute; diff --git a/reports/manager.pl b/reports/manager.pl index 4ca5595f66..177c64ac8a 100755 --- a/reports/manager.pl +++ b/reports/manager.pl @@ -47,7 +47,6 @@ unless (-r $cgidir and -d $cgidir) { $cgidir = C4::Context->intranetdir."/reports/"; } my $plugin = $cgidir.$report_name.".plugin"; -warn "PLUGIN:".$plugin; require $plugin; if ($do_it) { my $results = calculate(\@values); diff --git a/tools/export.pl b/tools/export.pl index 66d1acc626..a1e9a22800 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -123,7 +123,6 @@ if ($op eq "export") { $query .= (C4::Context->preference('item-level_itypes')) ? " AND items.itype = ? " : " AND biblioitems.itemtype = ?"; push @sql_params, $itemtype; } - warn "$query, @sql_params"; my $sth = $dbh->prepare($query); $sth->execute(@sql_params); -- 2.39.5