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
Fix the message sent to the popup when connecting using oauth #7052
base: hotfix-7.10.x
Are you sure you want to change the base?
Fix the message sent to the popup when connecting using oauth #7052
Conversation
Codecov Report
@@ Coverage Diff @@
## hotfix #7052 +/- ##
============================================
- Coverage 10.9% 10.9% -0.01%
Complexity 42309 42309
============================================
Files 3385 3385
Lines 248654 248654
============================================
- Hits 27115 27114 -1
- Misses 221539 221540 +1 |
@@ -125,7 +125,7 @@ protected function post_save() | |||
// It's OAuth, we have to handle this specially. | |||
// We need to create a new window to handle the OAuth, and redirect this window back to the edit view | |||
// So we will handle that in javascript. | |||
$popup_warning_msg = string_format($GLOBALS['mod_strings']['LBL_ERR_POPUPS_DISABLED'], array($_SERVER['HTTP_HOST'])); | |||
$popup_warning_msg = strtr($GLOBALS['mod_strings']['LBL_ERR_POPUPS_DISABLED'], array( '{0}' => $_SERVER['HTTP_HOST'])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very "elegant" solution. Also there is the LangText::get() function which does something very similar for associative language text replacement at https://github.com/salesagility/SuiteCRM/blob/master/include/LangText.php#L329
I am not quite sure if it solves this issue with indexed parameters like "{0}". However, this PR solves the issue so I'll approve it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm having a hard time seeing it from quickly looking at that function.. I'm not sure what it does. It would be great if it was better documented in the docBlock. I'll look and see how it's used elsewhere and if there is any testing showing how's it's used; however, are you signing off on my change as is or recommending I change it?
@Dillon-Brown Just noticed you added a label to this.. what does it mean? |
b0e5eaf
to
602b966
Compare
@Dillon-Brown Rebased on latest |
@isleshocky77 Should this not be to hotfix-7.10.x or is it hotfix specific? |
@Dillon-Brown I'm running 7.11 |
Currently, the string_format() escapes the string in a way which makes a javascript error.
602b966
to
c240fa9
Compare
@Dillon-Brown Rebased on |
3149dea
to
ab954a4
Compare
1609e8b
to
b06335d
Compare
Description
Currently, the string_format() escapes the string in a way which makes a
javascript error.
Motivation and Context
When attempting to use a oauth connector I was getting a javascript error when trying to connect using EAPM.
How To Test This
Types of changes
Final checklist