diff options
author | Simon Rettberg | 2021-03-22 13:18:39 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-03-22 13:18:39 +0100 |
commit | e8de946cd47c4a31f86d1f6be8afdfbacc6ca5b7 (patch) | |
tree | 13859ce202fed7b219d36dd0c141ea2400e3e0cd /modules-available/remoteaccess/api.inc.php | |
parent | index.php: Minor formatting changes (diff) | |
download | slx-admin-e8de946cd47c4a31f86d1f6be8afdfbacc6ca5b7.tar.gz slx-admin-e8de946cd47c4a31f86d1f6be8afdfbacc6ca5b7.tar.xz slx-admin-e8de946cd47c4a31f86d1f6be8afdfbacc6ca5b7.zip |
[remoteaccess] Show plugin version
Diffstat (limited to 'modules-available/remoteaccess/api.inc.php')
-rw-r--r-- | modules-available/remoteaccess/api.inc.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules-available/remoteaccess/api.inc.php b/modules-available/remoteaccess/api.inc.php index 4ce733b3..7983bd44 100644 --- a/modules-available/remoteaccess/api.inc.php +++ b/modules-available/remoteaccess/api.inc.php @@ -29,6 +29,16 @@ if ($iplong < $range['start'] || $iplong > $range['end']) { die('Access denied'); } +$headers = getallheaders(); +$version = false; +if (!empty($headers['Bwlp-Plugin-Build-Revision'])) { + $version = $headers['Bwlp-Plugin-Build-Revision']; + if (!empty($headers['Bwlp-Plugin-Build-Timestamp'])) { + $version .= ' (' . $headers['Bwlp-Plugin-Build-Timestamp'] . ')'; + } +} +Property::set(RemoteAccess::PROP_PLUGIN_VERSION, $version, 2880); + Header('Content-Type: application/json'); $remoteLocations = RemoteAccess::getEnabledLocations(); |