From 683054dc3ceaf63833ec6edc745e942aa7be9834 Mon Sep 17 00:00:00 2001 From: Olivier Berten Date: Sun, 7 Mar 2021 08:42:54 +0100 Subject: [PATCH] Updates by author --- updates.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/updates.php b/updates.php index ce61002..dec762e 100644 --- a/updates.php +++ b/updates.php @@ -7,10 +7,17 @@ if(array_key_exists("days", $_GET)) { $l = 15; } -$title = 'Updates in the last '.$l.' days'; +if(array_key_exists("user", $_GET)) { + $u = intval($_GET['user']); + $user_info = get_userdata($u); +} else { + $u = False; +} + +$title = 'Updates in the last '.$l.' days'.($u?' by '.$user_info->display_name:''); include('include/header.php'); echo "

$title

\n"; -$sql1 = 'SELECT * FROM '.db('changesets').' WHERE `time` > '.(time() - ($l*24*60*60)).' ORDER BY `time` DESC'; +$sql1 = 'SELECT * FROM '.db('changesets').' WHERE `time` > '.(time() - ($l*24*60*60)).($u?' AND user_id = '.$u:'').' ORDER BY `time` DESC'; $req1 = $mysqli->query($sql1) or die('Erreur SQL !
'.$sql1.'
'.$mysqli->error); $mod = array(); while($m = $req1->fetch_assoc()) {