diff --git a/doc/Settings.md b/doc/Settings.md index e30b489297..a0b33d76d2 100644 --- a/doc/Settings.md +++ b/doc/Settings.md @@ -164,6 +164,12 @@ However these aren't looked upon favourably in the security community because th If you wish, you can turn on strict certificate checking. This will mean you cannot connect (at all) to self-signed SSL sites. +#### Check upstream version + +If this option is enabled your Friendica node will check the upstream version once per day from the github repository. +You can select if the stable version or the development version should be checked out. +If there is a new version published, you will get notified in the admin panel summary page. + ### Auto Discovered Contact Directory ### Performance diff --git a/include/checkversion.php b/include/checkversion.php new file mode 100644 index 0000000000..7d3c2de6f7 --- /dev/null +++ b/include/checkversion.php @@ -0,0 +1,46 @@ +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. Check is opt-in, source may be master or devel branch + if (Config::get('system', 'check_new_version_url', 'none') != 'none' ) { + $gitversion = Config::get('system','git_friendica_version'); + if (version_compare(FRIENDICA_VERSION, $gitversion) < 0) { + $warningtext[] = t('There is a new version of Friendica available for download.'); + $showwarning = true; + } + } if (Config::get('system', 'dbupdate', DB_UPDATE_NOT_CHECKED) == DB_UPDATE_NOT_CHECKED) { require_once("include/dbstructure.php"); @@ -848,6 +857,7 @@ function admin_page_site_post(App $a) { $proxy_disabled = ((x($_POST,'proxy_disabled')) ? True : False); $only_tag_search = ((x($_POST,'only_tag_search')) ? True : False); $rino = ((x($_POST,'rino')) ? intval($_POST['rino']) : 0); + $check_new_version_url = ((x($_POST, 'check_new_version_url')) ? notags(trim($_POST['check_new_version_url'])) : 'none'); $worker_queues = ((x($_POST,'worker_queues')) ? intval($_POST['worker_queues']) : 4); $worker_dont_fork = ((x($_POST,'worker_dont_fork')) ? True : False); $worker_fastlane = ((x($_POST,'worker_fastlane')) ? True : False); @@ -968,6 +978,7 @@ function admin_page_site_post(App $a) { set_config('system', 'enotify_no_content', $enotify_no_content); set_config('system', 'disable_embedded', $disable_embedded); set_config('system', 'allow_users_remote_self', $allow_users_remote_self); + set_config('system', 'check_new_version_url', $check_new_version_url); set_config('system', 'block_extended_register', $no_multi_reg); set_config('system', 'no_openid', $no_openid); @@ -1137,6 +1148,12 @@ function admin_page_site(App $a) { SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)") ); + $check_git_version_choices = array( + "none" => t("Don't check"), + "master" => t("check the stable version"), + "develop" => t("check the development version") + ); + if ($a->config['hostname'] == "") { $a->config['hostname'] = $a->get_hostname(); } @@ -1231,6 +1248,7 @@ function admin_page_site(App $a) { '$nodeinfo' => array('nodeinfo', t("Publish server information"), get_config('system','nodeinfo'), t("If enabled, general server and usage data will be published. The data contains the name and version of the server, number of users with public profiles, number of posts and the activated protocols and connectors. See the-federation.info for details.")), + '$check_new_version_url' => array('check_new_version_url', t("Check upstream version"), get_config('system', 'check_new_version_url'), t("Enables checking for new Friendica versions at github. If there is a new version, you will be informed in the admin panel overview."), $check_git_version_choices), '$suppress_tags' => array('suppress_tags', t("Suppress Tags"), get_config('system','suppress_tags'), t("Suppress showing a list of hashtags at the end of the posting.")), '$itemcache' => array('itemcache', t("Path to item cache"), get_config('system','itemcache'), t("The item caches buffers generated bbcode and external images.")), '$itemcache_duration' => array('itemcache_duration', t("Cache duration in seconds"), get_config('system','itemcache_duration'), t("How long should the cache files be hold? Default value is 86400 seconds (One day). To disable the item cache, set the value to -1.")), diff --git a/view/templates/admin_site.tpl b/view/templates/admin_site.tpl index 715b422def..9f25ac085d 100644 --- a/view/templates/admin_site.tpl +++ b/view/templates/admin_site.tpl @@ -126,6 +126,7 @@ {{include file="field_input.tpl" field=$basepath}} {{include file="field_checkbox.tpl" field=$suppress_tags}} {{include file="field_checkbox.tpl" field=$nodeinfo}} + {{include file="field_select.tpl" field=$check_new_version_url}}

{{$portable_contacts}}