Browse files

Added missing Config::$root_folder settings

  • Loading branch information...
1 parent 263666f commit 189db539f0f8fda68eb3fb5ef93b262c76d72004 @kolber committed Jun 4, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/helpers.inc.php
  2. +1 −1 extensions/twig-extensions.inc.php
View
2 app/helpers.inc.php
@@ -99,7 +99,7 @@ static function list_files($dir, $regex, $folders_only = false) {
static function modrewrite_parse($url) {
# if the .htaccess file is missing or mod_rewrite is disabled, overwrite the clean urls
- if(!file_exists('.htaccess') && preg_match('/\/$/', $url)) {
+ if(!file_exists(Config::$root_folder.'.htaccess') && preg_match('/\/$/', $url)) {
$url = '?/'.$url;
}
$url = preg_replace('/^(\?\/)?index\/$/', '', $url);
View
2 extensions/twig-extensions.inc.php
@@ -73,7 +73,7 @@ function resize_path($img_path, $max_width = '100', $max_height = '100', $ratio
$root_path = preg_replace('/content\/.*/', '', $img_path);
$clean_path = preg_replace('/^(\.+\/)*content/', '', $img_path);
- if(!file_exists('.htaccess')) {
+ if(!file_exists(Config::$root_folder.'.htaccess')) {
return $root_path.'app/parsers/slir/index.php?w='.$max_width.'&h='.$max_height.'&c='.$ratio.'&q='.$quality.'&i='.$clean_path;
} else {
return $root_path.'render/w'.$max_width.'-h'.$max_height.'-c'.$ratio.'-q'.$quality.$clean_path;

0 comments on commit 189db53

Please sign in to comment.