@@ -235,8 +235,7 @@ |
||
235 | 235 | if (sizeof($post_ids)) |
236 | 236 | { |
237 | 237 | return $this->db->sql_in_set('p.post_id', array_map('intval', $post_ids)); |
238 | - } |
|
239 | - else if (sizeof($this->store['topic'])) |
|
238 | + } else if (sizeof($this->store['topic'])) |
|
240 | 239 | { |
241 | 240 | $this->_limit_posts_by_topic($sql_where, $topic_first_or_last_post); |
242 | 241 | } |
@@ -77,10 +77,10 @@ |
||
77 | 77 | protected function get_attachment_sql(array $attach_ids, array $allowed_extensions, $exclude_in_message, $order_by) |
78 | 78 | { |
79 | 79 | return 'SELECT * |
80 | - FROM ' . ATTACHMENTS_TABLE . ' |
|
81 | - WHERE ' . $this->db->sql_in_set('post_msg_id', array_map('intval', $attach_ids)) . |
|
82 | - (($exclude_in_message) ? ' AND in_message = 0' : '') . |
|
83 | - (sizeof($allowed_extensions) ? ' AND ' . $this->db->sql_in_set('extension', $allowed_extensions) : '') . ' |
|
80 | + FROM ' . ATTACHMENTS_TABLE.' |
|
81 | + WHERE ' . $this->db->sql_in_set('post_msg_id', array_map('intval', $attach_ids)). |
|
82 | + (($exclude_in_message) ? ' AND in_message = 0' : ''). |
|
83 | + (sizeof($allowed_extensions) ? ' AND '.$this->db->sql_in_set('extension', $allowed_extensions) : '').' |
|
84 | 84 | ORDER BY ' . $order_by; |
85 | 85 | } |
86 | 86 | } |