From bcf2d338903c3134a5bd725324367dbc27aad6f2 Mon Sep 17 00:00:00 2001 From: Matt Watson Date: Tue, 17 Mar 2020 08:26:07 -0500 Subject: [PATCH] Keep index files named after parent directory --- html-importer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/html-importer.php b/html-importer.php index 7778872..5ead5bc 100644 --- a/html-importer.php +++ b/html-importer.php @@ -445,7 +445,8 @@ function get_post( $path = '', $placeholder = false ) { $filename = $this->filename; else $filename = basename( $path ); - $my_post['post_name'] = substr( $filename,0,strrpos( $filename,'.' ) ); + if($filename !== $options['index_file']) + $my_post['post_name'] = substr( $filename,0,strrpos( $filename,'.' ) ); } // post type @@ -1198,4 +1199,4 @@ function mb_strlen( $string ) { function mb_strrpos( $haystack, $needle, $offset = 0 ) { return strrpos( utf8_decode( $haystack ), $needle, $offset ); } -} \ No newline at end of file +}