diff options
-rw-r--r-- | modules-available/remoteaccess/api.inc.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules-available/remoteaccess/api.inc.php b/modules-available/remoteaccess/api.inc.php index 7983bd44..859f5cfe 100644 --- a/modules-available/remoteaccess/api.inc.php +++ b/modules-available/remoteaccess/api.inc.php @@ -32,9 +32,16 @@ if ($iplong < $range['start'] || $iplong > $range['end']) { $headers = getallheaders(); $version = false; if (!empty($headers['Bwlp-Plugin-Build-Revision'])) { - $version = $headers['Bwlp-Plugin-Build-Revision']; + $version = substr($headers['Bwlp-Plugin-Build-Revision'], 0, 6); if (!empty($headers['Bwlp-Plugin-Build-Timestamp'])) { - $version .= ' (' . $headers['Bwlp-Plugin-Build-Timestamp'] . ')'; + $ts = $headers['Bwlp-Plugin-Build-Timestamp']; + if (is_numeric($ts)) { + if ($ts > 9999999999) { + $ts = round($ts / 1000); + } + $ts = date('d.m.Y H:i', $ts); + } + $version .= ' (' . $ts . ')'; } } Property::set(RemoteAccess::PROP_PLUGIN_VERSION, $version, 2880); |