Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2011 at 19:31 UTC
Updated:
6 Nov 2011 at 15:40 UTC
Enables booking on a per node basis.
Sandbox page: http://drupal.org/sandbox/sigismo/1194180
Comments
Comment #1
ccardea commentedThe waiting time for a project application review is currently approaching six weeks. Please consider shortening your wait time by contributing to the code review process. All it takes is basic module writing skills, plus it is a great way to add to your knowledge of Drupal.Please visit http://groups.drupal.org/code-review for details on how to participate.
Comment #2
alexreinhart commentedI've taken a brief look through your code to find any obvious issues. Here's a few comments:
Once you've fixed these issues, please set the status of this issue back to "needs review" and someone will take another look through.
Comment #3
sigismo commentedI have made modifications based on the comments in the post above.
Comment #4
alexreinhart commentedStill a few issues.
$Id$line in bookable.info doesn't need to be there with git.bookable_booking_node_form_validate's error reporting seems to be faulty, for a few reasons. First, error strings are concatenated into$errors, but$errorsis not declared before use --$erroris, and it's never used. You can just callform_set_errorfor each error message, instead of concatenating; Drupal can handle multiple error messages. (That would save you from manually linebreaking the messages like you do currently.) Finally, I thinkis_numeric($nid)and!isset($nid)are mutually exclusive conditions, so the secondifmay as well be anelse iffor clarity. (It tripped me up for a moment.)check_overlap()should be namedbookable_check_overlap()to prevent another module from using the same function name, which would cause an error. Likewise withinstall_content_copy_import_from_file().Please fix all these issues, then set the status back to "needs review." If you need any help or advice, feel free to ask questions here.
Comment #5
sigismo commentedThanks for taking the time out to help me on this. I am working on the changes. Initially i tried calling form_set_error() from inside the loop rather than concatenating the error string however only the error from the first iteration of the loop is shown. I found a similar issue here. I'm not sure how to work around this without concatenating the $errors string. Any suggestions will be welcomed.
Thanks.
Comment #6
alexreinhart commentedAh, I see; the problem is multiple errors on one form component. In that case, I suppose you can't do it any other way than concatenating. Sorry for the misleading advice.
Comment #7
sigismo commentedI have made the changes could you please take a look to see if my modules is in order. Thanks
Comment #8
sigismo commentedPlease review. Thanks.
Comment #9
alexreinhart commentedYou should create a 6.x-dev branch using these instructions:
http://drupal.org/node/1066342
...since the module release system uses branches to distinguish between major module versions.
$i is unused in bookable_check_overlap.
Otherwise I don't see any major issues. I no longer have the time to a deeper review, unfortunately.
Comment #10
klausi* Git release branch missing, see http://drupal.org/node/1015226
* do not include an @file doc block in the info file, you can make comments there by starting a line with ";"
* "//Install the content file" There should be a space after "//". Comments should end with a "."
* bookable_form_alter(): doc block has an additional empty line, remove it. See http://drupal.org/node/1354#functions
* "@param $from_date string" should be "@param string $from_date". Description in the next line should be indented with 2 spaces.
* I don't see a hook_permission(), so how do you control who can make a node booking?
Comment #11
sigismo commentedThanks for the review, Ill work on those. Regarding controlling who can make node bookings, it would be controlled via the permissions page.
Comment #12
sigismo commentedComment #13
sigismo commentedComment #14
sigismo commentedComment #15
sigismo commentedI have created the 6.x-dev branch
Comment #16
sreynen commentedLooks like everything in #10 is addressed, except the question about permissions, which I think I can answer. This module appears to just add booking data to existing node types, so CCK manages permissions.
Comment #17
sigismo commentedHey, when do I get permission to create the full project?
Comment #18
gregglesPlease take a moment to make your project page follow tips for a great project page.
In particular, please add a comparison of this solution to other similar solutions. In a quick search I found
* http://drupal.org/project/bookings
* http://drupal.org/project/resource_booking
* http://drupal.org/project/merci
* http://drupal.org/project/simple_reservation
It's OK to create a module similar to others, but that makes it hard for people to figure out when to use your module or some other module. Providing a comparison will help them decide.
Comment #19
sreynen commentedHi sigismo,
Thanks for your contribution and welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects, at your discretion.
Now that you've experienced the full review process, please consider reviewing other projects that are still awaiting review. Anyone can help with reviews, following the guidelines.
Please note what greggles said in #18 and give your project page more description.