diff options
| author | Nathan Kinkade <nath@nkinka.de> | 2012-06-18 16:17:55 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nath@nkinka.de> | 2012-06-18 16:17:55 +0000 |
| commit | 527bc809aaa6d48e7c1a7be50de31a4c3adcee90 (patch) | |
| tree | fb7432e06af9191f2300af97685f235325d36f57 /application | |
| parent | b52e834bd0bab530e98537d52b31d4b37f199739 (diff) | |
| parent | c48df3b8199802a75f30f38c6f7b3440f9fde4ca (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'application')
| -rw-r--r-- | application/config/config.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/application/config/config.php b/application/config/config.php index d89e7774..4bece9a1 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -37,10 +37,13 @@ * So dirname doesn't work. So we do a tricky workaround where we look up the SCRIPT_FILENAME (in * this case it'd be "index.php" and we delete from that part onwards. If you work at 1and1 and * you're reading this, please fix this bug! + * + * Rawurlencode each of the elements to avoid breaking the page layout. */ $config["site_domain"] = - substr($_SERVER["SCRIPT_NAME"], 0, - strpos($_SERVER["SCRIPT_NAME"], basename($_SERVER["SCRIPT_FILENAME"]))); + implode("/", array_map("rawurlencode", explode("/", + substr($_SERVER["SCRIPT_NAME"], 0, + strpos($_SERVER["SCRIPT_NAME"], basename($_SERVER["SCRIPT_FILENAME"])))))); /** * Force a default protocol to be used by the site. If no site_protocol is |
