Closed (duplicate)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Sep 2011 at 14:56 UTC
Updated:
10 Sep 2018 at 10:31 UTC
Jump to comment: Most recent
Comments
Comment #1
elc commentedGreetings, sorry it has taken so long for someone to get to your application. There is a bit of a backlog.
See Best practices for creating and maintaining projects
Comment #2
lugir commentedHi ELC
Thanks for your review
for your suggestions:
Running module through Coder
I did this and now the coder module said "No Problems Found"
REAMDE.txt
I read the README.txt file of admin_menu module, and use it as a template to improve mine.
.install file
Thanks for all your advises, 'paging' module create a $node->pages array to stored output content,
so i cant effected the output by changing $node->body.
i have updated my module, it don't need set weight for this module and .install file was removed.
.module file
if using relative links here, the links added by imagelink will be broken links
git branching
I created a release branching of this module named imagelink-6.x-1.0
Thanks again for all your advises :D
Comment #3
elc commentedhaven't looked at the rest..
Comment #4
lugir commentedHi ELC
coder
I have run my code under the "minor" test of coder module, and fix all foibles.
git branch and branch name
Comment #5
klausi$imagelink = '<a href="' . $href . '" title="' . $node->title . '">' . $img . '</a>';: you need to sanitize the node title before you output it in the markup. Otherwise you are vulnerable to XSS, see http://drupal.org/node/28984Comment #6
lugir commentedThanks Klausi
Updates:
Comment #7
elc commentedI usually put something like ..
The README.txt file doesn't have an EOL character at the end of it.
Commit messages - providing history and credit.
I think we're at the end of finding any issues with this project. Since this is quite a simple module and you have a few other projects, I'd like to look through any appropriate ones too as this application queue is not only about making a single project good, but making all future full projects you wish to create in the future as good as they can be.
Are any of the following projects that you are thinking of releasing, or just sandbox play things that should be ignored?
Comment #8
lugir commentedHi ELC:
Projects in my sandbox are thinking of releasing, and i also have some modules didn't push to the repository which want to be released too, but considering I'm not familiar with the module release process and some code standards before, I have got a lot work to do before them can pass a review.
I think go through the entire module release process with this ImageLink module will be great helpful for all rest of my contributes, and thanks all of your kind helps.
Thanks
Comment #9
lugir commentedHi ELC:
Here is the updates:
And thanks for your help, I have read Commit messages - providing history and credit and I committed it with improved commit messages :D.
Comment #10
klausiReview of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Please report any bugs to klausi.
manual review:
$imagelink = '<a href="' . $href . '" title="' . check_plain($node->title) . '">' . $img . '</a>';": you should use the l() function to create links.$replacement = '<a href="' . $href . '" title="' . check_plain($node->title) . '">$0</a>';": same hereBut that are minor details, otherwise RTBC for me.
Comment #11
lugir commentedHi Klausi:
Thanks for your review :D
Comment #12
klausi$replacement = '<a href="' . $href . '" title="' . check_plain($node->title) . '">$0</a>';": why can't you use the l() function and pass $0 as the first text parameter?Comment #13
lugir commentedComment #14
doitDave commentedAutomated review (Please keep in mind that this is primarily a high level check that does not replace but, after all, eases the review process. There is no guarantee that no other issues could show up in a more in-depth manual follow-up review.)
Review of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
HTH, dave
Comment #15
lugir commentedOops, forgot run coder test again.
Fixed coder standard, but i can't find which file didn't end with a single line. I have ran PAReview.sh, and it just told "All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting"
But which file?
Comment #16
doitDave commentedManual review:
hth, dave
Comment #17
lugir commentedHi Dave
Thanks :)
Comment #18
doitDave commentedHi, I just updated my review environment and re-run it over your file. Only some small things showed:
Review of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.
HTH, dave
Comment #19
elc commentedThis module used to be almost RTBC. Somehow it got complicated and very inefficient.
If you want to know if something as simple as "<img" is in the body, use strpos or stripos. These are much faster and use much less memory than preg_match_all for something so simple.
The pattern used for the second call should not be split over multiple lines and using double quotes. That's a double whammy and just insanely inefficient for something that will be called for every single node to be viewed. Think of views.
You're using url and l() together when a single call to l() would suffice. l() actually calls url itself. Using alias = TRUE means that it will only return "node/N" style links which isn't very good for SEO either (which seems to be a goal of the module).
Wowser. The number string replacements, regular expressions and string building used here is very large for this task.
I went a little nuts; here's your module re-written into a single function, with only one expensive function call. O(n) instead of O(5n). I'm sure the regex can be tweaked to make it only return the desired unlinked tags which would simplify the internal function to be without the condition.
Hmm... I think I might have just negated the ability to review this module.
Update: didn't check stripos against !== FALSE.
Comment #20
lugir commentedHi:
Thanks
Comment #21
elc commentedThe code I posted was actually a complete replacement for all the code in the module. It wasn't meant to be split into two different functions as it does all the checking in one go.
Also, in posting that I kinda removed anything I can review. I guess I recuse myself from being able to review this application. This module is also pretty small now which doesn't give much for anyone else to review in combination with me rewriting it.
How about changing this over to the http://drupal.org/sandbox/lugir/1170452 project? It looks like you've been following all the suggestions for this module over there (except for version branching .. there's code in the master and the 6.x-1.x branch is called 6.x-1.x-dev which is not a valid branch name for releases .. and having old code in the module commented out .. and setting variables in install instead of as default values, and not deleting variables the correct way .. and INSTALL file is missing .txt extension .. and the admin form should just use drupal_get_form instead of a wrapper function .. and .. well it would be easy to fix up ;) It's a much more substantial module.
Comment #22
lugir commentedheh, I know Taobaoke module need more work to make it following the code standards. Thanks for all your help, I learned a lot of things about contribute to community from imagelink module. I'll improve my code (including Taobaoke module) with all these knowledge :)
ImageLink is a very small module, and for now, most of code in it was re-written by you, but I still want to know is it can be published as a full project? I mean it will help some people who need the ability provided by this module.
Beside this, I'll take your advise and spend more time on Taobaoke module.
Thanks :)
Comment #23
elc commentedThere is a single project promote available which we're trying to use for useful projects which are quite small, or are features modules. That process would make this project a full project, but not provide the ability to promote other projects from sandbox to full projects. By the sounds of it, this seems very much like it would suit this module. You also then get the experience running a full project for the next app.
If I get a few spare moments, I could run through Taobaoke with a bit more of a fine tooth comb. I'm sure that one could be made ready to breeze through here with a few changes.
Comment #24
jthorson commentedIt appears that there have been multiple project applications opened under your username:
Taobaoke: http://drupal.org/node/1176740
ImageLink: http://drupal.org/node/1275104
Comment Name: http://drupal.org/node/1242806
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue.
With this in mind, I have marked your secondary applications as 'closed(duplicate)', and left one application open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one I that I have left open, then please feel free to close the 'open' application as a duplicate, and re-open one of the other project applications which I had closed.
Thanks in advance for your patience and understanding!
Comment #24.0
jthorson commentedUpdate description
Comment #25
avpadernoComment #26
avpadernoComment #27
avpaderno