From 76834e4c10119b7a7737846b00b86f0c22a0fbd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20OUDOT?= Date: Fri, 27 Dec 2024 14:42:36 +0100 Subject: [PATCH] Use ltb-common getStartDate and getEndDate methods --- composer.json | 2 +- htdocs/display.php | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/composer.json b/composer.json index 23f414b..c15a2d3 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "datatables.net/datatables.net-bs5": "2.0.8", "datatables.net/datatables.net-buttons-bs5": "3.0.2", "fortawesome/font-awesome": "v6.5.2", - "ltb-project/ltb-common": "v0.4.0", + "ltb-project/ltb-common": "v0.4.1", "twbs/bootstrap": "v5.3.2" }, "scripts": { diff --git a/htdocs/display.php b/htdocs/display.php index 22645f3..0f48d7a 100644 --- a/htdocs/display.php +++ b/htdocs/display.php @@ -231,14 +231,8 @@ if ($show_validitystatus) { $isAccountValid = $directory->isAccountValid($ldap, $dn); - if ($use_updatestarttime and isset($entry[0][ $attributes_map['starttime']['attribute'] ])) { - $starttime = $entry[0][ $attributes_map['starttime']['attribute'] ][0]; - $startDate = $directory->getPhpDate( $starttime ); - } - if ($use_updateendtime and isset($entry[0][ $attributes_map['endtime']['attribute'] ])) { - $endtime = $entry[0][ $attributes_map['endtime']['attribute'] ][0]; - $endDate = $directory->getPhpDate( $endtime ); - } + $startDate = $directory->getStartDate($ldap, $dn); + $endDate = $directory->getEndDate($ldap, $dn); } }}}