Dotclear


Ignore:
Timestamp:
09/09/16 13:30:35 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

PHP 5.3+ : (expr1 ? expr1 : expr2) may be written → (expr1 ?: expr2)

Location:
plugins/importExport/inc
Files:
2 edited

Legend:

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

    r3269 r3340  
    144144               $cur->clean(); 
    145145               $cur->user_id = $this->core->auth->userID(); 
    146                $cur->post_content = $item->content ? $item->content : $item->description; 
    147                $cur->post_title = $item->title ? $item->title : text::cutString(html::clean($cur->post_content),60); 
     146               $cur->post_content = $item->content ?: $item->description; 
     147               $cur->post_title = $item->title ?: text::cutString(html::clean($cur->post_content),60); 
    148148               $cur->post_format = 'xhtml'; 
    149149               $cur->post_status = -2; 
  • plugins/importExport/inc/class.dc.import.wp.php

    r2566 r3340  
    658658          } 
    659659          $cur->post_type         = $rs->post_type; 
    660           $cur->post_password     = $rs->post_password ? $rs->post_password : NULL; 
     660          $cur->post_password     = $rs->post_password ?: NULL; 
    661661          $cur->post_open_comment = $rs->comment_status == 'open' ? 1 : 0; 
    662662          $cur->post_open_tb      = $rs->ping_status == 'open' ? 1 : 0; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map