Subversion Repositories SvarDOS

Rev

Rev 914 | Rev 920 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 914 Rev 919
Line 115... Line 115...
115
    $subver[1] = ord(substr($verstr, -1));
115
    $subver[1] = ord(substr($verstr, -1));
116
    $verstr = substr_replace($verstr, '', -1); // remove last character from string
116
    $verstr = substr_replace($verstr, '', -1); // remove last character from string
117
  }
117
  }
118
 
118
 
119
  // validate the format is supported, should be something no more complex than 1.05.3.33
119
  // validate the format is supported, should be something no more complex than 1.05.3.33
120
  if (! preg_match('/[0-9][0-9.]{0,20}/', $verstr)) {
120
  if (! preg_match('/^[0-9][0-9.]{0,20}$/', $verstr)) {
121
    return(false);
121
    return(false);
122
  }
122
  }
123
 
123
 
124
  // NOTE: a zero right after a separator and trailed with a digit (as in 1.01)
124
  // NOTE: a zero right after a separator and trailed with a digit (as in 1.01)
125
  //       has a special meaning
125
  //       has a special meaning