]> git.mxchange.org Git - friendica.git/commitdiff
code corrections
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Mon, 6 Nov 2017 16:45:33 +0000 (17:45 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Mon, 6 Nov 2017 16:45:33 +0000 (17:45 +0100)
include/checkversion.php
include/cron.php
mod/admin.php

index ee6c04a5579e5d2e418c1f2cf0ba32c7698bd570..6cd34b2ce9171aed09d080413fff74b5b4936dfb 100644 (file)
@@ -22,7 +22,7 @@ function checkversion_run () {
        $checkurl = Config::get('system', 'check_new_version_url', 'none');
 
        // check for new versions at all?
-       if ( $checkurl == 'none' ) {
+       if ($checkurl == 'none' ) {
                return;
        }
        $gitversion = dbesc(trim(fetch_url($checkurl)));
index f65e5851b21fb4bb0acc25694c3f6c85686ec43b..8842d3bdfa6eabea99bf4a21cb2b1675d4cadad8 100644 (file)
@@ -81,7 +81,7 @@ function cron_run(&$argv, &$argc){
                dba::delete('workerqueue', array('`done` AND `executed` < UTC_TIMESTAMP() - INTERVAL 12 HOUR'));
 
                // check upstream version?
-               proc_run(PRIORITY_LOW, 'include/checkversion.php');
+               Worker::add(PRIORITY_LOW, 'checkversion');
        }
 
        // Poll contacts
index c41bcdc4a638810b86603cf89b8b736e41e3c493..dba180c1294d372cf60252fe59e138ee91b43ac0 100644 (file)
@@ -619,7 +619,7 @@ function admin_page_summary(App $a) {
        // 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) {
+               if (version_compare(FRIENDICA_VERSION, $gitversion)<0) {
                        $warningtext[] = t('There is a new version of Friendica available for download.');
                        $showwarning = true;
                }
@@ -856,7 +856,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');
+       $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);