diff --git a/html/forum/forum.php b/html/forum/forum.php index d417c87e78..cfdb01e37c 100644 --- a/html/forum/forum.php +++ b/html/forum/forum.php @@ -3,23 +3,49 @@ require_once('../include.php'); require_once('forum.inc'); doHeader('Forum'); +// Number of forum topics per page. $n = 50; /* sanitize variable */ $_GET['id'] = stripslashes(strip_tags($_GET['id'])); +// Is this sanitization stuff really necessary? +$_GET['sort'] = stripslashes(strip_tags($_GET['sort'])); if (!array_key_exists('start', $_GET) || $_GET['start'] < 0) $_GET['start'] = 0; + +$sort_style = $_GET['sort']; +if ($sort_style == NULL) { + $sort_style = 'modified-new'; +} + $forum = getForum($_GET['id']); ?> +
threads > $n): $totalPages = floor($forum->threads / $n); @@ -74,14 +100,14 @@ endif;