Code Duplication    Length = 4-4 lines in 2 locations

root/directory.php 1 location

@@ 499-502 (lines=4) @@
496
	}
497
498
	// Make sure $start is set to the last page if it exceeds the amount
499
	if ($start < 0 || $start > $nb_links)
500
	{
501
		$start = ($start < 0) ? 0 : floor(($nb_links - 1) / $config['dir_show']) * $config['dir_show'];
502
	}
503
504
	$categorie->display();
505

root/directory_comment.php 1 location

@@ 192-195 (lines=4) @@
189
$nb_comments = (int) $db->sql_fetchfield('nb_comments');
190
$db->sql_freeresult($result);
191
192
if ($start < 0 || $start >= $nb_comments)
193
{
194
	$start = ($start < 0) ? 0 : floor(($nb_comments - 1) / $config['dir_comments_per_page']) * $config['dir_comments_per_page'];
195
}
196
197
$sql_array = array(
198
	'SELECT'	=> 'a.comment_id, a.comment_user_id, a. comment_user_ip, a.comment_date, a.comment_text, a.comment_uid, a.comment_bitfield, a.comment_flags, u.username, u.user_id, u.user_colour, z.foe',