Skip to content
Browse files

Correct $root_path setting inside resize_path

  • Loading branch information...
1 parent 0253dbe commit 8c8c45cd2110ac1736af783fdd067ecf4db75efc @kolber committed May 27, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 extensions/twig-extensions.inc.php
View
3 extensions/twig-extensions.inc.php
@@ -69,8 +69,9 @@ function get($url, $current_url = '') {
# shortcut to generate the image resize path from a full image path
#
function resize_path($img_path, $max_width = '100', $max_height = '100', $ratio = '1:1', $quality = 100) {
+ $root_path = preg_replace('/content\/.*/', '', $img_path);
$clean_path = preg_replace('/^(\.+\/)*content/', '', $img_path);
- $root_path = Helpers::relative_root_path();
+
if(!file_exists('.htaccess')) {
return $root_path.'app/parsers/slir/index.php?w='.$max_width.'&h='.$max_height.'&c='.$ratio.'&q='.$quality.'&i='.$clean_path;
} else {

0 comments on commit 8c8c45c

Please sign in to comment.
Something went wrong with that request. Please try again.