| @@ 189-201 (lines=13) @@ | ||
| 186 | { |
|
| 187 | $where = ''; |
|
| 188 | ||
| 189 | if ($withPermission) { |
|
| 190 | $where = sprintf(' |
|
| 191 | WHERE |
|
| 192 | ( fg.group_id IN (%s) |
|
| 193 | OR |
|
| 194 | (fu.user_id = %d AND fg.group_id IN (%s))) |
|
| 195 | AND |
|
| 196 | fc.active = 1', |
|
| 197 | implode(', ', $this->groups), |
|
| 198 | $this->user, |
|
| 199 | implode(', ', $this->groups) |
|
| 200 | ); |
|
| 201 | } |
|
| 202 | ||
| 203 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
|
| 204 | $where .= empty($where) ? ' |
|
| @@ 3328-3335 (lines=8) @@ | ||
| 3325 | implode(', ', $this->groups), |
|
| 3326 | $this->user, |
|
| 3327 | implode(', ', $this->groups)); |
|
| 3328 | } else { |
|
| 3329 | return sprintf( |
|
| 3330 | 'AND ( fdg.group_id IN (%s) OR (fdu.user_id = %d OR fdg.group_id IN (%s)) )', |
|
| 3331 | implode(', ', $this->groups), |
|
| 3332 | $this->user, |
|
| 3333 | implode(', ', $this->groups) |
|
| 3334 | ); |
|
| 3335 | } |
|
| 3336 | } else { |
|
| 3337 | if (-1 !== $this->user) { |
|
| 3338 | return sprintf( |
|