Быстрый лёгкий надёжный форумный движок
Вы не вошли.
Страницы 1
Что в версии 1.4.2 и ниже, что в версии 1.4.3 во viewtopic.php расчет страницы темы через номер сообщения сортируется через время сообщений:
// If a post ID is specified we determine topic ID and page number so we can redirect to the correct message
if ($pid)
{
$result = $db->query('SELECT topic_id, posted FROM '.$db->prefix.'posts WHERE id='.$pid) or error(__FILE__, __LINE__);
if (!$db->num_rows($result))
message($lang_common['Bad request']);
list($id, $posted) = $db->fetch_row($result);
// Determine on what page the post is located (depending on $forum_user['disp_posts'])
$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'posts WHERE topic_id='.$id.' AND posted<'.$posted) or error(__FILE__, __LINE__);
$num_posts = $db->result($result) + 1;
$_GET['p'] = ceil($num_posts / $pun_user['disp_posts']);
}
а вывод сообщений на страницу сортируется по номеру сообщения:
// Retrieve a list of post IDs, LIMIT is (really) expensive so we only fetch the IDs here then later fetch the remaining data
$result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$id.' ORDER BY id LIMIT '.$start_from.','.$pun_user['disp_posts']) or error('Unable to fetch post IDs', __FILE__, __LINE__, $db->error());
Я им пытался объснить, что posted тут вообще не нужен, но они видать меня не понимают
Моя сборка FluxBB 1.5, ForkBB · сообщество
Offline
Страницы 1