@@ -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 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $this->ptemplate->assign_block_vars('postrow.attachment', array( |
141 | 141 | 'DISPLAY_ATTACHMENT' => $attachment, |
142 | 142 | 'EXTENSION_GROUP' => $extensions[$row['extension']]['group_name'], |
143 | - 'U_VIEWTOPIC' => append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "t=$topic_id&p=$post_id") . '#p' . $post_id, |
|
143 | + 'U_VIEWTOPIC' => append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "t=$topic_id&p=$post_id").'#p'.$post_id, |
|
144 | 144 | )); |
145 | 145 | } |
146 | 146 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | private function get_posts_data() |
153 | 153 | { |
154 | 154 | $topic_ids = $post_ids = array(); |
155 | - ${$this->settings['ids_type'] . '_ids'} = array_filter(explode(',', $this->settings['ids'])); |
|
155 | + ${$this->settings['ids_type'].'_ids'} = array_filter(explode(',', $this->settings['ids'])); |
|
156 | 156 | $range_info = $this->date_range->get($this->settings['date_range']); |
157 | 157 | |
158 | 158 | $sql_array = $this->forum_data->query(false) |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | ->get_sql_array(); |
165 | 165 | |
166 | 166 | $sql_array['SELECT'] = ''; |
167 | - $sql_array['WHERE'] .= ' AND p.topic_id = t.topic_id AND p.post_attachment <> 0' . (($this->settings['first_only']) ? ' AND p.post_id = t.topic_first_post_id' : ''); |
|
167 | + $sql_array['WHERE'] .= ' AND p.topic_id = t.topic_id AND p.post_attachment <> 0'.(($this->settings['first_only']) ? ' AND p.post_id = t.topic_first_post_id' : ''); |
|
168 | 168 | |
169 | 169 | return $this->forum_data->get_post_data(false, $post_ids, $this->settings['limit'], 0, $sql_array); |
170 | 170 | } |