aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/path_helper.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2017-09-08 10:45:22 +0200
committerTristan Darricau <github@nicofuma.fr>2017-09-08 16:26:39 +0200
commitc368d170cf09d06ff63249d4405323e6108d90bb (patch)
treef264ad23aaa9c3ecacde482caa633a49539e1bcd /phpBB/phpbb/path_helper.php
parent7221a47bb622951c3c81e4537d98357656064b2a (diff)
downloadforums-c368d170cf09d06ff63249d4405323e6108d90bb.tar
forums-c368d170cf09d06ff63249d4405323e6108d90bb.tar.gz
forums-c368d170cf09d06ff63249d4405323e6108d90bb.tar.bz2
forums-c368d170cf09d06ff63249d4405323e6108d90bb.tar.xz
forums-c368d170cf09d06ff63249d4405323e6108d90bb.zip
[ticket/15351] Makes confirm_works in a router context (app.php)
PHPBB3-15351
Diffstat (limited to 'phpBB/phpbb/path_helper.php')
-rw-r--r--phpBB/phpbb/path_helper.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/phpBB/phpbb/path_helper.php b/phpBB/phpbb/path_helper.php
index 154361ef64..5b6db35f23 100644
--- a/phpBB/phpbb/path_helper.php
+++ b/phpBB/phpbb/path_helper.php
@@ -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;
+ }
}