@CheeSie, I have modified the code with some of your suggestions, however, it might be worth me pointing out that with your suggestions came a few problems...
1) Private Disputes were broken if Extra Privacy wasn't enabled by the change to "LAM - No Permission Message (View)". A user was able to enter a thread they were not allowed to participate in instead of being shown the error message.
2) Optional Disputes were broken by the change to "LAM - Hide Thread Completely (Extra Privacy)" because it couldn't cope with threads that had no disputes values set. If you also had Global Disputes enabled you'd be in a right mess as all your threads would disappear from every forum if Extra Privacy was enabled! This is why the ="" and is NULL checks where in the original SQL.
3) Not all dispute users where correctly identified because IN (LAM_DisputeResolution) would only match against the first user in the list. You needed to use FIND_IN_SET instead.
|