Dotclear

Changeset 1775:fd4b24fb574d for admin


Ignore:
Timestamp:
09/10/13 11:29:38 (12 years ago)
Author:
Dsls
Branch:
default
Message:

Much better this way, see #1564

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/posts.php

    r1719 r1775  
    5353 
    5454     $categories_combo = array_merge( 
    55           array('-' => ''), 
    56           dcAdminCombos::getCategoriesCombo($categories) 
    57      ); 
    58      $categories_combo[__('(No cat)')] = 'NULL'; 
     55          array( 
     56               new formSelectOption('-',''), 
     57               new formSelectOption(__('(No cat)'),'NULL')),           
     58          dcAdminCombos::getCategoriesCombo($categories,false) 
     59     ); 
     60     $categories_values = array(); 
     61     foreach ($categories_combo as $cat) { 
     62          if (isset($cat->value)) { 
     63               $categories_values[$cat->value]=true; 
     64          } 
     65     } 
    5966      
    6067     $status_combo = array_merge( 
     
    161168 
    162169# - Categories filter 
    163 if ($cat_id !== '' && in_array($cat_id,$categories_combo)) { 
     170if ($cat_id !== '' && isset($categories_values[$cat_id])) { 
    164171     $params['cat_id'] = $cat_id; 
    165172     $show_filters = true; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map