@@ 198-210 (lines=13) @@ | ||
195 | { |
|
196 | $where = ''; |
|
197 | ||
198 | if ($withPermission) { |
|
199 | $where = sprintf(' |
|
200 | WHERE |
|
201 | ( fg.group_id IN (%s) |
|
202 | OR |
|
203 | (fu.user_id = %d AND fg.group_id IN (%s))) |
|
204 | AND |
|
205 | fc.active = 1', |
|
206 | implode(', ', $this->groups), |
|
207 | $this->user, |
|
208 | implode(', ', $this->groups) |
|
209 | ); |
|
210 | } |
|
211 | ||
212 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
|
213 | $where .= empty($where) ? ' |
@@ 294-301 (lines=8) @@ | ||
291 | implode(', ', $this->groups), |
|
292 | $this->user, |
|
293 | implode(', ', $this->groups)); |
|
294 | } else { |
|
295 | return sprintf( |
|
296 | 'AND ( fdg.group_id IN (%s) OR (fdu.user_id = %d OR fdg.group_id IN (%s)) )', |
|
297 | implode(', ', $this->groups), |
|
298 | $this->user, |
|
299 | implode(', ', $this->groups) |
|
300 | ); |
|
301 | } |
|
302 | } else { |
|
303 | if (-1 !== $this->user) { |
|
304 | return sprintf( |