]> git.mxchange.org Git - friendica.git/commitdiff
closed internal TODO, merged 2 if() to one + added spaces
authorRoland Haeder <roland@mxchange.org>
Thu, 23 Mar 2017 21:16:04 +0000 (22:16 +0100)
committerRoland Haeder <roland@mxchange.org>
Thu, 23 Mar 2017 21:17:39 +0000 (22:17 +0100)
Signed-off-by: Roland Haeder <roland@mxchange.org>
boot.php

index 4101469dd565c72c06757eb532e6b37baa0889d2..5df8c6c4d9037f1b6c726ef988eb5008055ef302 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1349,12 +1349,11 @@ class App {
                // This should prevent the forking of masses of workers.
                $cachekey = "app:proc_run:started";
                $result = Cache::get($cachekey);
-               /// @TODO maybe merge these both into one if() ?
-               if (!is_null($result)) {
-                       if ((time() - $result) < 10) {
-                               return;
-                       }
+
+               if (!is_null($result) AND (time() - $result) < 10) {
+                       return;
                }
+
                // Set the timestamp of the last proc_run
                Cache::set($cachekey, time(), CACHE_MINUTE);
 
@@ -1363,16 +1362,17 @@ class App {
                // add baseurl to args. cli scripts can't construct it
                $args[] = $this->get_baseurl();
 
+               /// @TODO let's replace these with a foreach($key => $value) loop
                for ($x = 0; $x < count($args); $x ++) {
                        $args[$x] = escapeshellarg($args[$x]);
                }
 
-               $cmdline = implode($args," ");
+               $cmdline = implode($args, " ");
 
-               if (get_config('system','proc_windows')) {
-                       proc_close(proc_open('cmd /c start /b ' . $cmdline,array(),$foo,dirname(__FILE__)));
+               if (get_config('system', 'proc_windows')) {
+                       proc_close(proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__)));
                } else {
-                       proc_close(proc_open($cmdline." &",array(),$foo,dirname(__FILE__)));
+                       proc_close(proc_open($cmdline . " &", array(), $foo, dirname(__FILE__)));
                }
 
        }