Changeset 439:f6cd5149f3ad
- Timestamp:
- 06/29/11 13:00:05 (14 years ago)
- Branch:
- formfilters
- Children:
- 451:d7906f5087fd, 460:663ac1e64e11
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/posts.php
r417 r439 74 74 75 75 $selected_combo = array( 76 __(' selected') => '1',77 __(' not selected') => '0'76 __('is selected') => '1', 77 __('is not selected') => '0' 78 78 ); 79 79 … … 147 147 $params['no_content'] = true; 148 148 149 $filterSet = new dcFilterSet('posts .php');149 $filterSet = new dcFilterSet('posts','posts.php'); 150 150 class monthComboFilter extends comboFilter { 151 151 public function applyFilter($params) { … … 162 162 ->addFilter(new comboFilter( 163 163 'post_status',__('Status'), 'post_status', $status_combo,array('singleval' => 1))) 164 ->addFilter(new comboFilter(165 'post_selected',__(' Selected'), 'post_selected', $selected_combo))164 ->addFilter(new booleanFilter( 165 'post_selected',__('The post :'), 'post_selected', $selected_combo)) 166 166 ->addFilter(new comboFilter( 167 167 'lang',__('Lang'), 'post_lang', $lang_combo)) 168 168 ->addFilter(new monthComboFilter( 169 169 'month',__('Month'), 'post_month', $dt_m_combo,array('singleval' => 1))); 170 170 171 $filterSet->setValues($_GET); 171 172 -
inc/core/class.dc.blog.php
r417 r439 1433 1433 { 1434 1434 $field = $field == 'cat_id' ? 'cat_id' : 'cat_url'; 1435 1436 1435 $sub = array(); 1437 1436 $not = array(); … … 1447 1446 if (isset($args['not'])) { $not[$id] = 1; } 1448 1447 if (isset($args['sub'])) { $sub[$id] = 1; } 1448 $nullExcluded = false; 1449 1449 if ($field == 'cat_id') { 1450 1450 if (preg_match('/^null$/i',$id)) { 1451 1451 $queries[$id] = 'P.cat_id IS NULL'; 1452 if ($not[$id]) { 1453 $nullExcluded = true; 1454 } 1452 1455 } 1453 1456 else { … … 1491 1494 1492 1495 if ($sql[1]) { 1493 $sql[1] = '(P.cat_id IS NULL OR NOT('.$sql[1].'))'; 1496 if ($nullExcluded) { 1497 $sql[1] = 'NOT('.$sql[1].')'; 1498 } else { 1499 $sql[1] = '(P.cat_id IS NULL OR NOT('.$sql[1].'))'; 1500 } 1494 1501 } else { 1495 1502 unset($sql[1]); 1496 1503 } 1497 1498 1504 return implode(' AND ',$sql); 1499 1505 }
Note: See TracChangeset
for help on using the changeset viewer.