Lines 221-227
Returns the above-mentioned fields for passed virtual shelf number.
Link Here
|
221 |
|
221 |
|
222 |
=cut |
222 |
=cut |
223 |
|
223 |
|
224 |
sub GetShelf ($) { |
224 |
sub GetShelf { |
225 |
my ($shelfnumber) = @_; |
225 |
my ($shelfnumber) = @_; |
226 |
my $query = qq( |
226 |
my $query = qq( |
227 |
SELECT shelfnumber, shelfname, owner, category, sortfield, |
227 |
SELECT shelfnumber, shelfname, owner, category, sortfield, |
Lines 252-258
from C4::Circulation.
Link Here
|
252 |
|
252 |
|
253 |
=cut |
253 |
=cut |
254 |
|
254 |
|
255 |
sub GetShelfContents ($;$$$) { |
255 |
sub GetShelfContents { |
256 |
my ($shelfnumber, $row_count, $offset, $sortfield) = @_; |
256 |
my ($shelfnumber, $row_count, $offset, $sortfield) = @_; |
257 |
my $dbh=C4::Context->dbh(); |
257 |
my $dbh=C4::Context->dbh(); |
258 |
my $sth1 = $dbh->prepare("SELECT count(*) FROM virtualshelfcontents WHERE shelfnumber = ?"); |
258 |
my $sth1 = $dbh->prepare("SELECT count(*) FROM virtualshelfcontents WHERE shelfnumber = ?"); |
Lines 351-357
sub AddToShelf {
Link Here
|
351 |
my $sth = $dbh->prepare($query); |
351 |
my $sth = $dbh->prepare($query); |
352 |
|
352 |
|
353 |
$sth->execute( $shelfnumber, $biblionumber ); |
353 |
$sth->execute( $shelfnumber, $biblionumber ); |
354 |
($sth->rows) and return undef; # already on shelf |
354 |
($sth->rows) and return; # already on shelf |
355 |
$query = qq( |
355 |
$query = qq( |
356 |
INSERT INTO virtualshelfcontents |
356 |
INSERT INTO virtualshelfcontents |
357 |
(shelfnumber, biblionumber, flags, borrowernumber) |
357 |
(shelfnumber, biblionumber, flags, borrowernumber) |
Lines 658-672
sub _biblionumber_sth { #only used in obsolete sub below
Link Here
|
658 |
$sth; |
658 |
$sth; |
659 |
} |
659 |
} |
660 |
|
660 |
|
661 |
sub each_biblionumbers (&$) { #OBSOLETE |
|
|
662 |
my ($code,$shelf) = @_; |
663 |
my $ref = _biblionumber_sth($shelf)->fetchall_arrayref; |
664 |
map { |
665 |
$_=$$_[0]; |
666 |
$code->(); |
667 |
} @$ref; |
668 |
} |
669 |
|
670 |
sub _CheckShelfName { |
661 |
sub _CheckShelfName { |
671 |
my ($name, $cat, $owner, $number)= @_; |
662 |
my ($name, $cat, $owner, $number)= @_; |
672 |
|
663 |
|
673 |
- |
|
|