diff --git a/src/AdminPanel/Functions.php b/src/AdminPanel/Functions.php index c3cf092..cd22c51 100644 --- a/src/AdminPanel/Functions.php +++ b/src/AdminPanel/Functions.php @@ -1,10 +1,5 @@ $value) { if (preg_match("/{.+}/", $value)) { $elemnt = preg_replace("/{|}/", "", $value); - // dd($options); if (!isset($options->$elemnt)) { $return->$elemnt = explode("?", $uri[$key])[0]; continue; @@ -43,7 +36,6 @@ function slugEqualToURI($slug, $uri, $options) } else { return false; } - //TODO: correspond with module settings } else { if ($value == $uri[$key]) { continue; @@ -55,25 +47,6 @@ function slugEqualToURI($slug, $uri, $options) return $return; } - -function getModulesJSON() -{ - $temp = array(); - $modulesDIR = "./Modules"; - $modules = array_diff(scandir($modulesDIR), array('..', '.')); - foreach ($modules as $module) { - $moduleDIR = $modulesDIR . "/" . $module; - $file = $moduleDIR . "/" . strtolower($module) . ".json"; - if (is_dir($moduleDIR) && is_file($file)) { - $json = json_decode(file_get_contents($file), true); - if ($json) { - $temp[$module] = $json; - } - } - } - return $temp; -} - function jsonc_decode($filename, $assoc = false, $depth = 512, $options = 0) { return json_decode(