Skip to content

Commit 34c43f4

Browse files
committed
Code inspection fixes
1 parent 3ff1926 commit 34c43f4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

textreparser/plugins/clean_old_ideas.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,21 @@ protected function get_records_by_range_query($min_id, $max_id)
7070
{
7171
$columns = $this->get_columns();
7272

73+
$fields = [];
7374
foreach ($columns as $field_name => $column_name)
7475
{
7576
$fields[] = 'p.' . $column_name . ' AS ' . $field_name;
7677
}
7778

78-
// Get the the first post's text for ideas created prior to Sep. 2017
79-
$sql = 'SELECT ' . implode(', ', $fields) . '
79+
// Query the first post's text for ideas created prior to Sep. 2017
80+
return 'SELECT ' . implode(', ', $fields) . '
8081
FROM ' . $this->table . ' p
8182
INNER JOIN ' . $this->ideas_table . ' i
8283
ON i.topic_id = p.topic_id
8384
INNER JOIN ' . $this->topics_table . ' t
8485
ON p.' . $columns['id'] . ' = t.topic_first_post_id
8586
WHERE i.idea_date < ' . strtotime('September 1, 2017') . '
8687
AND i.idea_id BETWEEN ' . $min_id . ' AND ' . $max_id;
87-
88-
return $sql;
8988
}
9089

9190
/**

0 commit comments

Comments
 (0)