Closed (fixed)
Project:
Comment Count Notify
Version:
6.x-1.0
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2011 at 12:47 UTC
Updated:
5 May 2011 at 09:40 UTC
variable_get('Email', getAdminMail()),
variable_get('From', t('Comment@Count.Notifier')),
variable_get('Subject', t('Your pending Comment count')),
These variable names are far too general.
They should always start with the module name - comment_count_notify - and then end with something descriptive. I suggest instead of "email" you do "recipient_email" so in total comment_count_notify_recipient_email.
A similar review & change needs to be done on all variables in this module.
Comments
Comment #1
gregglesI noticed this function - get_count - which is a problem as well. It should be named something more descriptive like comment_count_notify_get_comment_count.
getAdminMail also has this problem. And I'm not sure "admin email" is descriptive. It's really just the recipient who may or may not be an admin.
All function names should be reviewed: are they descriptive of what is actually happening? Do the function names start with the module name?
Comment #2
fotuzlab commentedGreg,
I have changed the variable and function names.
function getAdminMail(now comment_count_notify_get_admin_mail) is descriptive of what it does. It retrieves the site admin's or uid=1's email for the default value for the field named comment_count_notify_recipent_mail(erstwhile email). It has already been commented appropriately.
Kindly review it.
Comment #3
gregglesThis looks "fixed" to me - thanks!
Comment #4
fotuzlab commented