mm looks like I scewed up.
I still believe that the first part must be as I changed it:
if($modx->config[’use_udperms’]==0 || $modx->config[’use_udperms’]=="" || !isset($modx->config[’use_udperms’])) {
because $GLOBALS[’use_udperms’] does not exist as far as I can see.
the 2nd part I only tested with doc groups in place sorry for that.
I still think that the last part the SQL is fine if somhow this part: AND (dg.document_group = $docgrp || sc.privatemgr = 0)"; only comes in to play if usergroups are used and present.
the original part:
AND (1=’’ OR NOT(dgn.private_memgroup<=>1)".(!$docgrp ? "":" OR dg.document_group IN ($docgrp)").");";
alway gave me the same result somehow alway’s TRUE
so maybe someone with real mysql knowledge could redo that part.
there are some more issue’s that I came across involving around the same mysql query in other parts of the core code
Dimmy
-
☆ A M B ☆
- 1,056 Posts
Yep, got the fix committed. A conditional check was put in place to only alter the SQL, when needed.