@@ 178-188 (lines=11) @@ | ||
175 | { |
|
176 | $where = ''; |
|
177 | ||
178 | if ($withperm) { |
|
179 | $where = sprintf(" |
|
180 | WHERE |
|
181 | ( fg.group_id IN (%s) |
|
182 | OR |
|
183 | (fu.user_id = %d AND fg.group_id IN (%s)))", |
|
184 | implode(', ', $this->groups), |
|
185 | $this->user, |
|
186 | implode(', ', $this->groups) |
|
187 | ); |
|
188 | } |
|
189 | ||
190 | if (isset($this->language) && preg_match("/^[a-z\-]{2,}$/", $this->language)) { |
|
191 | $where .= empty($where) ? ' |
@@ 3068-3075 (lines=8) @@ | ||
3065 | implode(', ', $this->groups), |
|
3066 | $this->user, |
|
3067 | implode(', ', $this->groups)); |
|
3068 | } else { |
|
3069 | return sprintf( |
|
3070 | "AND ( fdg.group_id IN (%s) OR (fdu.user_id IN (-1, %d) OR fdg.group_id IN (%s)) )", |
|
3071 | implode(', ', $this->groups), |
|
3072 | $this->user, |
|
3073 | implode(', ', $this->groups) |
|
3074 | ); |
|
3075 | } |
|
3076 | } else { |
|
3077 | if (-1 !== $this->user) { |
|
3078 | return sprintf( |