From 73175e2b64c85c7a8c528c76452cd82ffa99f925 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 28 Aug 2017 16:21:10 +0200 Subject: #337: Added routing --- includes/pages/user_news.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'includes/pages/user_news.php') diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php index 9bdcb6fb..2dd141ec 100644 --- a/includes/pages/user_news.php +++ b/includes/pages/user_news.php @@ -35,8 +35,8 @@ function user_meetings() $html = '

' . meetings_title() . '

' . msg(); $request = request(); - if ($request->has('page') && preg_match('/^\d{1,}$/', $request->input('page'))) { - $page = $request->input('page'); + if (preg_match('/^\d{1,}$/', $request->input('page', 0))) { + $page = $request->input('page', 0); } else { $page = 0; } @@ -57,14 +57,14 @@ function user_meetings() $dis_rows = ceil(count(DB::select('SELECT `ID` FROM `News`')) / $display_news); $html .= '
' . '
    '; for ($i = 0; $i < $dis_rows; $i++) { - if ($request->has('page') && $i == $request->input('page')) { + if ($request->has('page') && $i == $request->input('page', 0)) { $html .= '
  • '; } elseif (!$request->has('page') && $i == 0) { $html .= '
  • '; } else { $html .= '
  • '; } - $html .= '' . ($i + 1) . '
  • '; + $html .= '' . ($i + 1) . ''; } $html .= '
'; @@ -89,7 +89,7 @@ function display_news($news) $html .= '