]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Worker.php
Merge pull request #12153 from nupplaphil/feat/woodpecker
[friendica.git] / src / Core / Worker.php
index 9ec2f8f04aba814588af9212607705c1025088a9..96f3e7ae042e30fae459cff6ca272d6f1bdba261 100644 (file)
@@ -315,17 +315,7 @@ class Worker
                        return false;
                }
 
-               $valid = false;
-               if (strpos($file, 'include/') === 0) {
-                       $valid = true;
-               }
-
-               if (strpos($file, 'addon/') === 0) {
-                       $valid = true;
-               }
-
-               // Simply return flag
-               return $valid;
+               return (strpos($file, 'addon/') === 0);
        }
 
        /**
@@ -406,11 +396,6 @@ class Worker
                        return true;
                }
 
-               // The script could be provided as full path or only with the function name
-               if ($include == basename($include)) {
-                       $include = 'include/' . $include . '.php';
-               }
-
                if (!self::validateInclude($include)) {
                        Logger::warning('Include file is not valid', ['file' => $argv[0]]);
                        $stamp = (float)microtime(true);