CVS edit link for Faustas
I am software developer and I have developed Drupal modules during the past three years. Formerly I have created modules for companies and on project basis. I want to contribute some of my own modules to get feedback and to give something back to the Drupal community.
My first module is a resubmission module that makes it possible to resubmit any node type in a given resubmission interval. The user defines a resubmission interval for a specific node and the system tells him to review his node after the resubmission interval is over. That functionality is very helpful, if you have to review specific content after a given time and you want an automatic information by the system.
If you have further questions, please do not hesitate to contact me.
[Edited by kiamlaluno to translate the last sentence from German to English.]
Comments
Comment #1
Faustas commentedI uploaded the contribution.
Comment #2
Faustas commentedComment #3
avpadernoHello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.
Comment #4
Faustas commentedUpdate the module package:
- Used the Coder module and made some changes regarding the Drupal coding standards.
- Implemented the hook _help.
- Added a README.txt
- Added a LICENSE.txt
- Added Id tags to the module files.
The attached .zip file contains the current version of the resubmission module. Please review that version.
Comment #5
avpadernoLicense files cannot be committed in drupal.org repositories. This is also reported in http://drupal.org/node/539608; I would suggest you to read what else is reported in that page, for your benefit.
Comment #6
Faustas commentedHello,
I deleted the license file (it was just the GPL license of drupal) from the module and re-attached a new version.
Thanks for your advice.
Comment #7
avpadernoComment #8
Faustas commentedHello,
I made a few changes to the module that improve the handling and the user possibilities.
Changes:
- Added a new field in the database table that makes it possible to distinguish between one time and interval resubmissions.
- Created a .css file and removed the style code from the .module file.
- Added a Date field in the node form to select a resubmission target date.
- Updated the README.txt.
Please use this attachment for review.
Comment #9
Faustas commentedA friend of mine (He tests the module) made a feature request to me. He wanted an additional description field at the resubmission form to store some information about the resubmission.
I added the description field to the resubmission form and made the description available in the resubmission overview list.
This is my final attachment for the resubmission module. I hope to get a positive review.
Comment #10
friik commentedHello,
this week i searched for a module that reminds me to check some of the nodes on my site. I found this module and have to say it's great.
I reviewed the code with the coder module and checked some of the code against my own security standarts. I couldn't find anything alarming.
Would be happy to find this module in the cvs shortly.
Cheers Friik
Comment #11
Faustas commentedHello,
I know that you have a lot to do. The last commenter tested my module and I use it on two projects. Could anybody review the little module?
Thanks in advance for your work.
Comment #12
Anonymous (not verified) commentedHi, I'm just reviewing your module. Here is a list of possible improvements:
Installer
During the install you check for a specific database type and create the table by hand if drupal is running on postgresql. Is this really necessary when using the schema-api? Furthermore when deinstalling you simply use the schema-api. :)
Module
Some code could be clean up e.g. you could simplify some if-statements. Example:
could simply be stated as:
if (!empty($node) && !empty($node->title)) { $title = $node->title; }BTW:
node_load()returnsFALSEif the node could not be loaded. :-)Referring to your extra handling of postgresql you use backticks in your sql queries which can lead to errors on a real postgresql installation.
The rest of the module looks like good and clean code. No security issues to see.
Comment #14
avpadernoThe package name is used when a module is part of a group of modules, not report the name of the module, which is already given with
name =.The implementation of
hook_install()has not been updated for Drupal 6.The comment at the end of the function is not standard in Drupal.
t().The code doesn't verify if the current logged in user as the permission to see the node data, nor if the node has been unpublished.
There is a Drupal theme function for images, as well as a Drupal function that returns a Drupal URL.
The implementations of
hook_help()can use full HTML, and there is no reason to pass the content tofilter_filter().There is a function that returns the path of a module, which should be used in such cases.
[…] that will be shown […].
The values to validate are contained in
$form_state.The function has not been updated for Drupal 6.
The character
`is not used from all the database engines Drupal is compatible with; the same is true for the SQL functionfrom_unixtime().The second parameter of
watchdog()is a not translated string;watchdog()passed that string tot().Why isn't the code implementing
hook_nodeapi()to delete any reference to deleted nodes from its own database table?$node->descriptionneeds to pass throughcheck_plain(); that means its placeholder should be different. See the documentation fort()to understand which placeholder should be used.The purpose of a form validation handler is only to validate the user input, not to save the user input.
Comment #15
Faustas commentedHello,
I have updated the module and fixed the existing errors.
Thanks for the reviews. I hope that this version looks fine.
Comment #16
Faustas commentedComment #17
avpadernoThe code should simply call
drupal_install_schema().Drupal variable names should always be prefixed by the module name; the same is true for PHP constants.
Reserved SQL keywords are written in uppercase.
Thank you for your contribution!
I am going to update your account so you can opt into security advisory coverage now.
These are some recommended readings to help with excellent maintainership:
You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank all the dedicated reviewers as well.
Comment #20
avpaderno