mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 19:02:12 +00:00
Removed unused functions
This commit is contained in:
parent
3c63c139ae
commit
90a69fd16c
@ -1,10 +1,5 @@
|
||||
<?php
|
||||
|
||||
function ping()
|
||||
{
|
||||
return "pong";
|
||||
}
|
||||
|
||||
function startsWith($haystack, $needle)
|
||||
{
|
||||
$length = strlen($needle);
|
||||
@ -27,11 +22,9 @@ function slugEqualToURI($slug, $uri, $options)
|
||||
if (count($uri) != count($slug)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($slug as $key => $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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user