From szrj1m at yahoo.com Tue Sep 4 01:03:12 2007 From: szrj1m at yahoo.com (Mason James) Date: Mon, 03 Sep 2007 23:03:12 +0000 Subject: [Koha-cvs] koha/barcodes label-print-pdf-demco-142-1685c.pl [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Mason James 07/09/03 23:03:12 Modified files: barcodes : label-print-pdf-demco-142-1685c.pl Log message: draw_text_block_manual2 rename CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print-pdf-demco-142-1685c.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.1.2.1&r2=1.1.2.2 Patches: Index: label-print-pdf-demco-142-1685c.pl =================================================================== RCS file: /sources/koha/koha/barcodes/Attic/label-print-pdf-demco-142-1685c.pl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -b -r1.1.2.1 -r1.1.2.2 --- label-print-pdf-demco-142-1685c.pl 28 Aug 2007 23:04:24 -0000 1.1.2.1 +++ label-print-pdf-demco-142-1685c.pl 3 Sep 2007 23:03:11 -0000 1.1.2.2 @@ -12,7 +12,7 @@ use PDF::Reuse::Barcode; use POSIX; -use Smart::Comments; +#use Smart::Comments '#####'; my $htdocs_path = C4::Context->config('intrahtdocs'); my $cgi = new CGI; @@ -25,6 +25,8 @@ my $conf_data = get_label_options(); my $batch_id = $cgi->param('batch_id'); +##### $batch_id; + my @resultsloop = get_label_items($batch_id); my $barcodetype = $conf_data->{'barcodetype'}; @@ -153,14 +155,14 @@ # warn "$x_pos, $y_pos, $label_width, $label_height"; my $barcode = $item->{'barcode'}; -# drawbox( $x_pos, $y_pos, $block_width, $block_height, ) if $guidebox; + # drawbox( $x_pos, $y_pos, $block_width, $block_height, ) if $guidebox; #-- spine drawbox( $x_pos, $y_pos + ( $block_height - $spine_height ), $spine_width, $spine_height, ) if $guidebox; - draw_text_block_manual2( # spine + draw_text_block_manual( # spine $x_pos, $y_pos + ( $block_height - $spine_height ), $spine_width, $spine_height, $fontsize, '', $gutter, 'l', @spine_fields @@ -174,22 +176,22 @@ $y_pos + $label_height, $label_width, $label_height, ) if $guidebox; - draw_text_block_manual2( + draw_text_block_manual( ( $x_pos + $spine_width + $colspace ), ( $y_pos + $label_height ), $label_width, $label_height, $fontsize, '', $gutter, 'r', @circ_barcode ); - draw_text_block_manual2( + draw_text_block_manual( ( $x_pos + $spine_width + $colspace ), ( $y_pos + $label_height ), $label_width, $label_height, $fontsize, '', $gutter,, '', @circ_fields ); - draw_text_block_manual2( + draw_text_block_manual( ( $x_pos + $spine_width + $colspace + $spine_width ), ( $y_pos + $label_height ), - ($label_width - $spine_width), + ( $label_width - $spine_width ), $label_height, $fontsize, 2, @@ -204,18 +206,21 @@ drawbox( ( $x_pos + $spine_width + $colspace ), $y_pos, $label_width, $label_height, ) if $guidebox; - draw_text_block_manual2( ( $x_pos + $spine_width + $colspace ), + draw_text_block_manual( ( $x_pos + $spine_width + $colspace ), $y_pos, $label_width, $label_height, $fontsize, '', $gutter, 'r', @circ_barcode ); - draw_text_block_manual2( ( $x_pos + $spine_width + $colspace ), + draw_text_block_manual( ( $x_pos + $spine_width + $colspace ), $y_pos, $label_width, $label_height, $fontsize, '', $gutter,, '', @circ_fields ); - draw_text_block_manual2( - ( $x_pos + $spine_width + $colspace + $spine_width ), - $y_pos, ($label_width - $spine_width), $label_height, $fontsize, 2, $gutter, 'l', - @circ2_fields ); + draw_text_block_manual( + ( $x_pos + $spine_width + $colspace + $spine_width ), $y_pos, + ( $label_width - $spine_width ), $label_height, + $fontsize, 2, + $gutter, 'l', + @circ2_fields + ); #-- bottom barc From szrj1m at yahoo.com Tue Sep 4 01:07:07 2007 From: szrj1m at yahoo.com (Mason James) Date: Mon, 03 Sep 2007 23:07:07 +0000 Subject: [Koha-cvs] koha/C4 Labels.pm [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Mason James 07/09/03 23:07:07 Modified files: C4 : Labels.pm Log message: draw_text_block_manual2() rename, and tidyup after dev. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/C4/Labels.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.3.4.45&r2=1.3.4.46 Patches: Index: Labels.pm =================================================================== RCS file: /sources/koha/koha/C4/Labels.pm,v retrieving revision 1.3.4.45 retrieving revision 1.3.4.46 diff -u -b -r1.3.4.45 -r1.3.4.46 --- Labels.pm 28 Aug 2007 12:06:58 -0000 1.3.4.45 +++ Labels.pm 3 Sep 2007 23:07:07 -0000 1.3.4.46 @@ -27,7 +27,7 @@ use Algorithm::CheckDigits; # use Data::Dumper; -use Smart::Comments '####'; +# use Smart::Comments '####'; $VERSION = 0.01; @@ -54,8 +54,7 @@ &GetSingleLabelTemplate &SaveTemplate &CreateTemplate &SetActiveTemplate &SaveConf &DrawSpineText - &DrawSpineTextManual draw_text_block_manual - draw_text_block_manual2 + draw_text_block_manual &GetTextWrapCols &GetUnitsValue &DrawBarcode @@ -703,81 +702,13 @@ sub draw_text_block_manual { my ( - $x_pos, $y_pos, $label_height, - $fontsize, $gutter, $text_wrap_cols, - @fields, $no_wrap, $justify + $x_pos, $y_pos, $label_width, + $label_height, $fontsize, $startrow, + $gutter, $justify, @fields, ) = @_; - # hack to fix column name mismatch betwen labels_conf.class, - # and bibitems.classification - - $Text::Wrap::columns = $text_wrap_cols; - $Text::Wrap::separator = "\n"; - - my $str; - - # $item - - my $top_text_margin = ( $fontsize + $gutter ); - my $line_spacer = ($fontsize); # number of pixels between text rows. - - # add your printable fields manually in here - #### @fields - - my $vPos = ( $y_pos + ( $label_height - $top_text_margin ) ); - my $hPos = ( $x_pos + $gutter ); - - # warn Dumper $conf_data; - #warn Dumper $item; - - foreach my $field (@fields) { - - # if the display option for this field is selected in the DB, - # and the item record has some values for this field, display it. - - - # get the string - $str = $field; -#### $str - - # strip out naughty existing nl/cr's - $str =~ s/\n//g; - $str =~ s/\r//g; - - # chop the string up into _upto_ 12 chunks - # and seperate the chunks with newlines - - $str = wrap( "", "", "$str" ); - $str = wrap( "", "", "$str" ); - - # split the chunks between newline's, into an array - my @strings = split /\n/, $str; - - # then loop for each string line - foreach my $str (@strings) { - -warn "HPOS , VPOS $hPos, $vPos "; - # set the font size A - - # prText( $hPos, $vPos, $str ); - PrintText( $hPos, $vPos, $fontsize, $str ); - $vPos = $vPos - $line_spacer; - } - } -} - -sub draw_text_block_manual2 { - - my ( - $x_pos, $y_pos, $label_width, $label_height, - $fontsize, $startrow, $gutter, $justify, @fields, - ) = @_; - - -#### @fields -my $text_wrap_cols = GetTextWrapCols( $fontsize, $label_width ); - + my $text_wrap_cols = GetTextWrapCols( $fontsize, $label_width ); # hack to fix column name mismatch betwen labels_conf.class, # and bibitems.classification @@ -798,8 +729,7 @@ #warn Dumper $item; my $vPos = ( $y_pos + ( $label_height - $top_text_margin ) ); -$vPos = $vPos - ($line_spacer * --$startrow) if $startrow > 0; - + $vPos = $vPos - ( $line_spacer * --$startrow ) if $startrow > 0; my $hPos = ( $x_pos + $gutter ); @@ -810,7 +740,6 @@ # if the display option for this field is selected in the DB, # and the item record has some values for this field, display it. - # get the string $str = $field; #### $str @@ -828,19 +757,18 @@ # split the chunks between newline's, into an array my @strings = split /\n/, $str; - # then loop for each string line foreach my $str (@strings) { if ( $justify eq 'r' ) { my $strwidth = prStrWidth( $str, 'C', $fontsize ); #### $strwidth - $hPos = $x_pos + $label_width - ( $gutter + $strwidth); - + $hPos = $x_pos + $label_width - ( $gutter + $strwidth ); } warn "HPOS , VPOS $hPos, $vPos\n"; + # set the font size A # prText( $hPos, $vPos, $str ); @@ -851,8 +779,7 @@ } } -=c - sub DrawSpineText { +sub DrawSpineText { my ( $x_pos, $y_pos, $label_height, @@ -930,8 +857,7 @@ } } # if field is } #foreach feild } - } -=cut +} sub PrintText { my ( $hPos, $vPos, $fontsize, $text ) = @_; From szrj1m at yahoo.com Sun Sep 16 14:37:29 2007 From: szrj1m at yahoo.com (Mason James) Date: Sun, 16 Sep 2007 12:37:29 +0000 Subject: [Koha-cvs] koha/barcodes label-print-pdf-zebra-2844.pl [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Mason James 07/09/16 12:37:29 Added files: barcodes : label-print-pdf-zebra-2844.pl Log message: 1st add for zeb 2844 CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/label-print-pdf-zebra-2844.pl?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1 Patches: Index: label-print-pdf-zebra-2844.pl =================================================================== RCS file: label-print-pdf-zebra-2844.pl diff -N label-print-pdf-zebra-2844.pl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ label-print-pdf-zebra-2844.pl 16 Sep 2007 12:37:29 -0000 1.1.2.1 @@ -0,0 +1,265 @@ +#!/usr/bin/perl + +use strict; +use CGI; +use C4::Labels; +use C4::Auth; +use C4::Output; +use C4::Interface::CGI::Output; +use C4::Context; +use HTML::Template; +use PDF::Reuse; +use PDF::Reuse::Barcode; +use POSIX; + +#use Smart::Comments '#####'; + +my $htdocs_path = C4::Context->config('intrahtdocs'); +my $cgi = new CGI; +print $cgi->header( -type => 'application/pdf', -attachment => 'barcode.pdf' ); + +my $spine_text = ""; + +# get the printing settings +my $template = GetActiveLabelTemplate(); +my $conf_data = get_label_options(); + +my $batch_id = $cgi->param('batch_id'); +##### $batch_id; + +my @resultsloop = get_label_items($batch_id); + +my $barcodetype = $conf_data->{'barcodetype'}; +my $printingtype = $conf_data->{'printingtype'}; +my $guidebox = $conf_data->{'guidebox'}; +my $start_label = $conf_data->{'startlabel'}; + +my $fontsize = $template->{'fontsize'}; +my $units = $template->{'units'}; + +my $unitvalue = GetUnitsValue($units); + +my $tmpl_code = $template->{'tmpl_code'}; +my $tmpl_desc = $template->{'tmpl_desc'}; + +my $page_height = 792; +my $page_width = 612; + +my $block_height = 144; +my $block_width = 272; + +my $label_height = 72; +my $label_width = 196; + +my $spine_width = 65; +my $spine_height = 108; + +my $top_margin = 41; +my $left_margin = 27; +my $colspace = 12; +my $rowspace = 0; + +my $block_cols = 2; +my $block_rows = 5; + +#warn $label_cols, $label_rows; + +# set the paper size +my $lowerLeftX = 0; +my $lowerLeftY = 0; +my $upperRightX = $page_width; +my $upperRightY = $page_height; + +prInitVars(); +$| = 1; +prFile(); + +prMbox( $lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY ); + +# later feature, change the font-type and size? +prFont('C'); # Just setting a font +prFontSize($fontsize); + +my $margin = $top_margin; +my $left_text_margin = 3; +my $str; + +my $item; +my ( $i, $i2 ); # loop counters + +# big row loop + +#warn " $lowerLeftX, $lowerLeftY, $upperRightX, $upperRightY"; +#warn "$label_rows, $label_cols\n"; +#warn "$label_height, $label_width\n"; +#warn "$page_height, $page_width\n"; + +my ( $rowcount, $colcount, $x_pos, $y_pos, $rowtemp, $coltemp ); + +$start_label = 1; ## debug................................... + +if ( $start_label eq 1 ) { + $rowcount = 1; + $colcount = 1; + $x_pos = $left_margin; + $y_pos = ( $page_height - $top_margin - $block_height ); +} + +else { + + #eval { + $rowcount = ceil( $start_label / $block_cols ); + + #} ; + #$rowcount = 1 if $@; + + $colcount = ( $start_label - ( ( $rowcount - 1 ) * $block_cols ) ); + + $x_pos = $left_margin + ( $label_width * ( $colcount - 1 ) ) + + ( $colspace * ( $colcount - 1 ) ); + + $y_pos = $page_height - $top_margin - ( $block_height * $rowcount ) - + ( $rowspace * ( $rowcount - 1 ) ); + +} + +# +# main foreach loop +# + +# $barcodetype = "CODE39MOD10"; + +my $gutter = 2; + +foreach $item (@resultsloop) { + my $barcode = $item->{'barcode'}; + $item->{'callnumber'} = 'BT 380.2 W54'; + my @callnumber = split( / /, $item->{'callnumber'} ); + + my @spine_fields = ( + $item->{'ccode'}, $callnumber[0], $callnumber[1], $callnumber[2], + $item->{'copyrightdate'} + ); + + my @circ_fields = ( + $item->{'ccode'}, $callnumber[0], $callnumber[1], $callnumber[2], + $item->{'copyrightdate'} + ); + + my @circ2_fields = ( $item->{'author'}, $item->{'title'} ); + + my @circ_barcode = ( $item->{'barcode'} ); + + my $fontsize = 10; + + # warn "$x_pos, $y_pos, $label_width, $label_height"; + my $barcode = $item->{'barcode'}; + + # drawbox( $x_pos, $y_pos, $block_width, $block_height, ) if $guidebox; + + #-- spine + drawbox( $x_pos, $y_pos + ( $block_height - $spine_height ), + $spine_width, $spine_height, ) + if $guidebox; + + draw_text_block_manual( # spine + $x_pos, $y_pos + ( $block_height - $spine_height ), $spine_width, + $spine_height, $fontsize, '', $gutter, 'l', + @spine_fields + ); + + #-- spine + + #-- top barc + drawbox( + ( $x_pos + $spine_width + $colspace ), + $y_pos + $label_height, + $label_width, $label_height, + ) if $guidebox; + draw_text_block_manual( + ( $x_pos + $spine_width + $colspace ), + ( $y_pos + $label_height ), + $label_width, $label_height, $fontsize, '', $gutter, 'r', @circ_barcode + ); + + draw_text_block_manual( + ( $x_pos + $spine_width + $colspace ), + ( $y_pos + $label_height ), + $label_width, $label_height, $fontsize, '', $gutter,, '', @circ_fields + ); + + draw_text_block_manual( + ( $x_pos + $spine_width + $colspace + $spine_width ), + ( $y_pos + $label_height ), + ( $label_width - $spine_width ), + $label_height, + $fontsize, + 2, + $gutter, + 'l', + @circ2_fields + ); + + #-- top barc + + #-- bottom barc + drawbox( ( $x_pos + $spine_width + $colspace ), + $y_pos, $label_width, $label_height, ) + if $guidebox; + draw_text_block_manual( ( $x_pos + $spine_width + $colspace ), + $y_pos, $label_width, $label_height, $fontsize, '', $gutter, 'r', + @circ_barcode ); + + draw_text_block_manual( ( $x_pos + $spine_width + $colspace ), + $y_pos, $label_width, $label_height, $fontsize, '', $gutter,, '', + @circ_fields ); + + draw_text_block_manual( + ( $x_pos + $spine_width + $colspace + $spine_width ), $y_pos, + ( $label_width - $spine_width ), $label_height, + $fontsize, 2, + $gutter, 'l', + @circ2_fields + ); + + #-- bottom barc + + #calc_next_block_position(); + CalcNextLabelPos(); + + # last; +} # end for item loop +prEnd(); + +# +# +# +# +# +sub CalcNextLabelPos { + if ( $colcount lt $block_cols ) { + + # warn "new col"; + $x_pos = ( $x_pos + $block_width + $colspace ); + $colcount++; + } + + else { + $x_pos = $left_margin; + if ( $rowcount eq $block_rows ) { + + # warn "new page"; + prPage(); + $y_pos = ( $page_height - $top_margin - $block_height ); + $rowcount = 1; + } + else { + + # warn "new row"; + $y_pos = ( $y_pos - $rowspace - $block_height ); + $rowcount++; + } + $colcount = 1; + } +} + From cmurdock at ccfls.org Thu Sep 20 22:14:06 2007 From: cmurdock at ccfls.org (Cindy Murdock) Date: Thu, 20 Sep 2007 20:14:06 +0000 Subject: [Koha-cvs] koha/C4 Biblio.pm [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Cindy Murdock 07/09/20 20:14:06 Modified files: C4 : Biblio.pm Log message: The koha_modify_item sub wasn't saving changes to price or replacementprice. Fixed. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/C4/Biblio.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.115.2.51.2.43&r2=1.115.2.51.2.44 Patches: Index: Biblio.pm =================================================================== RCS file: /sources/koha/koha/C4/Biblio.pm,v retrieving revision 1.115.2.51.2.43 retrieving revision 1.115.2.51.2.44 diff -u -b -r1.115.2.51.2.43 -r1.115.2.51.2.44 --- Biblio.pm 1 Jan 2007 03:23:36 -0000 1.115.2.51.2.43 +++ Biblio.pm 20 Sep 2007 20:14:05 -0000 1.115.2.51.2.44 @@ -2101,27 +2101,27 @@ my ($cutterextra)=itemcalculator($dbh,$item->{'bibitemnum'},$item->{'itemcallnumber'}); my $query = "UPDATE items SET -barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?,holdingbranch=?,homebranch=?,cutterextra=?, onloan=?, binding=?"; +barcode=?,itemnotes=?,itemcallnumber=?,notforloan=?,location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?,holdingbranch=?,homebranch=?,cutterextra=?, onloan=?, binding=?,price=?,replacementprice=?"; my @bind = ( $item->{'barcode'}, $item->{'notes'}, $item->{'itemcallnumber'}, $item->{'notforloan'}, - $item->{'location'}, $item->{multivolumepart}, - $item->{multivolume}, $item->{stack}, - $item->{wthdrawn},$item->{holdingbranch},$item->{homebranch},$cutterextra,$item->{onloan},$item->{binding} + $item->{'location'}, $item->{'multivolumepart'}, + $item->{'multivolume'}, $item->{'stack'}, + $item->{'wthdrawn'},$item->{'holdingbranch'},$item->{'homebranch'},$cutterextra,$item->{'onloan'},$item->{'binding'},$item->{'price'},$item{'replacementprice'} ); if ( $item->{'lost'} ne '' ) { $query = "update items set biblioitemnumber=?,barcode=?,itemnotes=?,homebranch=?, itemlost=?,wthdrawn=?,itemcallnumber=?,notforloan=?, - location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?,holdingbranch=?,cutterextra=?,onloan=?, binding=?"; + location=?,multivolumepart=?,multivolume=?,stack=?,wthdrawn=?,holdingbranch=?,cutterextra=?,onloan=?, binding=?,price=?,replacementprice=?"; @bind = ( $item->{'bibitemnum'}, $item->{'barcode'}, $item->{'notes'}, $item->{'homebranch'}, $item->{'lost'}, $item->{'wthdrawn'}, $item->{'itemcallnumber'}, $item->{'notforloan'}, - $item->{'location'}, $item->{multivolumepart}, - $item->{multivolume}, $item->{stack}, - $item->{wthdrawn},$item->{holdingbranch},$cutterextra,$item->{onloan},$item->{binding} + $item->{'location'}, $item->{'multivolumepart'}, + $item->{'multivolume'}, $item->{'stack'}, + $item->{'wthdrawn'},$item->{'holdingbranch'},$cutterextra,$item->{'onloan'},$item->{'binding'},$item->{'price'},$item->{'replacementprice'} ); if ($item->{homebranch}) { $query.=",homebranch=?"; @@ -3158,8 +3158,11 @@ =cut -# $Id: Biblio.pm,v 1.115.2.51.2.43 2007/01/01 03:23:36 rych Exp $ +# $Id: Biblio.pm,v 1.115.2.51.2.44 2007/09/20 20:14:05 clm Exp $ # $Log: Biblio.pm,v $ +# Revision 1.115.2.51.2.44 2007/09/20 20:14:05 clm +# The koha_modify_item sub wasn't saving changes to price or replacementprice. Fixed. +# # Revision 1.115.2.51.2.43 2007/01/01 03:23:36 rych # passing $record object between newbiblio and newbiblioitem, etc, so we can add a minimal marc record in acquisitions, and then add multiple associated items. # From szrj1m at yahoo.com Fri Sep 21 06:47:47 2007 From: szrj1m at yahoo.com (Mason James) Date: Fri, 21 Sep 2007 04:47:47 +0000 Subject: [Koha-cvs] koha/C4 Output.pm [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Mason James 07/09/21 04:47:47 Modified files: C4 : Output.pm Log message: Koha Day - CGI::Carp execption handling wih 3 levels of info, set by DebugLevel syspref. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/C4/Output.pm?cvsroot=koha&only_with_tag=dev_week&r1=1.51.2.2.2.1&r2=1.51.2.2.2.2 Patches: Index: Output.pm =================================================================== RCS file: /sources/koha/koha/C4/Output.pm,v retrieving revision 1.51.2.2.2.1 retrieving revision 1.51.2.2.2.2 diff -u -b -r1.51.2.2.2.1 -r1.51.2.2.2.2 --- Output.pm 3 Aug 2006 05:25:41 -0000 1.51.2.2.2.1 +++ Output.pm 21 Sep 2007 04:47:46 -0000 1.51.2.2.2.2 @@ -1,6 +1,6 @@ package C4::Output; -# $Id: Output.pm,v 1.51.2.2.2.1 2006/08/03 05:25:41 kados Exp $ +# $Id: Output.pm,v 1.51.2.2.2.2 2007/09/21 04:47:46 sushi Exp $ #package to deal with marking up output #You will need to edit parts of this pm @@ -28,7 +28,40 @@ # templates. use strict; + require Exporter; +use CGI::Carp qw(fatalsToBrowser set_message); +BEGIN { + sub handle_errors { + my $msg = shift; + my $debug_level = C4::Context->preference("DebugLevel"); + + if ($debug_level eq "2"){ + # debug 2 , print extra info too. + my %versions = get_versions(); + +# a little example table with various version info"; + print " +

debug level $debug_level

+

Got an error: $msg

+ + + + + + +
Apache $versions{apacheVersion}
Koha $versions{kohaVersion}
MySQL $versions{mysqlVersion}
OS $versions{osVersion}
Perl $versions{perlVersion}
"; + + } elsif ($debug_level eq "1"){ + print "

debug level $debug_level

"; + print "

Got an error: $msg

"; + } else { + print "production mode - trapped fatal"; + } + } + set_message(\&handle_errors); +} + use C4::Context; use C4::Database; @@ -51,9 +84,25 @@ @ISA = qw(Exporter); @EXPORT = qw( - &themelanguage &gettemplate setlanguagecookie + &themelanguage &gettemplate setlanguagecookie get_versions ); + +# A little example sub to show more debugging info for CGI::Carp +sub get_versions { + my %versions; + $versions{kohaVersion} = C4::Context->config("kohaversion"); + $versions{osVersion} = `uname -a`; + $versions{perlVersion} = $]; + $versions{mysqlVersion} = `mysql -V`; + $versions{apacheVersion} = `httpd -v`; + $versions{apacheVersion} = `httpd2 -v` unless $versions{apacheVersion} ; + $versions{apacheVersion} = `apache2 -v` unless $versions{apacheVersion} ; + $versions{apacheVersion} = `/usr/sbin/apache2 -v` unless $versions{apacheVersion} ; + return %versions; +} + + #FIXME: this is a quick fix to stop rc1 installing broken #Still trying to figure out the correct fix. my $path = C4::Context->config('intrahtdocs')."/default/en/includes/"; From szrj1m at yahoo.com Fri Sep 21 06:51:40 2007 From: szrj1m at yahoo.com (Mason James) Date: Fri, 21 Sep 2007 04:51:40 +0000 Subject: [Koha-cvs] koha/misc carp_test.pl [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Mason James 07/09/21 04:51:40 Added files: misc : carp_test.pl Log message: a small example script for testing CGI::Carp handling. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/misc/carp_test.pl?cvsroot=koha&only_with_tag=dev_week&rev=1.1.2.1 Patches: Index: carp_test.pl =================================================================== RCS file: carp_test.pl diff -N carp_test.pl --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ carp_test.pl 21 Sep 2007 04:51:39 -0000 1.1.2.1 @@ -0,0 +1,4 @@ +#!/usr/bin/perl +use C4::Output; + +die "Oops, something bad has happened"; From kyle.m.hall at gmail.com Fri Sep 21 16:52:02 2007 From: kyle.m.hall at gmail.com (Kyle Hall) Date: Fri, 21 Sep 2007 14:52:02 +0000 Subject: [Koha-cvs] koha/members memberentry.pl [dev_week] Message-ID: CVSROOT: /sources/koha Module name: koha Branch: dev_week Changes by: Kyle Hall 07/09/21 14:52:02 Modified files: members : memberentry.pl Log message: A check for the var $modify was looking for 'edit', it should have been looking for 'Edit'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/koha/members/memberentry.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.5.2.13.2.4&r2=1.5.2.13.2.5 Patches: Index: memberentry.pl =================================================================== RCS file: /sources/koha/koha/members/memberentry.pl,v retrieving revision 1.5.2.13.2.4 retrieving revision 1.5.2.13.2.5 diff -u -b -r1.5.2.13.2.4 -r1.5.2.13.2.5 --- memberentry.pl 12 Jun 2007 16:49:40 -0000 1.5.2.13.2.4 +++ memberentry.pl 21 Sep 2007 14:52:01 -0000 1.5.2.13.2.5 @@ -2,7 +2,7 @@ # NOTE: This file uses standard 8-space tabs # DO NOT SET TAB SIZE TO 4 -# $Id: memberentry.pl,v 1.5.2.13.2.4 2007/06/12 16:49:40 kylemhall Exp $ +# $Id: memberentry.pl,v 1.5.2.13.2.5 2007/09/21 14:52:01 kylemhall Exp $ #script to set up screen for modification of borrower details #written 20/12/99 by chris at katipo.co.nz @@ -289,7 +289,7 @@ } my $CGIbranch; - if ( $modify eq 'edit' ) { + if ( $modify eq 'Edit' ) { $CGIbranch=CGI::scrolling_list( -name => 'branchcode', -id => 'branchcode', -class => 'focus',