Changeset 1030:ad4942bddbdb for inc/core/class.dc.utils.php
- Timestamp:
- 11/19/12 12:34:31 (13 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
inc/core/class.dc.utils.php
r270 r1030 49 49 return $user_id; 50 50 } 51 52 /** 53 Cleanup a list of IDs 54 55 @param ids <b>mixed</b> ID(s) 56 @return <b>array</b> 57 */ 58 public static function cleanIds($ids) 59 { 60 $clean_ids = array(); 61 62 if (!is_array($ids)) { 63 $ids = array($ids); 64 } 65 66 foreach($ids as $id) 67 { 68 $id = abs((integer) $id); 69 70 if (!empty($id)) { 71 $clean_ids[] = $id; 72 } 73 } 74 return $clean_ids; 75 } 51 76 } 52 77
Note: See TracChangeset
for help on using the changeset viewer.