Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
new project application
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2011 at 10:03 UTC
Updated:
19 May 2011 at 12:11 UTC
Recently read module displays a history of recently read nodes by currently logged in user. Site administrators can enable blocks containing recently read links for each content type separetly.
This may be useful i.e. for displaying a history of recently viewed product on the e-commerce site.
This module is a response to http://drupal.org/node/65679
As far as I know, there is no other module that provides the similar functionality.
Comments
Comment #1
venutip commentedHave you uploaded this module to your git sandbox yet? If so, please provide a link.
Comment #2
avpadernoComment #3
pgorecki commentedSorry, I forgot the most important part:
http://drupal.org/sandbox/pgorecki/1080970
Comment #4
venutip commented- Found one security issue (line 136) and several coding standards issues. Run your module through Coder on the most critical settings and fix the problems it reports:
http://drupal.org/project/coder
- Lines 191, 76: use curly braces. From http://drupal.org/coding-standards#controlstruct
- Use of hook_exit() makes this module incompatible with aggressive caching. Not a problem per se, but you might want to see if you can achieve the same results using hook_init() instead.
Comment #5
pgorecki commentedFixed the security issue, fixed problems reported by Coder.
Comment #6
meba commentedWhy is ! here? Not needed and possible security issue (although I doubt Content type name might contain XSS. Good practice though). The same few lines below
A tip: in hook_exit, could you use drupal_write_record to simplify the code? It would automatically update or insert new line.
I am afraid this module might be a performance hog but I don't think it's up to us to judge that. I suggest fixing the t() issue and then good to go.
Comment #7
pgorecki commentedThanks a lot for the review and some tips, the code is fixed.
Comment #8
mermentau commentedI don't think we can mark our own as status "fixed". Probably want to put "needs review".
Comment #9
pgorecki commentedstatus changed to "needs review"
Comment #10
rteijeiro commentedHi.
Please, add a README.txt file with the project description, installation, requirements, features...
Could you compare your project with similar projects that offers the same solutions, please?
I don't know why you have commented the hook_help implementation and why you use the hook_exit instead the hook_nodeapi.
Kind regards.
Comment #11
pgorecki commentedHi.
I added README.txt to the sandbox. I didn't find any project that offers the similar solution to my module (correct me if I'm wrong). However, similar functionality can be achieved with Rules+Flag+Views as described in this tutorial: http://drupal.org/node/405754, or with statistics module and custom code snippets: http://drupal.org/node/45286
I used hook_exit() intentionally, taking the same approach as is in the statistics module (http://api.drupal.org/api/drupal/modules--statistics--statistics.module/...). As a consequence, a node is "read" when user browses to node/X page, and will not be read if node is viewed in some other way (i.e. with Views).
Comment #12
rteijeiro commentedHi.
I have reviewed the project and it has clean, safe and well commented code. It works well and I think it's ready to become a full project.
Great work!!
Kind regards.
Comment #13
rfayPlease remove the LICENSE.txt, as we do not allow those any more (one is provided with by the packaging).
Thanks for your patience - Git vetted user role granted.
Please review others' applications, because you know how painfully long this can take.
Thanks for your present and future contributions!
Comment #14
pgorecki commentedThanks a lot everybody for tips, suggestions, and giving the time to review this module.