From 87cef586af7f8f5f36e0d5c27a6be776cb43a61f Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Wed, 19 Nov 2008 14:58:14 +0100 Subject: [PATCH] Minor Feature : username when cataloguing biblios can now be added librarian name automatically when cataloguing. add "user" in the Default value of the biblio [RM doc note: in other words, if in the MARC framework you set the default value of a subfield to 'user', the username of the cataloger will be entered into that subfield whenever you create or modify that bib in the Koha bib editor.] Signed-off-by: Galen Charlton --- cataloguing/addbiblio.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index c3ac31031b..a27107e2e5 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; -- 2.20.1