Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

File:
1 edited

Legend:

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

    r1559 r2566  
    1616     protected $status = false; 
    1717     protected $feed_url = ''; 
    18       
     18 
    1919     public function setInfo() 
    2020     { 
     
    2323          $this->description = __('Add a feed content to the blog.'); 
    2424     } 
    25       
     25 
    2626     public function process($do) 
    2727     { 
     
    3030               return; 
    3131          } 
    32            
     32 
    3333          if (empty($_POST['feed_url'])) { 
    3434               return; 
    3535          } 
    36            
     36 
    3737          $this->feed_url = $_POST['feed_url']; 
    38            
     38 
    3939          $feed = feedReader::quickParse($this->feed_url); 
    4040          if ($feed === false) { 
     
    4444               throw new Exception(__('No items in feed.')); 
    4545          } 
    46            
     46 
    4747          $cur = $this->core->con->openCursor($this->core->prefix.'post'); 
    4848          $this->core->con->begin(); 
     
    5656               $cur->post_status = -2; 
    5757               $cur->post_dt = strftime('%Y-%m-%d %H:%M:%S',$item->TS); 
    58                 
     58 
    5959               try { 
    6060                    $post_id = $this->core->blog->addPost($cur); 
     
    6363                    throw $e; 
    6464               } 
    65                 
     65 
    6666               foreach ($item->subject as $subject) { 
    6767                    $this->core->meta->setPostMeta($post_id,'tag',dcMeta::sanitizeMetaID($subject)); 
    6868               } 
    6969          } 
    70            
     70 
    7171          $this->core->con->commit(); 
    7272          http::redirect($this->getURL().'&do=ok'); 
    73            
     73 
    7474     } 
    75       
     75 
    7676     public function gui() 
    7777     { 
     
    7979               dcPage::success(__('Content successfully imported.')); 
    8080          } 
    81            
     81 
    8282          echo 
    8383          '<form action="'.$this->getURL(true).'" method="post">'. 
    8484          '<p>'.sprintf(__('Add a feed content to the current blog: <strong>%s</strong>.'),html::escapeHTML($this->core->blog->name)).'</p>'. 
    85            
     85 
    8686          '<p><label for="feed_url">'.__('Feed URL:').'</label>'. 
    8787          form::field('feed_url',50,300,html::escapeHTML($this->feed_url)).'</p>'. 
    88            
     88 
    8989          '<p>'. 
    9090          $this->core->formNonce(). 
    9191          form::hidden(array('do'),1). 
    9292          '<input type="submit" value="'.__('Import').'" /></p>'. 
    93            
     93 
    9494          '</form>'; 
    9595     } 
    9696} 
    97 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map