X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=C4%2FBranch.pm;h=21530287fbecf355db417e2c9690b1fd9fd8d181;hb=5531904dccd9d8a0c4c6eb68278213f011cdbf3c;hp=817aa385f27279395e47ad6b6362c7e14b0dc02d;hpb=0d991c6abecc87105eddcf57db56f5e118b426dc;p=koha.git diff --git a/C4/Branch.pm b/C4/Branch.pm index 817aa385f2..21530287fb 100644 --- a/C4/Branch.pm +++ b/C4/Branch.pm @@ -20,7 +20,6 @@ use strict; #use warnings; FIXME - Bug 2505 require Exporter; use C4::Context; -use C4::Koha; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -205,8 +204,8 @@ sub ModBranch { (branchcode,branchname,branchaddress1, branchaddress2,branchaddress3,branchzip,branchcity,branchstate, branchcountry,branchphone,branchfax,branchemail, - branchurl,branchip,branchprinter,branchnotes) - VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) + branchurl,branchip,branchprinter,branchnotes,opac_info) + VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) "; my $sth = $dbh->prepare($query); $sth->execute( @@ -218,7 +217,7 @@ sub ModBranch { $data->{'branchphone'}, $data->{'branchfax'}, $data->{'branchemail'}, $data->{'branchurl'}, $data->{'branchip'}, $data->{'branchprinter'}, - $data->{'branchnotes'}, + $data->{'branchnotes'}, $data->{opac_info}, ); return 1 if $dbh->err; } else { @@ -228,7 +227,7 @@ sub ModBranch { branchaddress2=?,branchaddress3=?,branchzip=?, branchcity=?,branchstate=?,branchcountry=?,branchphone=?, branchfax=?,branchemail=?,branchurl=?,branchip=?, - branchprinter=?,branchnotes=? + branchprinter=?,branchnotes=?,opac_info=? WHERE branchcode=? "; my $sth = $dbh->prepare($query); @@ -241,7 +240,7 @@ sub ModBranch { $data->{'branchphone'}, $data->{'branchfax'}, $data->{'branchemail'}, $data->{'branchurl'}, $data->{'branchip'}, $data->{'branchprinter'}, - $data->{'branchnotes'}, + $data->{'branchnotes'}, $data->{opac_info}, $data->{'branchcode'}, ); } @@ -408,34 +407,6 @@ sub GetBranchDetail { return $sth->fetchrow_hashref(); } -=head2 get_branchinfos_of - - my $branchinfos_of = get_branchinfos_of(@branchcodes); - -Associates a list of branchcodes to the information of the branch, taken in -branches table. - -Returns a href where keys are branchcodes and values are href where keys are -branch information key. - - print 'branchname is ', $branchinfos_of->{$code}->{branchname}; - -=cut - -sub get_branchinfos_of { - my @branchcodes = @_; - - my $query = ' - SELECT branchcode, - branchname - FROM branches - WHERE branchcode IN (' - . join( ',', map( { "'" . $_ . "'" } @branchcodes ) ) . ') -'; - return C4::Koha::get_infos_of( $query, 'branchcode' ); -} - - =head2 GetBranchesInCategory my $branches = GetBranchesInCategory($categorycode);