Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

Don't add subdir for urls where current path is used

givanzeb682965ad20
diff --git a/system/functions.php b/system/functions.php
index 45bd605..5eafb1b 100755
--- a/system/functions.php
+++ b/system/functions.php
@@ -72,7 +72,9 @@ function url($parameters, $mergeParameters = false, $useCurrentUrl = true) {
$result .= '//' . \Vvveb\System\Sites::url($parameters['host']);
unset($parameters['host']);
} else {
- $result .= (V_SUBDIR_INSTALL ? V_SUBDIR_INSTALL : '');
+ if (! $useCurrentUrl) {
+ $result .= (V_SUBDIR_INSTALL ? V_SUBDIR_INSTALL : '');
+ }
}
$result .= ($useCurrentUrl ? $url['path'] ?? '' : '') . ($parameters ? '?' . urldecode(http_build_query($parameters)) : '');