Skip to content
Permalink
Browse files

Fix public API commit time output

  • Loading branch information
SeinopSys committed Jan 5, 2020
1 parent 6de066e commit ba8c95cdace754d7ec4883bf6e067dcf468aefb3
Showing with 2 additions and 5 deletions.
  1. +1 −4 app/CoreUtils.php
  2. +1 −1 templates/layout/_footer_git_info.html.twig
@@ -547,8 +547,6 @@ public static function getMaxUploadSize($sizes = null):string {
public static function exportVars(array $export):string {
if (empty($export))
return '';
/** @noinspection UnknownInspectionInspection */
/** @noinspection ES6ConvertVarToLetConst */
foreach ($export as $name => $value){
if ($value instanceof RegExp)
$export[$name] = $value->jsExport();
@@ -820,7 +818,7 @@ public static function getFooterGitInfoRaw():array {
if (!empty($commit_info)){
[$commit_id, $commit_time] = explode(';', $commit_info);
$data['commit_id'] = $commit_id;
$data['commit_time'] = Time::tag($commit_time);
$data['commit_time'] = $commit_time;
}

return $data;
@@ -970,7 +968,6 @@ public static function makeSingular(string $w):string {
*/
public static function detectBrowser($user_agent = null) {
$return = ['user_agent' => !empty($user_agent) ? $user_agent : ($_SERVER['HTTP_USER_AGENT'] ?? '')];
/** @noinspection PhpComposerExtensionStubsInspection */
$result = new \WhichBrowser\Parser($return['user_agent']);
if (!empty($result->browser->name)){
$return['browser_name'] = $result->browser->name;
@@ -11,7 +11,7 @@ Running <strong><a href='{{ constant('GITHUB_URL') }}' title='Visit the GitHub r
{{- reload_warning_text }}
{%- endif -%}
{%- if commit_time is defined %}
created {{ commit_time }}
created {{ time_tag(commit_time) }}
{%- else %}
(version information unavailable)
{%- endif -%}

0 comments on commit ba8c95c

Please sign in to comment.
You can’t perform that action at this time.