mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
Merge remote-tracking branch 'origin/support/3.1' into develop
This commit is contained in:
@@ -38,15 +38,17 @@ utils::InitTimeZone();
|
|||||||
*/
|
*/
|
||||||
function CheckPageExists(string $sPagePath, array $aPossibleBasePaths)
|
function CheckPageExists(string $sPagePath, array $aPossibleBasePaths)
|
||||||
{
|
{
|
||||||
$sTargetPage = false;
|
|
||||||
foreach ($aPossibleBasePaths as $sBasePath) {
|
foreach ($aPossibleBasePaths as $sBasePath) {
|
||||||
$sTargetPage = utils::RealPath($sPagePath, $sBasePath);
|
$sTargetPage = utils::RealPath($sPagePath, $sBasePath);
|
||||||
if ($sTargetPage !== false) {
|
if (
|
||||||
|
($sTargetPage !== false)
|
||||||
|
&& (strtolower(pathinfo($sTargetPage, PATHINFO_EXTENSION)) === "php")
|
||||||
|
) {
|
||||||
return $sTargetPage;
|
return $sTargetPage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $sTargetPage;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user