forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: ph23man on December 03, 2003, 08:02:39 am

Title: BUG: comments being sent to admin even if NO is specified
Post by: ph23man on December 03, 2003, 08:02:39 am
I have cpgnuke 1.2.0 rc4 installed on phpnuke 6.9 and I am getting comments emailed to me even though I have "No" specified in the config section for "Email site admin upon comment submission."

How can I stop these emails?
Title: BUG: comments being sent to admin even if NO is specified
Post by: gtroll on December 03, 2003, 01:33:55 pm
strange we don't have this problem with any of our testing setups...
to stop emails anyway..
find in db_input.php
Code: [Select]
if ($CONFIG['email_comment_notification']) {
                $mail_body = $msg_body . "\n\r See it at http://" . $_SERVER["SERVER_NAME"] . "/" . $redirect;
                cpg_mail($CONFIG['gallery_admin_email'], $lang_db_input_php['email_comment_subject'], $mail_body);
            }
replace with
Code: [Select]
if ($CONFIG['email_comment_notification']) {
                $mail_body = $msg_body . "\n\r See it at http://" . $_SERVER["SERVER_NAME"] . "/" . $redirect;
                //cpg_mail($CONFIG['gallery_admin_email'], $lang_db_input_php['email_comment_subject'], $mail_body);
            }
Title: BUG: comments being sent to admin even if NO is specified
Post by: ph23man on December 04, 2003, 03:19:39 am
I've figured out the source of the problem. The config form only updates the value for the field "comment_email_notification" while the db_input.php file looks for the value for "email_comment_notification".

So that's why changing the option to No didn't do anything. I looked in the database and it seems both these fields are present. I don't think it's just me because I did a clean install and didn't change anything.
Title: BUG: comments being sent to admin even if NO is specified
Post by: whey on December 04, 2003, 06:05:25 am
Quote from: "ph23man"
I've figured out the source of the problem. The config form only updates the value for the field "comment_email_notification" while the db_input.php file looks for the value for "email_comment_notification".



It's not just you, I noticed the same thing (and have the same issue).  I'm not sure what the difference is between the two, and if the handle duplicate or separate functions.
Title: BUG: comments being sent to admin even if NO is specified
Post by: gtroll on December 04, 2003, 06:06:52 am
thanks, I fixed this once b4 and will make sure this doen't get in rc5, which will be out in a couple hours barring any new probs :lol:
:idea:  comment_email_notification is the right one...change in db_input.php and delete email_comment_notification from db