mirror of
https://github.com/danpros/htmly.git
synced 2026-04-22 21:46:22 +05:30
Merge pull request #430 from bluebirch/fix_find_post
Fix find_post bug by @bluebirch
This commit is contained in:
commit
152b5990bb
1 changed files with 1 additions and 1 deletions
|
|
@ -386,7 +386,7 @@ function find_post($year, $month, $name)
|
|||
|
||||
foreach ($posts as $index => $v) {
|
||||
$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
|
||||
// a properly parsed object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue