Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
Who's Online
3 Registered (blaaskaak, 2 invisible), 19 Guests and 17 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
Gizmo 11670
Rick 7543
Ian 4099
Mark S 3969
ntdoc 3101
Sirdude 2041
jgeoff 1876
David Dreezer 1748
driv 1552
AllenAyres 1519
Latest Photos
Carrie - So Very
Testing
Test Photo
4TH of July at the river!
Test shots from D300 part 3
Topic Options
Rate This Topic
#192428 - 07/22/07 01:35 PM [FIXED for 7.3] [7.2] Admin+Moderator=2 notifies
blaaskaak Online   content


Registered: 08/30/06
Posts: 1209
Loc: Breda, NL
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
 Code:
	        $notify_array[] = $admin;;


into:

 Code:
	        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.
_________________________

Top
#192542 - 07/23/07 09:00 AM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Rick Administrator Offline

*****

Registered: 06/04/06
Posts: 7543
Loc: Aberdeen, WA
Thanks for the fix. Also made the change to remove the duplicate code.
_________________________
UBB.threads™ Developer
My Personal Website · StogieSmokers.com

Top
#192792 - 07/25/07 04:25 AM Re: [7.2] Admin+Moderator=2 notifies [Re: Rick]
blaaskaak Online   content


Registered: 08/30/06
Posts: 1209
Loc: Breda, NL
 Originally Posted By: Rick
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.
_________________________

Top
#192839 - 07/25/07 04:20 PM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Gizmo Moderator Offline


Registered: 06/04/06
Posts: 11670
Loc: Portland, OR; USA
I have a comment on that, why use user2? We have a superadmin field, why not use this?
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#192881 - 07/25/07 11:28 PM Re: [7.2] Admin+Moderator=2 notifies [Re: Gizmo]
blaaskaak Online   content


Registered: 08/30/06
Posts: 1209
Loc: Breda, NL
 Originally Posted By: Gizmo
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.
_________________________

Top
#192888 - 07/26/07 12:19 AM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Gizmo Moderator Offline


Registered: 06/04/06
Posts: 11670
Loc: Portland, OR; USA
Ahh, well, then I'd say that'd be the admin's fault for not populating that field...
_________________________
UGN Security, Elite Web Gamers & VNC Web Design Owner
Longtime UBB Supporter, UBB7 Beta Tester & Resident Post-A-Holic

Top
#198669 - 10/04/07 01:31 PM Re: [7.2] Admin+Moderator=2 notifies [Re: Gizmo]
blaaskaak Online   content


Registered: 08/30/06
Posts: 1209
Loc: Breda, NL
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.
_________________________

Top
#200916 - 11/08/07 05:21 PM Re: [7.2] Admin+Moderator=2 notifies [Re: blaaskaak]
Sirdude Moderator Offline


Registered: 04/19/07
Posts: 2041
Loc: SoCal, USA
el fixo for 7.3 \:\)

also there is a dupe email check. \:\)
_________________________

A taxpayer voting for Obama is like a chicken voting for Colonel Sanders.

Top


Shout Box

Recent Topics
Import UBB classic from to UBB threads runs on a new server
by Hari Varma
Today at 06:30 AM
Import UBB classic 6.7.2 to UBB threads 7.3.1
by MrVasu
Today at 12:44 AM
File Attachment problem
by Murphdog
Yesterday at 07:44 PM
group_foumperms.php Hangs
by mmem700
Yesterday at 05:58 AM
What causes this message to pop up?
by Larry Miller
Yesterday at 04:13 AM
Forum Stats
4010 Members
33 Forums
30825 Topics
156535 Posts

Max Online: 978 @ 06/24/07 08:19 PM