Add redirect_from && redirect_to to router options

+ Also add * for all methods shortcut
This commit is contained in:
slawkens
2023-02-03 12:18:35 +01:00
parent 7d38945e8d
commit 63d2c5c6b5
5 changed files with 53 additions and 27 deletions

View File

@@ -1531,6 +1531,12 @@ function camelCaseToUnderscore($input)
return ltrim(strtolower(preg_replace('/[A-Z]([A-Z](?![a-z]))*/', '_$0', $input)), '_');
}
function removeIfFirstSlash(&$text) {
if(strpos($text, '/') === 0) {
$text = str_replace_first('/', '', $text);
}
};
// validator functions
require_once LIBS . 'validator.php';
require_once SYSTEM . 'compat/base.php';