Changeset 7617 for trunk/src/includes/common/engagements.php
- Timestamp:
- 09/22/2026 10:09:30 PM (3 days ago)
- File:
-
- 1 edited
-
trunk/src/includes/common/engagements.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/common/engagements.php
r7529 r7617 894 894 $option_key = $this->get_user_option_key( $meta_key, 0, true ); 895 895 $bbp_db = bbp_db(); 896 $user_ids = $bbp_db->get_col( "SELECT user_id FROM {$bbp_db->usermeta} WHERE meta_key = '{$option_key}'");896 $user_ids = $bbp_db->get_col( $bbp_db->prepare( "SELECT user_id FROM {$bbp_db->usermeta} WHERE meta_key = %s", $option_key ) ); 897 897 $u_count = count( $user_ids ); 898 898 … … 940 940 $option_key = $this->get_user_option_key( $meta_key, $object_id, true ); 941 941 $bbp_db = bbp_db(); 942 $user_ids = $bbp_db->get_col( "SELECT user_id FROM {$bbp_db->usermeta} WHERE meta_key = '{$option_key}' and FIND_IN_SET('{$object_id}', meta_value) > 0");942 $user_ids = $bbp_db->get_col( $bbp_db->prepare( "SELECT user_id FROM {$bbp_db->usermeta} WHERE meta_key = %s AND FIND_IN_SET( %d, meta_value ) > 0", $option_key, $object_id ) ); 943 943 944 944 // Always cache results (even if empty, to prevent multiple misses)
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)