From 778c83bf25e3d1318414b99f629452505e9a2c36 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Mon, 9 Oct 2017 20:54:18 +0200 Subject: [PATCH] show a notification in the admin panel if a newer version is available --- mod/admin.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mod/admin.php b/mod/admin.php index 4f0622532f..1e3005ea01 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -615,6 +615,17 @@ function admin_page_summary(App $a) { $showwarning = true; $warningtext[] = sprintf(t('Your DB still runs with MyISAM tables. You should change the engine type to InnoDB. As Friendica will use InnoDB only features in the future, you should change this! See here for a guide that may be helpful converting the table engines. You may also use the command php include/dbstructure.php toinnodb of your Friendica installation for an automatic conversion.
'), 'https://dev.mysql.com/doc/refman/5.7/en/converting-tables-to-innodb.html'); } + // Check if github.com/friendica/master/VERSION is higher then + // the local version of Friendica. + $gitversion = Cache::get("git_friendica_version"); + if (! isset($gitversion)) { + $gitversion = dbesc(trim(fetch_url("https://raw.githubusercontent.com/friendica/friendica/master/VERSION"))); + Cache::set("git_friendica_version", $gitversion, CACHE_WEEK); + } + if ( version_compare(FRIENDICA_VERSION, $gitversion)<0) { + $warningtext[] = t('There is a new version of friendica available.'); + $showwarning = true; + } if (Config::get('system', 'dbupdate', DB_UPDATE_NOT_CHECKED) == DB_UPDATE_NOT_CHECKED) { require_once("include/dbstructure.php"); -- 2.39.5