there's a little bit of similar functionality in cvs.module. however, we can make 2 simplifying assumptions here (5.x and beyond, and only contrib), and we need a much simpler output (the human readable string) than cvs.module does (a whole array of parts of the version string). so, i just re-implemented this via 2 preg_match() calls.
note that this seems to confuse our CVS vs. dev-snapshot detection code, but i think a better solution to that is at http://drupal.org/node/146027. therefore, i'd be happy to just commit this first, then clean up the CVS detection via that issue.
Comments
Comment #1
merlinofchaos commentedThe patch looks good; I think $match = array() can be moved up, however, and the whole construct reduced to if / else if / else if / else rather than the nesting. Once you've got that, it's RTBC, I think.
Comment #2
dwwahh, yeah, i see what you mean. sure, i'll re-roll.
Comment #3
dwwComment #4
dwwmerlinofchaos RTBC'ed in IRC, committed to HEAD.
Comment #5
(not verified) commented