Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Aug 2011 at 07:19 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
asimfastian commentedComment #2
asimfastian commentedComment #3
asimfastian commentedComment #4
patrickd commentedPlease do not push into the master branch, follow the instructions on naming conventions here:
http://drupal.org/node/1015226, git branching: http://drupal.org/node/1066342
Most of the other issues can be detected by the coder module (http://drupal.org/project/coder)
Also a README.txt is missing, check other projects about how to write them.
regards
Comment #5
patrickd commentedoh sorry - wrong project :/
Comment #6
asimfastian commentedI believe previous feedback was not for this module.
Comment #7
patrickd commentedIt was just the pdf which was wrong. Sorry for that.
But the Issues of #4 have not been fixed yet.
Comment #8
asimfastian commentedI have added a README File and committed the code and changes to a new remote branch.
Comment #9
patrickd commentedstill some fundamental issues:
It appears you are not working correctly with branches in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
There are still files other than README.txt in the master branch, make sure to remove them. See also step 5 in http://drupal.org/node/1127732
Review of the 6.x-1.0 branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.
Comment #10
asimfastian commentedThank you for pointing out git issues. Actually I'm new to git and still its initial learning stages.
I have removed old CSV $Id tag from all files. I also deleted master branch as per listed in point#5.
Comment #11
asifnoor commentedDid a quick review of the module and here are my notes.
1. In the info file, please add the version of the core, package name and description
2. In the module file, run the coder and make the code indented.
3. Your module is not compatible with 6.22 version. let us know which version of drupal i need to have to get this working. i have checked it out both 6.x-1.x and 7.x-1.x both are not working in either d6 or d7.
4. README file is missing still. Not sure what your module does. I did not understand the functionality of this module. Please add the use of this module in README file.
Coder Review
term_status.module
Line 13: Potential problem: FAPI elements '#title' and '#description' only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized.
$form['term_status'] = array('#type' => 'checkbox', '#title' => t('Enable this term.'), '#weight' => 1, '#default_value' => $default_term_status);
Line 25: use a space between the closing parenthesis and the open bracket
function term_status_form_submit($form, &$form_state){
Line 27: missing space after comma
term_status_set($form_state['values']['tid'],$form_state['values']['term_status']);
Line 34: use a space between the closing parenthesis and the open bracket
function term_status_get($tid=0){
Line 35: Control statements should have one space between the control keyword and opening parenthesis
if($tid>0){
Line 35: use a space between the closing parenthesis and the open bracket
if($tid>0){
Line 36: missing space after comma
$result = db_fetch_object(db_query('select tid,status from {term_status} where tid=%d',$tid));
Line 37: Control statements should have one space between the control keyword and opening parenthesis
if($result->tid){
Line 37: use a space between the closing parenthesis and the open bracket
if($result->tid){
Line 47: use a space between the closing parenthesis and the open bracket
function term_status_set($tid=0,$status=1){
Line 47: missing space after comma
function term_status_set($tid=0,$status=1){
Line 48: Control statements should have one space between the control keyword and opening parenthesis
if($tid>0){
Line 48: use a space between the closing parenthesis and the open bracket
if($tid>0){
Line 49: missing space after comma
$result = db_fetch_object(db_query('select count(*) as count from {term_status} where tid=%d',$tid));
Line 50: Control statements should have one space between the control keyword and opening parenthesis
if($result->count > 0){
Line 50: use a space between the closing parenthesis and the open bracket
if($result->count > 0){
Line 51: missing space after comma
$result = db_query('UPDATE {term_status} SET status=%d where tid=%d',$status,$tid);
Line 54: missing space after comma
$result = db_query('INSERT INTO {term_status} (tid,status) VALUES (%d, %d)',$tid,$status);
sites/all/modules/custom/term_status/term_status.install
term_status.install
Line -1: @file block missing (Drupal Docs)
Line 40: missing space after comma
'tid_status' => array('tid','status'),
Comment #12
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #13
asimfastian commentedcould not work on it due to some personal reasons. Now I am back. Please review and approve it. thanks.
Comment #13.0
asimfastian commentedupdated the description and added the project link in description.
Comment #14
PA robot commentedWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and put yourself on the PAReview: review bonus high priority list. Then I'll take a look at your project right away :-)
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #15
veeraprasadd commentedHi asimfastian,
Reviewed your module and found issues in automated project review in ventral.org
---
And in manual review:
File: term_status.module
Line 6: Use hook_form_FORM_ID_alter() instead hook_form_alter() to avoid $form_id check in Line 7.
Thanks and Regards,
D. Veera Prasad.
www.drup-all.com
Comment #16
jibranAs per #11
Comment #17
jibranhttp://ventral.org/pareview/httpgitdrupalorgsandboxasimfastian1179898git has some issues too. Reverting to normal because it is back to NW.
Comment #18
asimfastian commentedMentioned changes have been implemented.
Comment #19
patrickd commentedYour project page is not very detailed, please have a look at the tips for a great project page, you may also use HTML-tags for better structure.
A general best practice: Never use 0's or 1es as constants - if you have static values define a constant with a proper name to improve code readability.
eg. define('TERM_STATUS_ENABLED', 1)
why do you set a default value for $tid if you don't handle it? that makes no sense to me
Beside all that, this project is too short to make a serious review. We are currently discussing how much code we need, but with such a few lines of code we are not able to determine whether you can make use of drupal's API's in a correct and secure way.
I'd suggest that you provide an Drupal 7 version of this project, which should give us enough to make sure you know what your doing (I'm not saying you don't - but how should I know). If you don't like to do that I can approve this single project. That means that you'll have to re-apply with another module again later.
What would you prefer?
Comment #20
asimfastian commentedPlease approve this module. I will add another different module for Drupal-7 in future.
Comment #21
patrickd commentedOkay then, beside the minor issues I found in #19 there's nothing against promoting this module.
Tagging with PAReview: Single project promote
RTBC
Comment #22
asimfastian commentedI have made the above mentioned changes.
Comment #23
patrickd commentedwith using constants I actually meant you should define one for both, term status enabled and disabled and actually make use of them everywhere in your own module instead of 0's and 1's.
project page is still not better :(
and I still don't understand why you provide a default value for the $tid in every function
Comment #24
asimfastian commentedI am not using '0' value explicitly anywhere in the code to disable a term. It is being set if check-box is not checked. That's why I did not defined it's constant
I have made the changes on project page and added a screenshot as well.
I have removed default values for $tids.
Comment #25
asimfastian commentedComment #26
teyser commentedHi Asim,
PFA
Please include the version in the info file.
Could you please explain further about your project to do more test.
Right now it provides option only checkbox in taxonomy edit page and add page.Depends on the status have you filter the content if i try to access the taxonomy URL (taxonomy/term/1).
Sorry for my poor english.
Regards,
-Raj.
Comment #27
asimfastian commentedI didn't filter the content. I added the facility to get/set status of a taxonomy. Now it depends upon the particular developer how he uses it.
Comment #28
teyser commentedHi Asim,
Thanks for your information.
Regards,
-Raj.
Comment #29
asimfastian commentedwho will approve this issue?
Comment #30
patrickd commentedSorry for the waiting time, as there have been no further objections, I promoted your sandbox to a full project.
New URL: Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it:
git remote set-url origin asimfastian@git.drupal.org:project/term_status.git
Thanks for your contribution!
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, 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.
Thanks to the dedicated reviewer(s) as well.
Comment #31
asimfastian commentedThanks patrickd. I will also be more active in reviewing other project applications. But I see an issue here. My project has been promoted but I have not been granted permissions to create full projects without going through sandbox process. Please look into it and grant me this permission. I appreciate your help in this regard.
Comment #32
patrickd commentedI actually explained to you in comment #19 that I can't give you the permission to create full project because this project is too small and instead I would promote this project manually - you agreed on that in the next comment
Comment #33.0
(not verified) commentedIssue description updated