Changeset 22264

Show
Ignore:
Timestamp:
14.06.2010 15:37:40 (10 years ago)
Author:
kjdon
Message:

greenstone doesn't like digit only macros when they appear inside other macros - it thinks they are parameter references. This happens for field names inside _jselection_ etc. So make sure short names are not just digits.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/basebuilder.pm

    r21785 r22264  
    630630    $a = 'a' unless defined $a; 
    631631    $b = '0' unless defined $b; 
    632  
    633     return "$a$b"; 
     632     
     633    my $newfield = "$a$b"; 
     634    if ($newfield =~ /^\d\d$/) { 
     635    # digits only - Greenstone runtime doesn't like this. 
     636    $newfield = "a$a"; 
     637    } 
     638    return $newfield; 
    634639     
    635640}