diff --git a/include/shared-manual.inc b/include/shared-manual.inc index 8bf4552a64..3162728108 100644 --- a/include/shared-manual.inc +++ b/include/shared-manual.inc @@ -380,11 +380,28 @@ function manual_footer($setup): void { } } + $lastUpdate = ''; + if (isset($setup["history"]['modified']) && $setup["history"]['modified'] !== "") { + $modifiedDateTime = date_create($setup["history"]['modified']); + if ($modifiedDateTime !== false) { + $lastUpdate .= "Last updated on " . date_format($modifiedDateTime,"M d, Y (H:i T)"); + $lastUpdate .= (isset($setup["history"]['contributors'][0]) ? " by " . $setup["history"]['contributors'][0] : "") . "."; + } + } + + $contributors = ''; + if (isset($setup["history"]['contributors']) && count($setup["history"]['contributors']) > 0) { + $contributors = 'All contributors.'; + } + echo <<

Improve This Page

+
+ $lastUpdate $contributors +
- Learn how improve this page + Learn How To Improve This PageSubmit a Pull Request • @@ -421,3 +438,25 @@ function relTime(DateTime $date) { } return $out; } + +function contributors($setup) { + if (!isset($_GET["contributors"]) + || !isset($setup["history"]["contributors"]) + || count($setup["history"]["contributors"]) < 1) { + return; + } + + $contributorList = "
  • " . implode("
  • ", $setup["history"]["contributors"]) . "
  • "; + + echo << +

    Output Buffering Control

    + The following have authored commits that contributed to this page: +
      + $contributorList +
    +
    +CONTRIBUTORS; + manual_footer($setup); + exit; +}