1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 02:06:32 +02:00

[ticket/15351] Makes confirm_works in a router context (app.php)

PHPBB3-15351
This commit is contained in:
Tristan Darricau
2017-09-08 10:45:22 +02:00
parent 7221a47bb6
commit c368d170cf
4 changed files with 44 additions and 6 deletions

View File

@@ -496,4 +496,17 @@ class path_helper
return $page;
}
/**
* Tells if the router is currently in use (if the current page is a route or not)
*
* @return bool
*/
public function is_router_used()
{
// Script name URI (e.g. phpBB/app.php)
$script_name = $this->symfony_request->getScriptName();
return basename($script_name) === 'app.' . $this->php_ext;
}
}