Dotclear


Ignore:
Timestamp:
03/12/12 20:44:10 (13 years ago)
Author:
saymonz@…
Branch:
default
Message:

Fixes in WordPress? importer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/importExport/inc/class.dc.import.wp.php

    r270 r807  
    621621           
    622622          $cur->post_format = $this->vars['post_formater']; 
    623           $cur->post_content = $this->cleanStr($rs->post_content); 
    624           $cur->post_excerpt = $this->cleanStr($rs->post_excerpt); 
     623          $_post_content = explode('<!--more-->',$rs->post_content,2); 
     624          if (count($_post_content) == 1) { 
     625               $cur->post_excerpt = NULL; 
     626               $cur->post_content = $this->cleanStr(array_shift($_post_content)); 
     627          } else { 
     628               $cur->post_excerpt = $this->cleanStr(array_shift($_post_content)); 
     629               $cur->post_content = $this->cleanStr(array_shift($_post_content)); 
     630          } 
    625631           
    626632          $cur->post_content_xhtml = $this->core->callFormater($this->vars['post_formater'],$cur->post_content); 
     
    696702               $cur->comment_trackback       = $rs->comment_type == 'trackback' ? 1 : 0; 
    697703               $cur->comment_site = substr($this->cleanStr($rs->comment_author_url),0,255); 
    698                if (!isset($cur->comment_site)) $cur->comment_site = NULL; 
     704               if ($cur->comment_site == '') $cur->comment_site = NULL; 
    699705                
    700706               if ($rs->comment_approved == 'spam') { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map