aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-10 21:46:04 -0700
committerredmatrix <git@macgirvin.com>2016-05-10 21:46:04 -0700
commit4dd3839c41e18d9724855e7955d8737b6f52dcd6 (patch)
treede4467d3f721ef1a507411647b2c2e7577786817 /include/network.php
parent9caaa9397e2b7c9b9acde8cbab4bb97a77939d8a (diff)
downloadvolse-hubzilla-4dd3839c41e18d9724855e7955d8737b6f52dcd6.tar.gz
volse-hubzilla-4dd3839c41e18d9724855e7955d8737b6f52dcd6.tar.bz2
volse-hubzilla-4dd3839c41e18d9724855e7955d8737b6f52dcd6.zip
provide repository versions on admin summary page and an upgrade message if you're behind master
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php15
1 files changed, 15 insertions, 0 deletions
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 '?.?';
+
+}