Dotclear

Changeset 1541:4a3f328d2a74


Ignore:
Timestamp:
07/27/13 18:11:48 (11 years ago)
Author:
Lepeltier kévin
Branch:
Ticket #1430
Message:

Copier du traitement fait sur post_id

File:
1 edited

Legend:

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

    r1540 r1541  
    685685     - no_content: Don't retrieve entry content (excerpt and content) 
    686686     - post_type: Get only entries with given type (default "post", array for many types and '' for no type) 
    687      - post_id: (integer) Get entry with given post_id 
     687     - post_id: (integer or array) Get entry with given post_id 
    688688     - post_url: Get entry with given post_url field 
    689689     - user_id: (integer) Get entries belonging to given user ID 
     
    705705     - limit: Limit parameter 
    706706     - sql_only : return the sql request instead of results. Only ids are selected 
    707      - exclude_id : (array) Exclude entries with given post_id 
     707     - exclude_post_id : (integer or array) Exclude entries with given post_id 
    708708      
    709709     Please note that on every cat_id or cat_url, you can add ?not to exclude 
     
    801801          } 
    802802           
    803           if (!empty($params['exclude_id'])) { 
    804                $strReq .= 'AND post_id not in ('.implode(', ',$params['exclude_id']).') '; 
     803          if (isset($params['exclude_post_id']) && $params['exclude_post_id'] !== '') { 
     804               if (is_array($params['exclude_post_id'])) { 
     805                    array_walk($params['exclude_post_id'],create_function('&$v,$k','if($v!==null){$v=(integer)$v;}')); 
     806               } else { 
     807                    $params['exclude_post_id'] = array((integer) $params['exclude_post_id']); 
     808               } 
     809               $strReq .= 'AND P.post_id not in ('.$this->con->in($params['exclude_post_id']).') '; 
    805810          } 
    806811           
Note: See TracChangeset for help on using the changeset viewer.

Sites map