Changeset 1541:4a3f328d2a74
- Timestamp:
- 07/27/13 18:11:48 (11 years ago)
- Branch:
- Ticket #1430
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.blog.php
r1540 r1541 685 685 - no_content: Don't retrieve entry content (excerpt and content) 686 686 - 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_id687 - post_id: (integer or array) Get entry with given post_id 688 688 - post_url: Get entry with given post_url field 689 689 - user_id: (integer) Get entries belonging to given user ID … … 705 705 - limit: Limit parameter 706 706 - sql_only : return the sql request instead of results. Only ids are selected 707 - exclude_ id : (array) Exclude entries with given post_id707 - exclude_post_id : (integer or array) Exclude entries with given post_id 708 708 709 709 Please note that on every cat_id or cat_url, you can add ?not to exclude … … 801 801 } 802 802 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']).') '; 805 810 } 806 811
Note: See TracChangeset
for help on using the changeset viewer.