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

(-)a/tools/batchMod.pl (-8 / +5 lines)
Lines 332-344 foreach my $tag (sort keys %{$tagslib}) { Link Here
332
   if ( !$value && $use_default_values) {
332
   if ( !$value && $use_default_values) {
333
	    $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
333
	    $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
334
	    # get today date & replace YYYY, MM, DD if provided in the default value
334
	    # get today date & replace YYYY, MM, DD if provided in the default value
335
            my $today = dt_from_string;
335
        my $today_iso = output_pref( { dt=>dt_from_string, dateonly => 1, dateformat => 'iso' } );
336
            my $year  = $today->year;
336
        my ( $year, $month, $day ) = split ('-', $today_iso);
337
            my $month = $today->month;
337
        $value =~ s/YYYY/$year/g;
338
            my $day   = $today->day;
338
        $value =~ s/MM/$month/g;
339
            $value =~ s/YYYY/$year/g;
339
        $value =~ s/DD/$day/g;
340
            $value =~ s/MM/$month/g;
341
            $value =~ s/DD/$day/g;
342
	}
340
	}
343
	$subfield_data{visibility} = "display:none;" if (($tagslib->{$tag}->{$subfield}->{hidden} > 4) || ($tagslib->{$tag}->{$subfield}->{hidden} < -4));
341
	$subfield_data{visibility} = "display:none;" if (($tagslib->{$tag}->{$subfield}->{hidden} > 4) || ($tagslib->{$tag}->{$subfield}->{hidden} < -4));
344
    # testing branch value if IndependentBranches.
342
    # testing branch value if IndependentBranches.
345
- 

Return to bug 14950