|
Lines 44-50
BEGIN {
Link Here
|
| 44 |
&AddToShelf |
44 |
&AddToShelf |
| 45 |
&ModShelf |
45 |
&ModShelf |
| 46 |
&ShelfPossibleAction |
46 |
&ShelfPossibleAction |
| 47 |
&DelFromShelf &DelShelf |
47 |
&DelFromShelf |
| 48 |
&GetBibliosShelves |
48 |
&GetBibliosShelves |
| 49 |
&AddShare &AcceptShare &RemoveShare &IsSharedList |
49 |
&AddShare &AcceptShare &RemoveShare &IsSharedList |
| 50 |
); |
50 |
); |
|
Lines 508-531
sub DelFromShelf {
Link Here
|
| 508 |
return $t; |
508 |
return $t; |
| 509 |
} |
509 |
} |
| 510 |
|
510 |
|
| 511 |
=head2 DelShelf |
|
|
| 512 |
|
| 513 |
$Number = DelShelf($shelfnumber); |
| 514 |
|
| 515 |
This function deletes the shelf number, and all of it's content. |
| 516 |
Authorization to do so MUST have been checked before calling, while using |
| 517 |
ShelfPossibleAction with manage parameter. |
| 518 |
|
| 519 |
=cut |
| 520 |
|
| 521 |
sub DelShelf { |
| 522 |
my ($shelfnumber)= @_; |
| 523 |
return unless $shelfnumber && $shelfnumber =~ /^\d+$/; |
| 524 |
my $dbh = C4::Context->dbh; |
| 525 |
my $sth = $dbh->prepare("DELETE FROM virtualshelves WHERE shelfnumber=?"); |
| 526 |
return $sth->execute($shelfnumber); |
| 527 |
} |
| 528 |
|
| 529 |
=head2 GetBibliosShelves |
511 |
=head2 GetBibliosShelves |
| 530 |
|
512 |
|
| 531 |
This finds all the public lists that this bib record is in. |
513 |
This finds all the public lists that this bib record is in. |
|
Lines 596-603
sub HandleDelBorrower {
Link Here
|
| 596 |
#Instead of deleting we could also disown lists (based on a pref). |
578 |
#Instead of deleting we could also disown lists (based on a pref). |
| 597 |
#In that way we could save shared and public lists. |
579 |
#In that way we could save shared and public lists. |
| 598 |
#The current table constraints support that idea now. |
580 |
#The current table constraints support that idea now. |
| 599 |
#This pref should then govern the results of other routines such as |
581 |
#This pref should then govern the results of other routines/methods such as |
| 600 |
#DelShelf too. |
582 |
#Koha::Virtualshelf->new->delete too. |
| 601 |
} |
583 |
} |
| 602 |
|
584 |
|
| 603 |
=head2 AddShare |
585 |
=head2 AddShare |