Skip to content

Instantly share code, notes, and snippets.

@caaheek
Created November 17, 2016 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caaheek/fcb12e548549a2e4ff71a2ed09c6b71d to your computer and use it in GitHub Desktop.
Save caaheek/fcb12e548549a2e4ff71a2ed09c6b71d to your computer and use it in GitHub Desktop.
diff --git a/app/functions/fn.common.php b/app/functions/fn.common.php
index 409fa72..6fbb762 100644
--- a/app/functions/fn.common.php
+++ b/app/functions/fn.common.php
@@ -5440,7 +5440,7 @@ function fn_merge_styles($files, $styles='', $prepend_prefix = '', $params = arr
$make_rtl = true;
}
- $css_suffix = 'css' . DIRECTORY_SEPARATOR;
+ $css_suffix = 'css/';
$output = '';
$less_output = '';
diff --git a/app/Tygh/Themes/Themes.php b/app/Tygh/Themes/Themes.php
index 937cb03..759a777 100644
--- a/app/Tygh/Themes/Themes.php
+++ b/app/Tygh/Themes/Themes.php
@@ -840,11 +840,9 @@ class Themes
*/
public function convertToRelativePath($path)
{
- if (isset($path[0]) && $path[0] == '/') {
- foreach ($this->content_paths as $content_path) {
- $abs_paths = fn_array_column($content_path, self::PATH_ABSOLUTE);
- $path = trim(str_replace($abs_paths, '', $path), '/');
- }
+ foreach ($this->content_paths as $content_path) {
+ $abs_paths = fn_array_column($content_path, self::PATH_ABSOLUTE);
+ $path = trim(str_replace($abs_paths, '', $path), '/');
}
return $path;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment