* (UNIMARC specific bugfix) when an editor is entered, with no ISBN, the collection plugin (225a) can find collections attached to the editor name. Note that if there are more than 1 EDITORS authority for a given editor, only the 1st will be used to create collection list.
This commit is contained in:
parent
b9866c5c08
commit
d578ecdd11
|
|
@ -104,7 +104,7 @@
|
|||
|
||||
function report(index,summary)
|
||||
{
|
||||
var regexp= /(\d* - *)(.*)/;
|
||||
var regexp= /(\d* -+ *)(.*)/;
|
||||
var result=summary.match(regexp);
|
||||
opener.document.f.field_value[index].value=result[2];
|
||||
self.close();
|
||||
|
|
|
|||
|
|
@ -118,15 +118,28 @@ my ($input) = @_;
|
|||
# builds collection list : search isbn and editor, in parent, then load collections from bibliothesaurus table
|
||||
# if there is an isbn, complete search
|
||||
my @collections;
|
||||
my $sth = $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
|
||||
left join auth_header on auth_subfield_table.authid=auth_header.authid
|
||||
where authtypecode='EDITORS' and tag='200' and subfieldcode='a' and subfieldvalue=?");
|
||||
my $sth2 = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='c' and authid=? order by subfieldvalue");
|
||||
my @splited = split //, $isbn_found;
|
||||
my $isbn_rebuild='';
|
||||
foreach my $x (@splited) {
|
||||
$isbn_rebuild.=$x;
|
||||
$sth->execute($isbn_rebuild);
|
||||
if ($isbn_found) {
|
||||
my $sth = $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
|
||||
left join auth_header on auth_subfield_table.authid=auth_header.authid
|
||||
where authtypecode='EDITORS' and tag='200' and subfieldcode='a' and subfieldvalue=?");
|
||||
my $sth2 = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='c' and authid=? order by subfieldvalue");
|
||||
my @splited = split //, $isbn_found;
|
||||
my $isbn_rebuild='';
|
||||
foreach my $x (@splited) {
|
||||
$isbn_rebuild.=$x;
|
||||
$sth->execute($isbn_rebuild);
|
||||
my ($authid) = $sth->fetchrow;
|
||||
$sth2->execute($authid);
|
||||
while (my ($line)= $sth2->fetchrow) {
|
||||
push @collections,$line;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
my $sth = $dbh->prepare("select auth_subfield_table.authid,subfieldvalue from auth_subfield_table
|
||||
left join auth_header on auth_subfield_table.authid=auth_header.authid
|
||||
where authtypecode='EDITORS' and tag='200' and subfieldcode='b' and subfieldvalue=?");
|
||||
my $sth2 = $dbh->prepare("select subfieldvalue from auth_subfield_table where tag='200' and subfieldcode='c' and authid=? order by subfieldvalue");
|
||||
$sth->execute($editor_found);
|
||||
my ($authid) = $sth->fetchrow;
|
||||
$sth2->execute($authid);
|
||||
while (my ($line)= $sth2->fetchrow) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue