Dotclear

Changeset 439:f6cd5149f3ad for inc


Ignore:
Timestamp:
06/29/11 13:00:05 (14 years ago)
Author:
Dsls <dsls@…>
Branch:
formfilters
Children:
451:d7906f5087fd, 460:663ac1e64e11
Message:

Missed some changes... completes [438]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.blog.php

    r417 r439  
    14331433     { 
    14341434          $field = $field == 'cat_id' ? 'cat_id' : 'cat_url'; 
    1435            
    14361435          $sub = array(); 
    14371436          $not = array(); 
     
    14471446               if (isset($args['not'])) { $not[$id] = 1; } 
    14481447               if (isset($args['sub'])) { $sub[$id] = 1; } 
     1448               $nullExcluded = false; 
    14491449               if ($field == 'cat_id') { 
    14501450                    if (preg_match('/^null$/i',$id)) { 
    14511451                         $queries[$id] = 'P.cat_id IS NULL'; 
     1452                         if ($not[$id]) { 
     1453                              $nullExcluded = true; 
     1454                         } 
    14521455                    } 
    14531456                    else { 
     
    14911494           
    14921495          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               } 
    14941501          } else { 
    14951502               unset($sql[1]); 
    14961503          } 
    1497            
    14981504          return implode(' AND ',$sql); 
    14991505     } 
Note: See TracChangeset for help on using the changeset viewer.

Sites map