Fix public client IP extraction and hide duplicate footer creation date

- Enhance RequestLogger::getClientIp() with 2-pass detection prioritizing public IPs over proxy/internal IPs
- Hide footer creation date when identical to modification date to prevent duplicate date display
- Improve AdminAuth log helper and footer template tooltips
This commit is contained in:
2026-07-28 17:11:00 +02:00
parent 0626e8c6cc
commit e2d9ddd516
4 changed files with 47 additions and 21 deletions
+6
View File
@@ -478,9 +478,13 @@ class CodePressCMS {
$created = date('d-m-Y H:i', $createdTimestamp);
}
// Show created date only if it is distinctly different from modified date
$showCreated = ($created !== $modified);
return [
'created' => $created,
'modified' => $modified,
'show_created' => $showCreated,
'size' => $this->formatFileSize($stats['size'])
];
}
@@ -1151,10 +1155,12 @@ class CodePressCMS {
if (isset($page['file_info'])) {
$templateData['created'] = htmlspecialchars($page['file_info']['created']);
$templateData['modified'] = htmlspecialchars($page['file_info']['modified']);
$templateData['show_created'] = !empty($page['file_info']['show_created']);
$templateData['file_info_block'] = true;
} else {
$templateData['created'] = '';
$templateData['modified'] = '';
$templateData['show_created'] = false;
$templateData['file_info_block'] = false;
}