From e8de946cd47c4a31f86d1f6be8afdfbacc6ca5b7 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 22 Mar 2021 13:18:39 +0100 Subject: [remoteaccess] Show plugin version --- modules-available/remoteaccess/api.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules-available/remoteaccess/api.inc.php') 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(); -- cgit v1.2.3-55-g7522