miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

Is the $xtr function call to getClForums needed in bb_func_vthread.php file?

 
Author tom322
Active Member
#1 | Posted: 9 Jun 2019 01:39 
I have a quick question regarding a line of code in bb_func_vthread.php. In the "/* User info in posts */" section of the code there is this line:

$xtr=getClForums($userInfo,'where','',$dbUserId,'or','=');
(and the associated):

unset($xtr);
My question - is this line needed? Because from what I checked, it only produces a list of user_ids of the posters in the thread, like:

where (user_id=505 or user_id=0 or user_id=44 or user_id=181 or user_id=128 or user_id=109 or user_id=123)
I don't understand why it would be ever needed to call this getClForums function on action='vthread' pages (within the user info posts).. When I commented these lines, everything seemed to work the same.. (even though I have closed forum) and without these lines the script would be a little faster since it won't call this getClForums function? Thank you.

Author tom322
Active Member
#2 | Posted: 9 Jun 2019 03:46 
Ok, I got it now - what it is now is surely correct (without this $xtr condition the script would have to go through all users instead of just those who posted in this topic : ).

Author Paul
Lead Developer 
#3 | Posted: 9 Jun 2019 12:29 
tom322
Yes, and thus $xtr is used in another requests, so its value should not cross with them (that's why it's unset after the request is completed).

Master Class miniBB Support Forums / Master Class /
 Is the $xtr function call to getClForums needed in bb_func_vthread.php file?
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑