View | Details | Raw Unified | Return to bug 17922
Collapse All | Expand All

(-)a/cataloguing/addbiblio.pl (-3 / +3 lines)
Lines 293-301 sub create_input { Link Here
293
293
294
        # get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value
294
        # get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value
295
        my $today_dt = dt_from_string;
295
        my $today_dt = dt_from_string;
296
        my $year = $today_dt->year;
296
        my $year = $today_dt->strftime('%Y');
297
        my $month = $today_dt->month;
297
        my $month = $today_dt->strftime('%m');
298
        my $day = $today_dt->day;
298
        my $day = $today_dt->strftime('%d');
299
        $value =~ s/<<YYYY>>/$year/g;
299
        $value =~ s/<<YYYY>>/$year/g;
300
        $value =~ s/<<MM>>/$month/g;
300
        $value =~ s/<<MM>>/$month/g;
301
        $value =~ s/<<DD>>/$day/g;
301
        $value =~ s/<<DD>>/$day/g;
(-)a/cataloguing/additem.pl (-5 / +4 lines)
Lines 130-140 sub generate_subfield_form { Link Here
130
            $value = $subfieldlib->{defaultvalue};
130
            $value = $subfieldlib->{defaultvalue};
131
            # get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value
131
            # get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value
132
            my $today_dt = dt_from_string;
132
            my $today_dt = dt_from_string;
133
            my $year = $today_dt->year;
133
            my $year = $today_dt->strftime('%Y');
134
            my $month = $today_dt->month;
134
            my $month = $today_dt->strftime('%m');
135
            my $day = $today_dt->day;
135
            my $day = $today_dt->strftime('%d');
136
            $value =~ s/<<YYYY>>/$year/g;
136
            $value =~ s/<<YYYY>>/$year/g;
137
            $value =~ s/<<MM></$month/g;
137
            $value =~ s/<<MM>>/$month/g;
138
            $value =~ s/<<DD>>/$day/g;
138
            $value =~ s/<<DD>>/$day/g;
139
            # And <<USER>> with surname (?)
139
            # And <<USER>> with surname (?)
140
            my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian");
140
            my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian");
141
- 

Return to bug 17922