mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSaddon::accesslog: Fix PHP < 7.3 compatibility
This commit is contained in:
parent
c0d8f9f81a
commit
75258d9744
1 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ function LSaddon_accesslog_support() {
|
|||
'getEntryAccessLog',
|
||||
'cli_getEntryAccessLog',
|
||||
'Get entry access log',
|
||||
'[entry DN] [page]',
|
||||
'[entry DN] [page]'
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
@ -118,7 +118,7 @@ function getEntryAccessLog($dn) {
|
|||
'reqMod',
|
||||
'reqOld',
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
if (!is_array($data)) {
|
||||
return;
|
||||
|
@ -151,7 +151,7 @@ function getEntryAccessLogPage($dn, $page = false, $nbByPage = 30) {
|
|||
'logs' => array_slice(
|
||||
$_SESSION['entryAccessLogPages'][$dn],
|
||||
$page > 1 ? (($page - 1) * $nbByPage) - 1 : 0,
|
||||
$nbByPage,
|
||||
$nbByPage
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -193,6 +193,6 @@ function cli_getEntryAccessLog($command_args) {
|
|||
$page = isset($command_args[1]) ? intval($command_args[1]) : 1;
|
||||
echo json_encode(
|
||||
getEntryAccessLogPage($dn, $page),
|
||||
JSON_PRETTY_PRINT,
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue