Dotclear


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/posts_actions.php

    r1719 r1637  
    414414     # categories list 
    415415     # Getting categories 
    416      $categories_combo = dcAdminCombos::getCategoriesCombo( 
    417           $core->blog->getCategories(array('post_type'=>'post')) 
    418      ); 
     416     $categories_combo = array(__('(No cat)') => ''); 
     417     try { 
     418          $categories = $core->blog->getCategories(array('post_type'=>'post')); 
     419          if (!$categories->isEmpty()) { 
     420          while ($categories->fetch()) { 
     421                    $catparents_combo[] = $categories_combo[] = new formSelectOption( 
     422                         str_repeat('  ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 
     423                    $categories->cat_id 
     424               ); 
     425          } 
     426          } 
     427     } catch (Exception $e) { } 
    419428      
    420429     echo 
     
    456465     # Languages combo 
    457466     $rs = $core->blog->getLangs(array('order'=>'asc')); 
    458      $lang_combo = dcAdminCombos::getLangsCombo($rs,true); 
     467     $all_langs = l10n::getISOcodes(0,1); 
     468     $lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1)); 
     469     while ($rs->fetch()) { 
     470          if (isset($all_langs[$rs->post_lang])) { 
     471               $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang; 
     472               unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]); 
     473          } else { 
     474               $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang; 
     475          } 
     476     } 
     477     unset($all_langs); 
     478     unset($rs); 
    459479      
    460480     echo 
Note: See TracChangeset for help on using the changeset viewer.

Sites map