summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-12-30 09:46:01 +0300
committerAndrew Dolgov <[email protected]>2022-12-30 09:46:01 +0300
commit9c0ead364042a4a46c4ab44a58b83ccda7ce3d36 (patch)
tree69385da94725f5098274e5c79e8430b0852386aa /classes
parent4c941391135e19d8eb0b368e902480deb1a0ac23 (diff)
show full commit timestamp with version information in prefs footer
Diffstat (limited to 'classes')
-rw-r--r--classes/config.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/classes/config.php b/classes/config.php
index ab31bc860..9a8b466ab 100644
--- a/classes/config.php
+++ b/classes/config.php
@@ -299,6 +299,13 @@ class Config {
return self::get_instance()->_get_version($as_string);
}
+ // returns version showing (if possible) full timestamp of commit id
+ static function get_version_html() : string {
+ $version = self::get_version(false);
+
+ return sprintf("<span title=\"%s\">%s</span>", date("Y-m-d H:i:s", ($version['timestamp'] ?? 0)), $version['version']);
+ }
+
/**
* @return array<string, mixed>|string
*/
@@ -363,7 +370,7 @@ class Config {
if ($check == "version") {
- $rv["version"] = date("y.m", (int)$timestamp) . "-$commit";
+ $rv["version"] = sprintf("%s-%s", date("y.m", (int)$timestamp), $commit);
$rv["commit"] = $commit;
$rv["timestamp"] = $timestamp;