Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions html-importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = "<tr><th class='error'>--</th><td colspan='3' class='error'> " . sprintf( __( "%s ( %s ) has already been imported", 'html-import-pages' ), $my_post['post_title'], $handle ) . "</td></tr>";

}
// 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 ) ) {
Expand Down Expand Up @@ -1198,4 +1199,4 @@ function mb_strlen( $string ) {
function mb_strrpos( $haystack, $needle, $offset = 0 ) {
return strrpos( utf8_decode( $haystack ), $needle, $offset );
}
}
}