[Koha-bugs] [Bug 14544] Move the list related code to Koha::Virtualshelves
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 26 10:15:49 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14544
--- Comment #81 from Fridolin SOMERS <fridolin.somers at biblibre.com> ---
New day, new bug :D
The creation of a new list after selecting some records fails :
It is because after creating Koha::Virtualshelf->new, one must call store() so
that it impacts database, used by AddBibliosToShelf().
diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl
index 10420fe..9181efd 100755
--- a/opac/opac-addbybiblionumber.pl
+++ b/opac/opac-addbybiblionumber.pl
@@ -106,7 +106,8 @@ sub HandleNewVirtualShelf {
$errcode = 1;
return;
}
- AddBibliosToShelf($shelfnumber, @biblionumber);
+ $shelf->store();
+ AddBibliosToShelf($shelf->shelfnumber, @biblionumber);
#Reload the page where you came from
print $query->header;
print "<html><meta http-equiv=\"refresh\" content=\"0\" /><body
onload=\"window.opener.location.reload(true);self.close();\"></body></html>";
Idem on staff interface.
You may also allow AddBibliosToShelf() to get a shelf object or a shelnumber as
first argument.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list