test appel img twig

This commit is contained in:
2021-03-19 16:07:04 +01:00
parent bc84eb05d5
commit 80be13743f
63 changed files with 999 additions and 1167 deletions
+12 -6
View File
@@ -426,12 +426,18 @@ class Grav extends Container
// Clean route for redirect
$route = preg_replace("#^\/[\\\/]+\/#", '/', $route);
// Check for code in route
$regex = '/.*(\[(30[1-7])\])$/';
preg_match($regex, $route, $matches);
if ($matches) {
$route = str_replace($matches[1], '', $matches[0]);
$code = $matches[2];
if (null !== $code || $code < 300 || $code > 399) {
$code = null;
}
if (null === $code) {
// Check for redirect code in the route: e.g. /new/[301], /new[301]/route or /new[301].html
$regex = '/.*(\[(30[1-7])\])(.\w+|\/.*?)?$/';
preg_match($regex, $route, $matches);
if ($matches) {
$route = str_replace($matches[1], '', $matches[0]);
$code = $matches[2];
}
}
if ($code === null) {