shorten code + fix conversion (int)

This commit is contained in:
slawkens 2023-02-06 20:25:22 +01:00
parent 4eb9bbbbcf
commit b918f88776
2 changed files with 2 additions and 3 deletions

View File

@ -28,7 +28,7 @@ require_once LIBS . 'changelog.php';
if(!empty($action))
{
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
$id = $_REQUEST['id'] ?? null;
$body = isset($_REQUEST['body']) ? stripslashes($_REQUEST['body']) : null;
$create_date = isset($_REQUEST['createdate']) ? (int)strtotime($_REQUEST['createdate'] ): null;
$player_id = isset($_REQUEST['player_id']) ? (int)$_REQUEST['player_id'] : null;

View File

@ -10,8 +10,7 @@
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Changelog';
$_page = $_GET['page'] ?? 0;
$id = $_GET['id'] ?? 0;
$_page = (int)$_GET['page'] ?? 0;
$limit = 30;
$offset = $_page * $limit;
$next_page = false;