Dotclear


Ignore:
File:
1 edited

Legend:

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

    r1429 r1545  
    733733     - no_content: Don't retrieve entry content (excerpt and content) 
    734734     - post_type: Get only entries with given type (default "post", array for many types and '' for no type) 
    735      - post_id: (integer) Get entry with given post_id 
     735     - post_id: (integer or array) Get entry with given post_id 
    736736     - post_url: Get entry with given post_url field 
    737737     - user_id: (integer) Get entries belonging to given user ID 
     
    753753     - limit: Limit parameter 
    754754     - sql_only : return the sql request instead of results. Only ids are selected 
     755     - exclude_post_id : (integer or array) Exclude entries with given post_id 
    755756      
    756757     Please note that on every cat_id or cat_url, you can add ?not to exclude 
     
    846847               } 
    847848               $strReq .= 'AND P.post_id '.$this->con->in($params['post_id']); 
     849          } 
     850           
     851          if (isset($params['exclude_post_id']) && $params['exclude_post_id'] !== '') { 
     852               if (is_array($params['exclude_post_id'])) { 
     853                    array_walk($params['exclude_post_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}')); 
     854               } else { 
     855                    $params['exclude_post_id'] = array((integer) $params['exclude_post_id']); 
     856               } 
     857               $strReq .= 'AND P.post_id NOT '.$this->con->in($params['exclude_post_id']); 
    848858          } 
    849859           
Note: See TracChangeset for help on using the changeset viewer.

Sites map