Merge pull request #203 from ArthurHlt/master

Add compatibility file with accent
This commit is contained in:
Denis Kisselev 2014-07-08 12:22:58 -07:00
commit edd104a512
2 changed files with 4 additions and 3 deletions

View File

@ -81,6 +81,7 @@
$tree = array(); $tree = array();
$Item = array_diff(scandir($dir), array(".", "..")); $Item = array_diff(scandir($dir), array(".", ".."));
foreach ($Item as $key => $value) { foreach ($Item as $key => $value) {
$value = utf8_encode($value);
if (is_dir($dir . '/' . $value)) { if (is_dir($dir . '/' . $value)) {
if (!in_array($value, $ignore['folders'])) if (!in_array($value, $ignore['folders']))
$tree[$value] = directory_tree($dir . '/' . $value, $ignore); $tree[$value] = directory_tree($dir . '/' . $value, $ignore);
@ -169,9 +170,9 @@
$page['content'] = $Parsedown->text($page['markdown']); $page['content'] = $Parsedown->text($page['markdown']);
if ($options['breadcrumbs']) { if ($options['breadcrumbs']) {
$page['title'] = url_to_title(get_url($file), 'Colons'); $page['title'] = utf8_encode(url_to_title(get_url($file), 'Colons'));
} else { } else {
$page['title'] = clean_url($file, 'Title'); $page['title'] = utf8_encode(clean_url($file, 'Title'));
} }
} }
$relative_base = ($mode === 'Static') ? relative_path("", $file) : "http://" . $base_path . '/'; $relative_base = ($mode === 'Static') ? relative_path("", $file) : "http://" . $base_path . '/';

View File

@ -7,7 +7,7 @@
$b = explode('/', clean_url($page, "Live")); $b = explode('/', clean_url($page, "Live"));
$output_language = $b[0]; $output_language = $b[0];
} }
$file = clean_url_to_file($page); $file = utf8_decode(clean_url_to_file($page));
if (!is_file($file)) $file = FALSE; if (!is_file($file)) $file = FALSE;
return generate_page($file); return generate_page($file);
} }