From 4dd3839c41e18d9724855e7955d8737b6f52dcd6 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 10 May 2016 21:46:04 -0700 Subject: provide repository versions on admin summary page and an upgrade message if you're behind master --- include/network.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index 395641b73..9f68d3df3 100644 --- a/include/network.php +++ b/include/network.php @@ -2128,3 +2128,18 @@ function deliverable_singleton($channel_id,$xchan) { return false; } + + +function get_repository_version($branch = 'master') { + + $path = "https://raw.githubusercontent.com/redmatrix/hubzilla/$branch/boot.php"; + + $x = z_fetch_url($path); + if($x['success']) { + $y = preg_match('/define(.*?)STD_VERSION(.*?)([0-9.].*)\'/',$x['body'],$matches); + if($y) + return $matches[3]; + } + return '?.?'; + +} -- cgit v1.2.3