From d8ec745fea39595b949a6ce5dabeb1c8b049f1ab Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Wed, 9 Oct 2013 12:44:49 +0200 Subject: [PATCH] fix issue concerning absoluteUrl --- core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php | 2 +- core/lib/Thelia/Tools/URL.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php index b7bb95b83..93dbb6f86 100755 --- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php +++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php @@ -36,7 +36,7 @@ class Assetic extends AbstractSmartyPlugin { $web_root = THELIA_WEB_DIR; - $asset_dir_from_web_root = ConfigQuery::read('asset_dir_from_web_root', 'assets'); + $asset_dir_from_web_root = ConfigQuery::read('asset_dir_from_web_root', 'assets/'); $this->assetManager = new SmartyAssetsManager($web_root, $asset_dir_from_web_root, $developmentMode == 'dev'); } diff --git a/core/lib/Thelia/Tools/URL.php b/core/lib/Thelia/Tools/URL.php index 83469f602..3e137e5e4 100755 --- a/core/lib/Thelia/Tools/URL.php +++ b/core/lib/Thelia/Tools/URL.php @@ -129,8 +129,9 @@ class URL // If only a path is requested, be sure to remove the script name (index.php or index_dev.php), if any. if ($path_only == self::PATH_TO_FILE) { + // As the base_url always ends with '/', if we don't find / at the end, we have a script. - if (substr($base_url, -1) != '/') $base_url = dirname($base_url); + if (substr($base_url, -3) == 'php') $base_url = dirname($base_url); } // Normalize the given path