aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-09-03 16:16:23 -0700
committerDavid King <imkingdavid@gmail.com>2013-09-03 16:57:27 -0700
commit010da72f64ce325c27fb68c5c142ec01e1e53e61 (patch)
tree7c954f78fb62acf405165ffcda6a55e257eda279 /phpBB/includes/functions.php
parent8d6b03c438392cebed941491684ff835bf7136a8 (diff)
downloadforums-010da72f64ce325c27fb68c5c142ec01e1e53e61.tar
forums-010da72f64ce325c27fb68c5c142ec01e1e53e61.tar.gz
forums-010da72f64ce325c27fb68c5c142ec01e1e53e61.tar.bz2
forums-010da72f64ce325c27fb68c5c142ec01e1e53e61.tar.xz
forums-010da72f64ce325c27fb68c5c142ec01e1e53e61.zip
[ticket/11824] Add option for mod_rewrite
PHPBB3-11824
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 4d2d704a43..3ff7716edd 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -5733,6 +5733,7 @@ function phpbb_create_symfony_request(phpbb_request $request)
*/
function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = '')
{
+ global $config, $phpEx, $request;
static $path;
if (null !== $path)
{
@@ -5748,9 +5749,8 @@ function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = ''
$corrections = substr_count($path_info, '/');
- // When URL Rewriting is enabled, app.php is optional. We have to
- // correct for it not being there
- if (strpos($symfony_request->getRequestUri(), $symfony_request->getScriptName()) === false)
+ // We need to account for whether or not app.php is in the URL
+ if (strpos($symfony_request->server->get('REQUEST_URI', ''), 'app.' . $phpEx) !== false)
{
$corrections -= 1;
}