(SELECT COUNT(DISTINCT vote_user_id) FROM ".$this->databasePrefix."poll_votes votes WHERE votes.topic_id = topic.topic_id) AS poll_votes
FROM ".$this->databasePrefix."topics topic
WHERE poll_start <> ?
- ORDER BY topic_id ASC";
+ ORDER BY topic_id";
$statement = $this->database->prepareStatement($sql, $limit, $offset);
- $statement->execute(array('post'));
+ $statement->execute(array(0));
while ($row = $statement->fetchArray()) {
ImportHandler::getInstance()->getImporter('com.woltlab.wbb.poll')->import($row['topic_id'], array(
'objectID' => $row['topic_first_post_id'],