Changeset 10977 for trunk/src/bp-groups/bp-groups-functions.php
- Timestamp:
- 08/01/2016 08:09:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-functions.php
r10885 r10977 876 876 877 877 // Normalize group data. 878 $int_keys = array( 'id', 'group_id', 'user_id', 'inviter_id' ); 879 $bool_keys = array( 'is_admin', 'is_mod', 'is_confirmed', 'is_banned', 'invite_sent' ); 878 880 foreach ( $groups as &$group ) { 879 881 // Integer values. 880 foreach ( array( 'id', 'group_id', 'user_id', 'inviter_id' )as $index ) {882 foreach ( $int_keys as $index ) { 881 883 $group->{$index} = intval( $group->{$index} ); 882 884 } 883 885 884 886 // Boolean values. 885 foreach ( array( 'is_admin', 'is_mod', 'is_confirmed', 'is_banned', 'invite_sent' )as $index ) {887 foreach ( $bool_keys as $index ) { 886 888 $group->{$index} = (bool) $group->{$index}; 887 889 }
Note: See TracChangeset
for help on using the changeset viewer.