Regions module review

Lyle's picture
Offline
AdministratoreLiTe!
Joined: 08/07/2007
Juice: 6841
Regions module review

Regions module review
This is just based on looking at the code. I haven't actually installed or tested it yet. That said, it looks like it should work properly. Good job.

Things to fix:

  • Table name in uc_regions_install() is 'uc__regions', should have only one underscore.
  • The calls to db_query() on lines 182 and 193 are open to an SQL Injection Attack. Parameterize the data.
  • The unit conversion constants are define()d in uc_store.module, and do not need to be here.
  • MENU_CALLBACK_ITEM is not defined, MENU_CALLBACK is. My fault for writing modules that way before.
  • I think it's a good idea to remove the version and CVS information added by Drupal in the .info file. We've had version confusion because of that.
  • Please style the code according to the Drupal coding standards. Specifically, use two spaces instead of tabs to indent code. This keeps indentations consistent across text editors.
  • Remove extra files from the .zip archive (.M, .php). I was a little confused by them. *shrug*
Regions By: arbel (23 replies) Wed, 09/26/2007 - 20:44