Minor Feature : username when cataloguing
authorHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 19 Nov 2008 13:58:14 +0000 (14:58 +0100)
committerGalen Charlton <galen.charlton@liblime.com>
Sat, 25 Apr 2009 02:38:02 +0000 (21:38 -0500)
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>
cataloguing/addbiblio.pl

index c3ac310..a27107e 100755 (executable)
@@ -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;