This was carefully updated in CVS before the beta release, but nothing actually calls it:

$ grep -r uc_version .
./uc_store/uc_store.module:function uc_version() {
$
CommentFileSizeAuthor
unused-version-function.patch424 byteslongwave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

Just checked in 6.x, and 6.x-2.4 currently returns "6.x-2.1" so this should probably be applied to that branch too!

TR’s picture

Assigned: Unassigned » Island Usurper

I fixed it in 6.x.

Island Usurper’s picture

Core always knows what version it is, but you don't think there's some contrib module out there that uses this function? It's not really that important since we've only had one major version per Drupal version.

longwave’s picture

If nobody has noticed since 6.x-2.1, I doubt it. I think this could have been useful to determine which invoice display method to use when that changed in (iirc) 6.x-2.2, but it doesn't seem to be have been used for that, as nobody reported the incorrect version as a bug before.

longwave’s picture

Also, if it were to be useful for contrib, it would be better to define('UBERCART_API', 3) or something, as that's much easier to test than parsing a string...

TR’s picture

Drupal 7 .info files let you specify module versions in your dependencies: http://drupal.org/node/542202

I think this should cover most, if not all, situations where a contributed module might need to check on an Ubercart version. I've never seen uc_versions() used so I don't think removing this function will have any impact.

Island Usurper’s picture

Status: Needs review » Fixed

OK, sounds good. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.