[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 BookShelves.pm,1.13,1.14
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 BookShelves.pm,1.13,1.14 |
Date: |
Wed, 15 Dec 2004 09:28:57 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13519/C4
Modified Files:
BookShelves.pm
Log Message:
adding bookshelf features :
* create bookshelf on the fly
* modify a bookshelf (this being not finished, will commit the rest soon)
Index: BookShelves.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/BookShelves.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** BookShelves.pm 11 Mar 2004 16:06:20 -0000 1.13
--- BookShelves.pm 15 Dec 2004 17:28:23 -0000 1.14
***************
*** 54,58 ****
@ISA = qw(Exporter);
! @EXPORT = qw(&GetShelfList &GetShelfContents &AddToShelf &AddToShelfFromBiblio
&RemoveFromShelf &AddShelf &RemoveShelf
&ShelfPossibleAction);
--- 54,59 ----
@ISA = qw(Exporter);
! @EXPORT = qw(&GetShelfList &GetShelfContents &GetShelf
! &AddToShelf &AddToShelfFromBiblio
&RemoveFromShelf &AddShelf &RemoveShelf
&ShelfPossibleAction);
***************
*** 135,138 ****
--- 136,145 ----
}
+ sub GetShelf {
+ my ($shelfnumber) = @_;
+ my $sth=$dbh->prepare("select shelfnumber,shelfname,owner,category from
bookshelf where shelfnumber=?");
+ $sth->execute($shelfnumber);
+ return $sth->fetchrow;
+ }
=item GetShelfContents
***************
*** 240,248 ****
$sth->execute($shelfname);
if ($sth->rows) {
! return(1, "Shelf \"$shelfname\" already exists");
} else {
! $sth=$dbh->prepare("insert into bookshelf (shelfname,owner,category)
values (?,?,?)");
! $sth->execute($shelfname,$owner,$category);
! return (0, "Done");
}
}
--- 247,256 ----
$sth->execute($shelfname);
if ($sth->rows) {
! return(1, "Shelf \"$shelfname\" already exists");
} else {
! $sth=$dbh->prepare("insert into bookshelf
(shelfname,owner,category) values (?,?,?)");
! $sth->execute($shelfname,$owner,$category);
! my $shelfnumber = $dbh->{'mysql_insertid'};
! return (0, "Done",$shelfnumber);
}
}
***************
*** 283,286 ****
--- 291,299 ----
#
# $Log$
+ # Revision 1.14 2004/12/15 17:28:23 tipaul
+ # adding bookshelf features :
+ # * create bookshelf on the fly
+ # * modify a bookshelf (this being not finished, will commit the rest soon)
+ #
# Revision 1.13 2004/03/11 16:06:20 tipaul
# *** empty log message ***
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 BookShelves.pm,1.13,1.14,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/bookshelves addbookbybiblionumber.pl,1.2,1.3 shelves.pl,1.3,1.4
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/members memberentry.tmpl,1.32,1.33
- Previous by thread:
[Koha-cvs] CVS: koha/bookshelves addbookbybiblionumber.pl,1.2,1.3 shelves.pl,1.3,1.4
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/members memberentry.tmpl,1.32,1.33
- Index(es):