[Koha-patches] [PATCH] Minor Feature : username when cataloguing
Henri-Damien LAURENT
henridamien.laurent at biblibre.com
Wed Nov 19 14:58:14 CET 2008
biblios can now be added librarian name automatically when cataloguing.
add "user" in the Default value of the biblio
---
cataloguing/addbiblio.pl | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl
index 0773f2e..aa71a91 100755
--- a/cataloguing/addbiblio.pl
+++ b/cataloguing/addbiblio.pl
@@ -308,6 +308,9 @@ sub create_input {
$value =~ s/YYYY/$year/g;
$value =~ s/MM/$month/g;
$value =~ s/DD/$day/g;
+ my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian");
+ $value=~s/user/$username/g;
+
}
my $dbh = C4::Context->dbh;
--
1.6.0.2
More information about the Koha-patches
mailing list