diff --git a/blog/by_tag/index.php b/blog/by_tag/index.php index 9966a89..2230a2d 100755 --- a/blog/by_tag/index.php +++ b/blog/by_tag/index.php @@ -5,7 +5,7 @@ echo "

Posts by Tag

"; echo "
"; function read_tags($tags_file){ - if (filesize($tags_vile) == 0){ + if (filesize($tags_file) == 0){ echo "
\n
"; return; } diff --git a/common/php/article.php b/common/php/article.php index cf7ca4c..050fb85 100644 --- a/common/php/article.php +++ b/common/php/article.php @@ -22,20 +22,17 @@ echo "\n\n"; echo("\n"); - if (file_exists('author')){ - $author_name_raw = fopen('author', 'r'); - $author_name = fread($author_name_raw, filesize('author')); - $author_name = str_replace("\n", "", $author_name); - $byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md'; - if (file_exists($byline_path)){ - echo "
\n" - . read_md($byline_path) - ."
\n"; - } else { - echo "

No byline

"; - echo "

$byline_path

"; - } - fclose($author_name_raw); + if (file_exists('author') && (filesize('author') != 0)){ + $author_name_raw = fopen('author', 'r'); + $author_name = fread($author_name_raw, filesize('author')); + $author_name = str_replace("\n", "", $author_name); + $byline_path = $_SERVER['DOCUMENT_ROOT'].'blog/authors/'.$author_name.'/byline.md'; + if (file_exists($byline_path)){ + echo "
\n" + . read_md($byline_path) + ."
\n"; + } + fclose($author_name_raw); } if ($tag_data != NULL){ $page_tags = str_getcsv($tag_data); diff --git a/common/php/header.php b/common/php/header.php index dc7a0cf..8069b2f 100644 --- a/common/php/header.php +++ b/common/php/header.php @@ -2,20 +2,11 @@