mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Use str_contains + str_starts_with
This commit is contained in:
parent
89deca1adb
commit
37bde7df22
@ -211,7 +211,7 @@ else {
|
||||
$_GET = array_merge($_GET, $vars);
|
||||
extract($vars);
|
||||
|
||||
if (strpos($path, '__database__/') !== false) {
|
||||
if (str_contains($path, '__database__/')) {
|
||||
$pageName = str_replace('__database__/', '', $path);
|
||||
|
||||
$success = false;
|
||||
@ -227,7 +227,7 @@ else {
|
||||
$page = $pageName;
|
||||
$file = false;
|
||||
}
|
||||
} else if (strpos($path, '__redirect__/') !== false) {
|
||||
} else if (str_contains($path, '__redirect__/')) {
|
||||
$path = str_replace('__redirect__/', '', $path);
|
||||
header('Location: ' . BASE_URL . $path);
|
||||
exit;
|
||||
@ -242,7 +242,7 @@ else {
|
||||
if (false !== $pos = strpos($uri, '?')) {
|
||||
$uri = substr($uri, 0, $pos);
|
||||
}
|
||||
if (0 === strpos($uri, '/')) {
|
||||
if (str_starts_with($uri, '/')) {
|
||||
$uri = str_replace_first('/', '', $uri);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user