mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-26 09:44:26 +02:00
Fixing the following bugs:
#8444 (language dependent buttons no longer include the dimensions to allow bigger/smaller translated images) #8414 #8396 #8388 #8216 thanks to bartvb and kellanved for providing possible fixes... git-svn-id: file:///svn/phpbb/trunk@7114 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -405,20 +405,31 @@ $sql_array = array(
|
||||
// the number of stickies are not known
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$sql = str_replace('{SQL_TOPIC_TYPE}', ($store_reverse) ? POST_NORMAL : POST_STICKY, $sql);
|
||||
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
|
||||
$result = $db->sql_query_limit($sql, $sql_limit);
|
||||
|
||||
$shadow_topic_list = array();
|
||||
|
||||
// Total number of normal or sticky topics that have been retrieved
|
||||
$start_count = 0;
|
||||
|
||||
// Number of normal or sticky topics that have been placed
|
||||
$num_rows = 0;
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
$shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
|
||||
}
|
||||
$start_count++;
|
||||
|
||||
$rowset[$row['topic_id']] = $row;
|
||||
$topic_list[] = $row['topic_id'];
|
||||
$num_rows++;
|
||||
if ($start_count >= $sql_start)
|
||||
{
|
||||
if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
$shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
|
||||
}
|
||||
|
||||
$rowset[$row['topic_id']] = $row;
|
||||
$topic_list[] = $row['topic_id'];
|
||||
$num_rows++;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -427,7 +438,9 @@ if ($num_rows < $sql_limit)
|
||||
{
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$sql = str_replace('{SQL_TOPIC_TYPE}', ($store_reverse) ? POST_STICKY : POST_NORMAL, $sql);
|
||||
$result = $db->sql_query_limit($sql, $sql_limit - $num_rows, $sql_start);
|
||||
|
||||
// Start at $sql_start - number of sticky topics on the previous page ($start_count - $num_rows)
|
||||
$result = $db->sql_query_limit($sql, $sql_limit - $num_rows, $sql_start - ($start_count - $num_rows));
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
|
Reference in New Issue
Block a user