Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROD-7928 #4504

Merged
merged 8 commits into from
Oct 2, 2024
Merged

PROD-7928 #4504

merged 8 commits into from
Oct 2, 2024

Conversation

bb-yudhisthir
Copy link
Contributor

Jira Issue:

https://buddyboss.atlassian.net/browse/PROD-7928

General Note

Keep all conversations related to this PR in the associated Jira issue(s). Do NOT add comment on this PR or edit this PR’s description.

Notes to Developer

  • Ensure the IDs (i.e. PROD-1) of all associated Jira issues are reference in this PR’s title
  • Ensure that you have achieved the Definition of Done before submitting for review
  • When this PR is ready for review, move the associate Jira issue(s) to “Needs Review” (or “Code Review” for Dev Tasks)

Notes to Reviewer

  • Ensure that the Definition of Done have been achieved before approving a PR
  • When this PR is approved, move the associated Jira issue(s) to “Needs QA” (or “Approved” for Dev Tasks)

bb-yudhisthir and others added 2 commits September 12, 2024 16:32
* release: (41 commits)
Update: Grunt
Update: Grunt string-replace
Update: Version name update
Update: Language file update
grunt
Added change log
PROD-7988 - pull the API changes
PROD-7744 - Update - DB server version instead of server/host
PROD-7976 - phpcbf
PROD-7976 remove duplicate code logic
PROD-7976  Update normalizer code logic
PROD-7976 Update normalizer code logic
PROD-7933 - Remove welcome videos
[PROD-7872] Update mutual connections list styling
PROD-7517 - Fixed - If disable all CPT with WP post, then display error
PROD-7818 - Split search word and search within title and content for forum, topic and reply
PROD-7818 - Fixed - search result inconsistency when search any word within html for topic and reply
PROD-7818 - Fixed - search result inconsistency when search any word within html
PROD-7517 - Update doc block comment
PROD-7860 - Add condition to check activity empty or not
...
@@ -673,20 +673,45 @@ function bp_ps_anyfield_search( $f ) {

}

if ( in_array( $filter, array( 'contains', 'like' ) ) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ( in_array( $filter, array( 'contains', 'like' ) ) ) {
if ( in_array( $filter, array( 'contains', 'like' ), true ) ) {

Comment on lines 683 to 690
if ( 'like' === $filter ) {
$term = str_replace( '\\\\%', '\\%', $term );
$term = str_replace( '\\\\_', '\\_', $term );
$query_placeholder[] = '%' . $term . '%';
} else {
$query_placeholder[] = '%' . bp_ps_esc_like( $term ) . '%';
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ( 'like' === $filter ) {
$term = str_replace( '\\\\%', '\\%', $term );
$term = str_replace( '\\\\_', '\\_', $term );
$query_placeholder[] = '%' . $term . '%';
} else {
$query_placeholder[] = '%' . bp_ps_esc_like( $term ) . '%';
}
if ( 'like' === $filter ) {
$term = str_replace( '\\\\%', '\\%', $term );
$term = str_replace( '\\\\_', '\\_', $term );
$query_placeholder[] = '%' . $term . '%';
} else {
$query_placeholder[] = '%' . bp_ps_esc_like( $term ) . '%';
}

@@ -673,20 +673,45 @@ function bp_ps_anyfield_search( $f ) {

}

if ( in_array( $filter, array( 'contains', 'like' ) ) ) {
$every_word_clauses = array();
$query_placeholder = array();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$query_placeholder = array();
Move this variable before if ( in_array( $filter, array( 'contains', 'like' ) ) ) { this condition

bb-yudhisthir and others added 6 commits September 20, 2024 15:58
- Replaced hardcoded query placeholders with dynamic array handling.
- Updated `$wpdb->prepare()` to use spread operator for `$query_placeholder`.
- Improved readability by separating `$every_word_clauses` and `$query_placeholder` initialization.
@KartikSuthar KartikSuthar merged commit 07700cc into release Oct 2, 2024
2 of 3 checks passed
@KartikSuthar KartikSuthar deleted the PROD-7928 branch October 2, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants