Permalink
Browse files

Fixed bug with @is_current var

  The trailing slash was causing the permalink to end in //
  • Loading branch information...
1 parent 579f462 commit ad3e73eaad131fd1b40e16ad4f0f559059398f5b @kolber kolber committed Apr 6, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/page-data.inc.php
@@ -71,7 +71,7 @@ static function is_current($base_url, $permalink) {
if($permalink == 'index') {
return ('/' == $_SERVER['REQUEST_URI']);
} else {
- return ($base_path.'/'.$permalink.'/' == $_SERVER['REQUEST_URI']);
+ return ($base_path.'/'.$permalink == $_SERVER['REQUEST_URI']);
}
}
@@ -209,7 +209,7 @@ static function create_textfile_vars($page) {
$relative_path = preg_replace('/^\.\//', Helpers::relative_root_path(), $page->file_path);
$colon_split[1] = preg_replace('/\@path/', $relative_path.'/', $colon_split[1]);
- # set a variable with a name of 'key' on the page with a value of 'value'
+ # set a variable with a name of 'key' on the page with a value of 'value'
$page->$colon_split[0] =
# if the 'value' contains a newline character, parse it as markdown
(strpos($colon_split[1], "\n") === false) ? trim($colon_split[1]) : Markdown(trim($colon_split[1]));

0 comments on commit ad3e73e

Please sign in to comment.