Skip to content

Commit

Permalink
Added missing Config::$root_folder settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kolber committed Jun 3, 2012
1 parent 263666f commit 189db53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers.inc.php
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion extensions/twig-extensions.inc.php
Expand Up @@ -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;
Expand Down

0 comments on commit 189db53

Please sign in to comment.