- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/posts_actions.php
r1719 r1637 414 414 # categories list 415 415 # 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) { } 419 428 420 429 echo … … 456 465 # Languages combo 457 466 $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); 459 479 460 480 echo
Note: See TracChangeset
for help on using the changeset viewer.