mirror of
https://github.com/getgrav/grav.git
synced 2026-07-05 16:49:18 +02:00
Include modulars for last modification date computation (#3562)
* Include modulars for last modification date computation Fix #3561 * use ->modified() --------- Co-authored-by: Andy Miller <1084697+rhukster@users.noreply.github.com>
This commit is contained in:
@@ -613,7 +613,15 @@ class Page implements PageInterface
|
||||
|
||||
// Set Last-Modified header
|
||||
if ($this->lastModified()) {
|
||||
$last_modified_date = gmdate('D, d M Y H:i:s', $this->modified()) . ' GMT';
|
||||
$last_modified = $this->modified();
|
||||
foreach ($this->children()->modular() as $cpage) {
|
||||
$modular_mtime = $cpage->modified();
|
||||
if ($modular_mtime > $last_modified) {
|
||||
$last_modified = $modular_mtime;
|
||||
}
|
||||
}
|
||||
|
||||
$last_modified_date = gmdate('D, d M Y H:i:s', $last_modified) . ' GMT';
|
||||
$headers['Last-Modified'] = $last_modified_date;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user