- Timestamp:
- 2019-07-08T17:24:19+12:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm
r33183 r33311 1088 1088 my $old_depth = $parser->{'parameters'}->{'curr_section_depth'}; 1089 1089 my $old_secnum = $parser->{'parameters'}->{'curr_section_num'}; 1090 1090 1091 1091 my $new_secnum; 1092 1092 … … 1096 1096 } 1097 1097 elsif ($new_depth == $old_depth) { 1098 # sibling section => increase it 's value by 11098 # sibling section => increase its value by 1 1099 1099 my ($tail_num) = ($old_secnum =~ m/\.(\d+)$/); 1100 1100 $tail_num++; … … 1106 1106 $new_secnum = $old_secnum; 1107 1107 $new_secnum =~ s/\.\d+$//; 1108 # remember to increment from parent section 1109 my ($tail_num) = ($new_secnum =~ m/\.(\d+)$/); 1110 $tail_num++; 1111 $new_secnum =~ s/\.(\d+)$/\.$tail_num/; 1108 1112 } 1109 1113 1110 1114 $parser->{'parameters'}->{'curr_section_depth'} = $new_depth; 1111 1115 $parser->{'parameters'}->{'curr_section_num'} = $new_secnum; 1112 1116 1117 #print STDERR "**** START SECTION - $new_secnum\n************************\n\n"; 1113 1118 1; 1114 1119 }
Note:
See TracChangeset
for help on using the changeset viewer.