Dotclear

Changeset 2494:b168f47c7f9c


Ignore:
Timestamp:
10/26/13 18:32:22 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2496:e33dcbc18e36, 2497:2d9e6d2d0d65
Message:

Typo, thank's mirovonben, fixes #1821

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/actions/class.dcactionposts.php

    r2309 r2494  
    2828 
    2929     } 
    30       
     30 
    3131     public function beginPage($breadcrumb='',$head='') { 
    3232          if ($this->in_plugin) { 
     
    4646          echo '<p><a class="back" href="'.$this->getRedirection(true).'">'.__('Back to entries list').'</a></p>'; 
    4747     } 
    48       
     48 
    4949     public function endPage() { 
    5050          if ($this->in_plugin) { 
     
    5454          } 
    5555     } 
    56       
     56 
    5757     public function error(Exception $e) { 
    5858          $this->core->error->add($e->getMessage()); 
     
    6666          $this->endPage(); 
    6767     } 
    68       
     68 
    6969     protected function fetchEntries($from) { 
    7070          if (!empty($from['entries'])) 
    7171          { 
    7272               $entries = $from['entries']; 
    73                 
     73 
    7474               foreach ($entries as $k => $v) { 
    7575                    $entries[$k] = (integer) $v; 
    7676               } 
    77                 
     77 
    7878               $params['sql'] = 'AND P.post_id IN('.implode(',',$entries).') '; 
    79                 
     79 
    8080               if (!isset($from['full_content']) || empty($from['full_content'])) { 
    8181                    $params['no_content'] = true; 
    8282               } 
    83                 
     83 
    8484               if (isset($from['post_type'])) { 
    8585                    $params['post_type'] = $from['post_type']; 
    8686               } 
    87                 
     87 
    8888               $posts = $this->core->blog->getPosts($params); 
    8989               while ($posts->fetch())  { 
    9090                    $this->entries[$posts->post_id] = $posts->post_title; 
    9191               } 
    92                $this->rs = $posts;            
     92               $this->rs = $posts; 
    9393          } else { 
    9494               $this->rs = $this->core->con->select("SELECT blog_id FROM ".$this->core->prefix."blog WHERE false");; 
     
    9797} 
    9898 
    99 class dcDefaultPostActions  
     99class dcDefaultPostActions 
    100100{ 
    101101     public static function adminPostsActionsPage($core, $ap) { 
     
    170170          $ap->redirect(true); 
    171171     } 
    172       
     172 
    173173     public static function doUpdateSelectedPost($core, dcPostsActionsPage $ap, $post) { 
    174174          $posts_ids = $ap->getIDs(); 
     
    199199          $ap->redirect(true); 
    200200     } 
    201       
     201 
    202202     public static function doDeletePost($core, dcPostsActionsPage $ap, $post) { 
    203203 
     
    212212               $core->callBehavior('adminBeforePostDelete',(integer) $post_id); 
    213213          } 
    214            
     214 
    215215          # --BEHAVIOR-- adminBeforePostsDelete 
    216216          $core->callBehavior('adminBeforePostsDelete',$posts_ids); 
    217            
     217 
    218218          $core->blog->delPosts($posts_ids); 
    219219          dcPage::addSuccessNotice(sprintf( 
     
    225225               count($posts_ids)) 
    226226          ); 
    227            
     227 
    228228          $ap->redirect(false); 
    229229     } 
     
    242242                    $cur_cat->cat_url = ''; 
    243243                    $title = $cur_cat->cat_title; 
    244                      
     244 
    245245                    $parent_cat = !empty($post['new_cat_parent']) ? $post['new_cat_parent'] : ''; 
    246                      
     246 
    247247                    # --BEHAVIOR-- adminBeforeCategoryCreate 
    248248                    $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 
    249                      
     249 
    250250                    $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 
    251                      
     251 
    252252                    # --BEHAVIOR-- adminAfterCategoryCreate 
    253253                    $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 
    254254               } 
    255                 
     255 
    256256               $core->blog->updPostsCategory($posts_ids, $new_cat_id); 
    257257               $title = $core->blog->getCategory($new_cat_id); 
     
    280280               $categories_combo = dcAdminCombos::getCategoriesCombo( 
    281281                    $core->blog->getCategories() 
    282                );              
     282               ); 
    283283               echo 
    284284               '<form action="'.$ap->getURI().'" method="post">'. 
     
    286286               '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 
    287287               form::combo(array('new_cat_id'),$categories_combo,''); 
    288                 
     288 
    289289               if ($core->auth->check('categories', $core->blog->id)) { 
    290                     echo  
     290                    echo 
    291291                    '<div>'. 
    292292                    '<p id="new_cat">'.__('Create a new category for the post(s)').'</p>'. 
     
    298298                    '</div>'; 
    299299               } 
    300                 
     300 
    301301               echo 
    302302               $core->formNonce(). 
     
    308308 
    309309          } 
    310       
     310 
    311311     } 
    312312     public static function doChangePostAuthor($core, dcPostsActionsPage $ap, $post) { 
     
    320320                    throw new Exception(__('This user does not exist')); 
    321321               } 
    322                 
     322 
    323323               $cur = $core->con->openCursor($core->prefix.'post'); 
    324324               $cur->user_id = $new_user_id; 
     
    368368               '<p><label for="new_auth_id" class="classic">'.__('New author (author ID):').'</label> '. 
    369369               form::field('new_auth_id',20,255); 
    370                 
     370 
    371371               echo 
    372372                    $core->formNonce().$ap->getHiddenFields(). 
     
    403403                              html::escapeHTML($core->blog->name) => '', 
    404404                              $ap->getCallerTitle() => $ap->getRedirection(true), 
    405                               _('Change language for this selection') => '' 
     405                              __('Change language for this selection') => '' 
    406406               ))); 
    407407               # lang list 
     
    420420               unset($all_langs); 
    421421               unset($rs); 
    422                 
     422 
    423423               echo 
    424424               '<form action="'.$ap->getURI().'" method="post">'. 
    425425               $ap->getCheckboxes(). 
    426                 
     426 
    427427               '<p><label for="new_lang" class="classic">'.__('Entry language:').'</label> '. 
    428428               form::combo('new_lang',$lang_combo,''); 
    429                 
     429 
    430430               echo 
    431431                    $core->formNonce().$ap->getHiddenFields(). 
Note: See TracChangeset for help on using the changeset viewer.

Sites map