coding standards cleanup for uc multi stock
greggles - September 5, 2008 - 01:30
| Project: | Ubercart Stock Manager With Attributes |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | greggles |
| Status: | closed |
Description
I've tested this module and it worked well for me. I think there is some room for improvement in general but wanted to start with a patch to bring the module into compliance with the Drupal coding standards.
It changes a lot of things, but I believe that all the changes are cosmetic and not functional. Please let me know if you feel any of them are functional so I can fix it.
There is also a problem with the way that the db_query placeholders are built in one place that doesn't take advantage of the drupal database API, but I don't believe it is a security concern because the NID comes from a fairly controlled area.
| Attachment | Size |
|---|---|
| coding_standards_uc_multi_stock.patch | 17.13 KB |

#1
i have implemented the patch in the official version, barring the db query change - that just dont work.
all the rest have been tested and work fine.
thank you for the input - i will make sure to commit future code according to standard.
#2
I've created a new patch for that last part.
Can you clarify which part of it "just dont work" ?
Also, while your commit message follows the standard more or less you gave yourself credit for the patch instead of me, which feels a little sad :(
#3
1. the credit part was by mistake - sorry. i will commit again with credit for you.
2. dont work means just that - no stock limitation at all.
3. have you tested the new patch ?
#4
I didn't test the first path, but I have tested the one in #2 and it works fine.
This is the standard way to write queries in Drupal and is a more secure way as well.
#5