PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Classifieds Support > Classifieds Bug Reports

Classifieds Bug Reports Post any problems you may be having with Classifieds here.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old November 24th, 2009, 10:25 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Oct 2009
Posts: 111
is_moderator function always returns true

in pp-inc.php there is a function called is_moderators

The very first test is:
if ( $User['adminedit'] == 1 || $Globals['modprivs'] == "yes" )
return( true );

Meaning... if the user is an admin, return true OR
if $Globals['modprivs'] == "yes" return true

Something seems whacko... the:
$Globals['modprivs'] is defined in the setup as:
Do you want moderators to have global rights?
Set this to NO if you want to assign moderators to specific categories

I wanted my mods to have global rights so I set this to "yes".

Because of this setting and the IF statement in is_moderator.... EVERYONE is being cleared as an "is_moderator".

Talk about MAJOR issues... I have normal members being tagged as an "is_moderator" because of that "$Globals['modprivs']" setting !!!!

I think there needs to be an additional IF in there based on:
$User['moderator'] == 1 )

I changed it to two separate IFs

if ( $User['adminedit'] == 1 )
{
return( true );
}

if ( $User['moderator'] == 1 && $Globals['modprivs'] == "yes" )
{
return( true );
}

.

Last edited by ktmtalk; November 24th, 2009 at 10:32 PM.
ktmtalk is offline   Reply With Quote
Old November 24th, 2009, 10:37 PM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,653
The code below is totally valid. Next in the code it checks category mods. It returns true if the global mod is turned on

Code:
Content visible to verified customers only.
If you also look at the code where is_moderator is set that it is always contained inside an if clause that already has if user is admin or moderator access do this. It is not ran for normal users.

See look how it looks in the code

Code:
Content visible to verified customers only.
I dont see anywhere anyone whom you have not set as having mod access can have mod access.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is offline   Reply With Quote
Old November 24th, 2009, 11:03 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Oct 2009
Posts: 111
Quote:
Originally Posted by Chuck S View Post
The code below is totally valid. Next in the code it checks category mods. It returns true if the global mod is turned on

Code:
Content visible to verified customers only.
If you also look at the code where is_moderator is set that it is always contained inside an if clause that already has if user is admin or moderator access do this. It is not ran for normal users.

See look how it looks in the code

Code:
Content visible to verified customers only.
I dont see anywhere anyone whom you have not set as having mod access can have mod access.
>I dont see anywhere anyone whom you have not set as having mod access can have mod access.

English translation please....

>The code below is totally valid.

it is NOT valid code Chuck... gad... if you have "$Globals['modprivs'] == "yes" ) saying let your mods have global access, the function will ALWAYS return true - it will NEVER get to checking the category mods.

I don't know why I put myself through this... it's like an everyday occurance of one bug after another, and then when it's brought to your attention, it's an arguement.

No docs, no explantion of features, how-to's etc... deleting listings without explaining that it will happen everytime you go into the admin panel... huge chunks of code taken from the photo software making prompts and messages leaving the user with "huh???"

I'm done with this Chuck... this is my last report... from here on out, I'll let you find the bugs.




.
ktmtalk is offline   Reply With Quote
Old November 25th, 2009, 04:54 AM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,653
As I have stated there is no bug.

Break down the logic of the routine.

You are surrounding a function with an if clause like this

Code:
Content visible to verified customers only.
So you know the function never runs unless they are in a usergroup where it has moderators access.

Next in the function you have two things global mods and category mods.

If you have the global mod switch set to yes meaning a moderator can mod every cat then it should be true hense this line.

Code:
Content visible to verified customers only.
The function should return true for is_moderator if global mods is set. Otherwise you go to the next chunk in the code which sets mods per cat.

Your initial post suggests there should be something that checks is the person is a mod and in my initial response I even posted a chunk right from our program and have done so again showing the function your referring to is contained in an if clause saying only do this is $User['moderator'] == 1

So there is no bug here.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.

Last edited by Chuck S; November 25th, 2009 at 08:28 AM.
Chuck S is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get the condition $cats['catimage'] to be true? xtumen How Do I? - vBulletin 3.7x / 3.8x 4 September 1st, 2009 10:46 AM
Uploading Ad returns to step 1 draxx Classifieds Bug Reports 3 June 30th, 2009 08:40 PM
is it true PhotoPost allows you to watermark your pics? Smiggy Photopost Pro How Do I...? 9 November 15th, 2007 12:24 PM
True User Galleries? Exacto How Do I? - vBulletin 3.5.X 15 January 18th, 2006 01:42 AM


All times are GMT -5. The time now is 04:09 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0