Skip to content

Commit

Permalink
#1252 Change index topic list behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannick committed Apr 15, 2015
1 parent 77b8006 commit fe1b565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/draw_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ function draw_index_topics_list($section_id) {
if ($section_id != 0)
$result = $db->query('SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$section_id.' ORDER BY sticky DESC, '.$sort_by.', id DESC LIMIT '.$start_from.', '.$luna_user['disp_topics']) or error('Unable to fetch topic IDs', __FILE__, __LINE__, $db->error());
else
$result = $db->query('SELECT t.id FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$luna_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 AND moved_to IS NULL ORDER BY id DESC LIMIT 30') or error('Unable to fetch topic IDs', __FILE__, __LINE__, $db->error());
$result = $db->query('SELECT t.id FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=t.forum_id AND fp.group_id='.$luna_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 AND moved_to IS NULL ORDER BY last_post DESC LIMIT 30') or error('Unable to fetch topic IDs', __FILE__, __LINE__, $db->error());

// If there are topics in this forum
if ($db->num_rows($result)) {
Expand Down

0 comments on commit fe1b565

Please sign in to comment.