Changeset 439:f6cd5149f3ad for inc
- Timestamp:
- 06/29/11 13:00:05 (14 years ago)
- Branch:
- formfilters
- Children:
- 451:d7906f5087fd, 460:663ac1e64e11
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.