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 <galen.charlton@liblime.com>
This commit is contained in:
Henri-Damien LAURENT 2008-11-19 14:58:14 +01:00 committed by Galen Charlton
parent dc5990b6ae
commit 87cef586af

View file

@ -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;