projects
/
koha_ffzg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
121ba6b
)
Bugfix in modification
author
tipaul
<tipaul>
Thu, 23 Sep 2004 16:12:35 +0000
(16:12 +0000)
committer
tipaul
<tipaul>
Thu, 23 Sep 2004 16:12:35 +0000
(16:12 +0000)
C4/AuthoritiesMarc.pm
patch
|
blob
|
history
authorities/authorities.pl
patch
|
blob
|
history
diff --git
a/C4/AuthoritiesMarc.pm
b/C4/AuthoritiesMarc.pm
index
d08786d
..
b3b6b23
100644
(file)
--- a/
C4/AuthoritiesMarc.pm
+++ b/
C4/AuthoritiesMarc.pm
@@
-271,7
+271,11
@@
sub AUTHcount_usage {
$tags_using_authtype.= "'".$tagfield."9',";
}
chop $tags_using_authtype;
$tags_using_authtype.= "'".$tagfield."9',";
}
chop $tags_using_authtype;
- $sth = $dbh->prepare("select count(*) from marc_subfield_table where concat(tag,subfieldcode) in ($tags_using_authtype) and subfieldvalue=?");
+ if ($tags_using_authtype) {
+ $sth = $dbh->prepare("select count(*) from marc_subfield_table where concat(tag,subfieldcode) in ($tags_using_authtype) and subfieldvalue=?");
+ } else {
+ $sth = $dbh->prepare("select count(*) from marc_subfield_table where subfieldvalue=?");
+ }
# warn "Q : select count(*) from marc_subfield_table where concat(tag,subfieldcode) in ($tags_using_authtype) and subfieldvalue=$authid";
$sth->execute($authid);
my ($result) = $sth->fetchrow;
# warn "Q : select count(*) from marc_subfield_table where concat(tag,subfieldcode) in ($tags_using_authtype) and subfieldvalue=$authid";
$sth->execute($authid);
my ($result) = $sth->fetchrow;
@@
-505,7
+509,7
@@
sub AUTHmodauthority {
# 1st delete the authority,
# 2nd recreate it
&AUTHdelauthority($dbh,$authid,1);
# 1st delete the authority,
# 2nd recreate it
&AUTHdelauthority($dbh,$authid,1);
- &AUTHaddauthority($dbh,$record,$authid);
+ &AUTHaddauthority($dbh,$record,$authid
,AUTHfind_authtypecode($dbh,$authid)
);
# FIXME : modify the authority in biblio too.
}
# FIXME : modify the authority in biblio too.
}
@@
-517,7
+521,7
@@
sub AUTHdelauthority {
# the best solution for a modif is to delete / recreate the record.
my $record = AUTHgetauthority($dbh,$authid);
# the best solution for a modif is to delete / recreate the record.
my $record = AUTHgetauthority($dbh,$authid);
- $dbh->do("delete from auth_header where authid=$authid");
+ $dbh->do("delete from auth_header where authid=$authid")
unless $keep_biblio
;
$dbh->do("delete from auth_subfield_table where authid=$authid");
$dbh->do("delete from auth_word where authid=$authid");
# FIXME : delete or not in biblio tables (depending on $keep_biblio flag)
$dbh->do("delete from auth_subfield_table where authid=$authid");
$dbh->do("delete from auth_word where authid=$authid");
# FIXME : delete or not in biblio tables (depending on $keep_biblio flag)
@@
-832,6
+836,9
@@
Paul POULAIN paul.poulain@free.fr
# $Id$
# $Log$
# $Id$
# $Log$
+# Revision 1.7 2004/09/23 16:13:00 tipaul
+# Bugfix in modification
+#
# Revision 1.6 2004/08/18 16:00:24 tipaul
# fixes for authorities management
#
# Revision 1.6 2004/08/18 16:00:24 tipaul
# fixes for authorities management
#
diff --git
a/authorities/authorities.pl
b/authorities/authorities.pl
index
84dd055
..
b8a5734
100755
(executable)
--- a/
authorities/authorities.pl
+++ b/
authorities/authorities.pl
@@
-160,7
+160,7
@@
sub create_input () {
sub build_tabs ($$$$) {
my($template, $record, $dbh,$encoding) = @_;
sub build_tabs ($$$$) {
my($template, $record, $dbh,$encoding) = @_;
-#
warn
"=>".$record->as_formatted;
+# "=>".$record->as_formatted;
# fill arrays
my @loop_data =();
my $tag;
# fill arrays
my @loop_data =();
my $tag;