diff --git a/html-importer.php b/html-importer.php index 7778872..2d869e3 100644 --- a/html-importer.php +++ b/html-importer.php @@ -606,9 +606,10 @@ function get_post( $path = '', $placeholder = false ) { // see if the post already exists // but don't bother printing this message if we're doing an index file; we know its parent already exists - if ( $post_id = post_exists( $my_post['post_title'], $my_post['post_content'], $my_post['post_date'] ) && basename( $path ) != $options['index_file'] ) + if ( $post_id = post_exists( $my_post['post_title'], $my_post['post_content'], $my_post['post_date'] ) && basename( $path ) != $options['index_file'] ){ + $this->table=array(); $this->table[] = "-- " . sprintf( __( "%s ( %s ) has already been imported", 'html-import-pages' ), $my_post['post_title'], $handle ) . ""; - + } // if we're doing hierarchicals and this is an index file of a subdirectory, instead of importing this as a separate page, update the content of the placeholder page we created for the directory $index_files = explode( ',',$options['index_file'] ); if ( is_post_type_hierarchical( $options['type'] ) && dirname( $path ) != $options['root_directory'] && in_array( basename( $path ), $index_files ) ) { @@ -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 +}