add option to disable extension parsing and new shorter variable syntax

This commit is contained in:
Michael Becker 2023-11-01 23:23:17 -04:00
parent 6c87446672
commit 72a9b8d208

View File

@ -711,6 +711,8 @@
} }
$path = System::GetVirtualPath(); $path = System::GetVirtualPath();
if (System::$Configuration["Runtime.DisableAutomaticExtensionParsing"] !== true)
{
// strip path extension if there is one // strip path extension if there is one
$pathLast = $path[count($path) - 1]; $pathLast = $path[count($path) - 1];
$ix = strripos($pathLast, "."); $ix = strripos($pathLast, ".");
@ -752,6 +754,7 @@
} }
} }
} }
}
$success = false; $success = false;
@ -778,6 +781,11 @@
$pathVarName = substr($pathPart, 2, strlen($pathPart) - 3); $pathVarName = substr($pathPart, 2, strlen($pathPart) - 3);
$pathVars[$pathVarName] = $actualPathParts[$i]; $pathVars[$pathVarName] = $actualPathParts[$i];
} }
else if (stripos($pathPart, "{") == 0 && stripos($pathPart, "}") == strlen($pathPart) - 1)
{
$pathVarName = substr($pathPart, 1, strlen($pathPart) - 2);
$pathVars[$pathVarName] = $actualPathParts[$i];
}
else else
{ {
$app = ""; $app = "";