Danke für deine Hilfe. Ich habe das mal in der v.2.2.7 gesucht: /core/recenttopics.php
Code: Alles auswählen
/**
* Event to modify the SQL query before the allowed topics list data is retrieved
*
* @event paybas.recenttopics.sql_pull_topics_list
* @var array sql_array The SQL array
* @since 2.0.4
*/
$vars = array('sql_array');
extract($this->dispatcher->trigger_event('paybas.recenttopics.sql_pull_topics_list', compact($vars)));
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query_limit($sql, $total_topics_limit);
if ($result != null)
{
$rtstart = min((int) $result->num_rows - 1 , $rtstart);
}
else
{
$rtstart = 0;
}
while ($row = $this->db->sql_fetchrow($result))
{
$topics_count++;
if (($topics_count > $rtstart) && ($topics_count <= ($rtstart + $topics_per_page)))
{
$this->topic_list[] = $row['topic_id'];
$rowset[$row['topic_id']] = $row;
if (!isset($this->forums[$row['forum_id']]) && $this->user->data['is_registered'] && $this->config['load_db_lastread'])
{
$this->forums[$row['forum_id']]['mark_time'] = $row['f_mark_time'];
}
$this->forums[$row['forum_id']]['topic_list'][] = $row['topic_id'];
$this->forums[$row['forum_id']]['rowset'][$row['topic_id']] = & $rowset[$row['topic_id']];
if ($row['icon_id'])
{
$this->obtain_icons = true;
}
}
}
$this->db->sql_freeresult($result);
}
return $topics_count;
}
und mit folgenden Block aus der v.2.2.8 geändert:
Code: Alles auswählen
/**
* Event to modify the SQL query before the allowed topics list data is retrieved
*
* @event paybas.recenttopics.sql_pull_topics_list
* @var array sql_array The SQL array
* @since 2.0.4
*/
$vars = array('sql_array');
extract($this->dispatcher->trigger_event('paybas.recenttopics.sql_pull_topics_list', compact($vars)));
//count topics
$count_sql_array = $sql_array;
$count_sql_array['SELECT'] = 'COUNT(t.topic_id) as topic_count';
unset($count_sql_array['ORDER_BY']);
$sql = $this->db->sql_build_query('SELECT', $count_sql_array);
$result = $this->db->sql_query($sql);
$num_rows = (int) $this->db->sql_fetchfield('topic_count', $result);
$this->db->sql_freeresult($result);
//load topics list
$sql = $this->db->sql_build_query('SELECT', $sql_array);
$result = $this->db->sql_query_limit($sql, $total_topics_limit);
if ($result != null)
{
$rtstart = min($num_rows - 1 , $rtstart);
}
else
{
$rtstart = 0;
}
while ($row = $this->db->sql_fetchrow($result))
{
$topics_count++;
if (($topics_count > $rtstart) && ($topics_count <= ($rtstart + $topics_per_page)))
{
$this->topic_list[] = $row['topic_id'];
$rowset[$row['topic_id']] = $row;
if (!isset($this->forums[$row['forum_id']]) && $this->user->data['is_registered'] && $this->config['load_db_lastread'])
{
$this->forums[$row['forum_id']]['mark_time'] = $row['f_mark_time'];
}
$this->forums[$row['forum_id']]['topic_list'][] = $row['topic_id'];
$this->forums[$row['forum_id']]['rowset'][$row['topic_id']] = & $rowset[$row['topic_id']];
if ($row['icon_id'])
{
$this->obtain_icons = true;
}
}
}
$this->db->sql_freeresult($result);
}
return $topics_count;
}