From 5afd394ac97ab2ddf5c5003f2105b6392a1a3eb3 Mon Sep 17 00:00:00 2001 From: Khaled Hammouda Date: Wed, 9 Apr 2014 17:23:23 -0400 Subject: [PATCH] Tabs to spaces --- libs/functions.php | 24 ++++++++++++------------ libs/live.php | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libs/functions.php b/libs/functions.php index 9f1e02b..62139ee 100644 --- a/libs/functions.php +++ b/libs/functions.php @@ -115,12 +115,12 @@ $return .= ""; $return .= clean_url($key, "Title"); $return .= ""; @@ -145,7 +145,7 @@ function generate_page($file) { global $base, $base_doc, $base_path, $docs_path, $options, $mode, $relative_base; $template = $options['template']; - $file_relative_path = str_replace($docs_path . '/', "", $file); + $file_relative_path = str_replace($docs_path . '/', "", $file); if ($file_relative_path === 'index.md') $homepage = TRUE; else $homepage = FALSE; if (!$file) { @@ -190,11 +190,11 @@ return $url; case 'Title': case 'Filename': - $parts = array_reverse(explode('/', $url)); - if (isset($parts[0])) { - if ($parts[0] === "index.md" && isset($parts[1])) $url = $parts[1]; - else $url = $parts[0]; - } + $parts = array_reverse(explode('/', $url)); + if (isset($parts[0])) { + if ($parts[0] === "index.md" && isset($parts[1])) $url = $parts[1]; + else $url = $parts[0]; + } $url = explode('_', $url); if (isset($url[0]) && is_numeric($url[0])) unset($url[0]); if ($mode === 'Filename') $url = implode('_', $url); diff --git a/libs/live.php b/libs/live.php index 7eb4e31..3ba2e66 100644 --- a/libs/live.php +++ b/libs/live.php @@ -51,7 +51,7 @@ $file .= '/' . $dirs[$key]; $tree = $tree[$dirs[$key]]; } - if (is_file($file . "/index.md")) $file = $file . "/index.md"; + if (is_file($file . "/index.md")) $file = $file . "/index.md"; return $file; } }