Dotclear


Ignore:
Timestamp:
09/08/13 13:33:57 (12 years ago)
Author:
kevin@…
Branch:
Ticket #1539
Message:

Ticket #1539 : Correction de plusieurs regression

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r1816 r1822  
    5151 
    5252# Getting categories 
    53 $categories_combo = array(' ' => ''); 
    54 try { 
    55      $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    56      while ($categories->fetch()) { 
    57           $categories_combo[] = new formSelectOption( 
    58                str_repeat('  ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 
    59                $categories->cat_id 
    60      ); 
    61      } 
    62 } catch (Exception $e) { } 
    63  
    64 # Status combo 
    65 foreach ($core->blog->getAllPostStatus() as $k => $v) { 
    66      $status_combo[$v] = (string) $k; 
    67 } 
     53$categories_combo = dcAdminCombos::getCategoriesCombo( 
     54     $core->blog->getCategories(array('post_type'=>'post')) 
     55); 
     56 
     57$status_combo = dcAdminCombos::getPostStatusesCombo(); 
     58 
    6859$img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />'; 
    6960 
    7061# Formaters combo 
    71 foreach ($core->getFormaters() as $v) { 
    72      $formaters_combo[$v] = $v; 
    73 } 
     62$formaters_combo = dcAdminCombos::getFormatersCombo(); 
    7463 
    7564# Languages combo 
    7665$rs = $core->blog->getLangs(array('order'=>'asc')); 
    77 $all_langs = l10n::getISOcodes(0,1); 
    78 $lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1)); 
    79 while ($rs->fetch()) { 
    80      if (isset($all_langs[$rs->post_lang])) { 
    81           $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang; 
    82           unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]); 
    83      } else { 
    84           $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang; 
    85      } 
    86 } 
    87 unset($all_langs); 
    88 unset($rs); 
     66$lang_combo = dcAdminCombos::getLangsCombo($rs,true); 
    8967 
    9068# Validation flag 
     
    305283 
    306284# Getting categories 
    307 $categories_combo = array(__('(No cat)') => ''); 
    308 try { 
    309      $categories = $core->blog->getCategories(array('post_type'=>'post')); 
    310      if (!$categories->isEmpty()) { 
    311           while ($categories->fetch()) { 
    312                $catparents_combo[] = $categories_combo[] = new formSelectOption( 
    313                     str_repeat('&nbsp;&nbsp;',$categories->level-1).($categories->level-1 == 0 ? '' : '&bull; ').html::escapeHTML($categories->cat_title), 
    314                     $categories->cat_id 
    315                ); 
    316           } 
    317      } 
    318 } catch (Exception $e) { } 
    319  
     285$categories_combo = dcAdminCombos::getCategoriesCombo( 
     286     $core->blog->getCategories(array('post_type'=>'post')) 
     287); 
    320288/* DISPLAY 
    321289-------------------------------------------------------- */ 
     
    446414                         '</p>'. 
    447415                         '<p class="format_control control_wiki">'. 
    448                          '<a id="convert-xhtml" class="button maximal '.($post_id && $post_format != 'wiki' ? 'hide' : '').'" href="post.php?id='.$post_id.'&amp;xconv=1">'. 
     416                         '<a id="convert-xhtml" class="button'.($post_id && $post_format != 'wiki' ? 'hide' : '').'" href="post.php?id='.$post_id.'&amp;xconv=1">'. 
    449417                         __('Convert to XHTML').'</a></p></div>')), 
    450418          'metas-box' => array( 
     
    517485           
    518486          "post_excerpt" => 
    519                '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'<span class="form-note">'. 
     487               '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').' <span class="form-note">'. 
    520488               __('Introduction to the post.').'</span></label> '. 
    521489               form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). 
     
    529497           
    530498          "post_notes" => 
    531                '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').'<span class="form-note">'. 
     499               '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').' <span class="form-note">'. 
    532500               __('Unpublished notes.').'</span></label>'. 
    533501               form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). 
     
    580548      
    581549     foreach ($sidebar_items as $id => $c) { 
    582           echo '<div id="'.$id.'" class="box">'. 
     550          echo '<div id="'.$id.'" class="sb-box">'. 
    583551               '<h4>'.$c['title'].'</h4>'; 
    584552          foreach ($c['items'] as $e_name=>$e_content) { 
     
    633601      
    634602     echo 
    635      '<div id="comments" class="multi-part" title="'.__('Comments').'">'; 
     603     '<div id="comments" class="clear multi-part" title="'.__('Comments').'">'; 
    636604           
    637605     # --BEHAVIOR-- adminCommentsActionsCombo 
     
    640608     $has_action = !empty($combo_action) && (!$trackbacks->isEmpty() || !$comments->isEmpty()); 
    641609     echo  
    642      '<p class="top-add"><a class="button add onblog_link" href="#comment-form">'.__('Add a comment').'</a></p>'; 
     610     '<p class="top-add"><a class="button add" href="#comment-form">'.__('Add a comment').'</a></p>'; 
    643611      
    644612     if ($has_action) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map