X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FWorker.php;h=96f3e7ae042e30fae459cff6ca272d6f1bdba261;hb=87bb4d44a2eccec4180b9cd0a70f9011b3b759bc;hp=9ec2f8f04aba814588af9212607705c1025088a9;hpb=26e0469de77aeae2311e8b50b5e64b58a388ca01;p=friendica.git diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 9ec2f8f04a..96f3e7ae04 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -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);