/[webpac2]/trunk/lib/WebPAC/Input/Koha.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/WebPAC/Input/Koha.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1364 by dpavlin, Tue Feb 2 19:30:48 2010 UTC revision 1365 by dpavlin, Wed May 4 13:44:07 2011 UTC
# Line 15  WebPAC::Input::Koha - read MARC records Line 15  WebPAC::Input::Koha - read MARC records
15    
16  =cut  =cut
17    
18  our $VERSION = '0.02';  our $VERSION = '0.03';
19    
20  =head1 FUNCTIONS  =head1 FUNCTIONS
21    
22  =head2 new  =head2 new
23    
24    my $input = new WebPAC::Input::Koha(    my $input = new WebPAC::Input::Koha(
25          dsn    => 'dbi:mysql:database=koha',          dsn    => $ENV{KOHA_DSN}, # 'dbi:mysql:database=koha;host=koha.example.com',
26          user   => $ENV{KOHA_USER},          user   => $ENV{KOHA_USER},
27          passwd => $ENV{KOHA_PASSWD},          passwd => $ENV{KOHA_PASSWD},
28    }    }
# Line 44  sub new { Line 44  sub new {
44                  $self->{_koha_size} = 0;                  $self->{_koha_size} = 0;
45          } else {          } else {
46    
47                  $arg->{dsn}    ||= 'dbi:mysql:database=koha';                  $arg->{dsn}    ||= $ENV{KOHA_DSN};
48                  $arg->{user}   ||= $ENV{KOHA_USER};                  $arg->{user}   ||= $ENV{KOHA_USER};
49                  $arg->{passwd} ||= $ENV{KOHA_PASSWD},                  $arg->{passwd} ||= $ENV{KOHA_PASSWD};
50                  $arg->{sql}    ||= 'select biblionumber, marc from biblioitems order by biblionumber asc';                  $arg->{sql}    ||= 'select biblionumber, marc from biblioitems order by biblionumber asc';
51                  $arg->{sql}    .= ' limit ' . $arg->{limit} if $arg->{limit};                  $arg->{sql}    .= ' limit ' . $arg->{limit} if $arg->{limit};
52                  $arg->{sql}    .= ' offset ' . $arg->{offset} if $arg->{offset};                  $arg->{sql}    .= ' offset ' . $arg->{offset} if $arg->{offset};

Legend:
Removed from v.1364  
changed lines
  Added in v.1365

  ViewVC Help
Powered by ViewVC 1.1.26