|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
When you are admin and set the option "Do you want to be notified when a user uses the Notify Post option? Normally these are just sent to Moderators." you get double notifies if you are also set as moderator for a certain forum. Not unlikely to set yourself as moderator for visibibility reasons. my fix? change
$notify_array[] = $admin;;
into: if (!in_array($admin,$notify_array)) { $notify_array[] = $admin; }; You can also save a bit of duplicate code in there for the e-mailing by checking for an empty array, and if so, add the main admin id to the array.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Thanks for the fix. Also made the change to remove the duplicate code.
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
Thanks for the fix. Also made the change to remove the duplicate code. I saw in the code if the main admin was not set, it would just take number 2, without a check if it was an admin or not. I would suggest a query that takes the first admin user from the userlist. At our board user number 2 is an ex-admin who left.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
I have a comment on that, why use user2? We have a superadmin field, why not use this?
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
I have a comment on that, why use user2? We have a superadmin field, why not use this? If you look at the code, it takes the super admin field, but if that field is not set, it will take blindly user #2, without any check if it's an admin or not.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
Ahh, well, then I'd say that'd be the admin's fault for not populating that field...
|
|
|
|
Joined: Aug 2006
Posts: 1,358
Veteran
|
Veteran
Joined: Aug 2006
Posts: 1,358 |
It's not copy/pasted right for 7.2.2 Rick.
while(list($admin) = $dbh->fetch_array($sth)) { if (!in_array(admin,$notify_array)) {
It's missing a $ there.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
el fixo for 7.3 also there is a dupe email check.
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
0 members (),
541
guests, and
181
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|