Browse Source

Merge pull request #430 from bluebirch/fix_find_post

Fix find_post bug by @bluebirch
pull/431/head
Dan 4 years ago
committed by GitHub
parent
commit
152b5990bb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      system/includes/functions.php

+ 1
- 1
system/includes/functions.php View File

@ -386,7 +386,7 @@ function find_post($year, $month, $name)
foreach ($posts as $index => $v) { foreach ($posts as $index => $v) {
$arr = explode('_', $v['basename']); $arr = explode('_', $v['basename']);
if (strpos($arr[0], "$year-$month") !== false && strtolower($arr[2]) === strtolower($name . '.md') || strtolower($arr[2]) === strtolower($name . '.md')) {
if ((strpos($arr[0], "$year-$month") !== false && strtolower($arr[2]) === strtolower($name . '.md')) || ($year === NULL && strtolower($arr[2]) === strtolower($name . '.md'))) {
// Use the get_posts method to return // Use the get_posts method to return
// a properly parsed object // a properly parsed object


Loading…
Cancel
Save