Project

General

Profile

« Previous | Next » 

Revision 5152

Added by daigle about 15 years ago

When comparing lat and long ranges, make sure the values have content first. Perl values with no content = 0.

View differences:

src/perl/register-dataset.cgi
1667 1667
    }
1668 1668

  
1669 1669
    # geographic coverage
1670
    if(hasContent($FORM::geogdesc) || ($FORM::latDeg1 < 91 && $FORM::latDeg1 > -1 && $FORM::longDeg1 < 181 && $FORM::longDeg1 > -1)) {
1670
    if(hasContent($FORM::geogdesc) || ((hasContent($FORM::latDeg1) && $FORM::latDeg1 < 91 && $FORM::latDeg1 > -1  && hasContent($FORM::longDeg1) && $FORM::longDeg1 < 181 && $FORM::longDeg1 > -1)) {
1671 1671
        $cov .= "<geographicCoverage>\n";
1672 1672

  
1673 1673
        if(hasContent($FORM::geogdesc)) {

Also available in: Unified diff