[4.0][com_associations] convert to prepared statement#27088
Merged
wilsonge merged 11 commits intojoomla:4.0-devfrom Dec 3, 2019
alikon:patch-121
Merged
[4.0][com_associations] convert to prepared statement#27088wilsonge merged 11 commits intojoomla:4.0-devfrom alikon:patch-121
wilsonge merged 11 commits intojoomla:4.0-devfrom
alikon:patch-121
Conversation
Quy
reviewed
Nov 16, 2019
administrator/components/com_associations/Helper/AssociationsHelper.php
Outdated
Show resolved
Hide resolved
Quy
reviewed
Nov 16, 2019
administrator/components/com_associations/Model/AssociationsModel.php
Outdated
Show resolved
Hide resolved
Contributor
Quy
reviewed
Nov 18, 2019
| $db->quoteName('asso2.key') . ' = ' . $db->quoteName('asso.key') | ||
| ) | ||
| ->join('LEFT', $db->quoteName('#__associations', 'asso2') . ' ON ' . $db->quoteName('asso2.key') . ' = ' . $db->quoteName('asso.key')); | ||
| ->bind(':id', $fields['id'], ParameterType::INTEGER) |
Contributor
There was a problem hiding this comment.
$fields['id'] is the column name and not column value. It should not be bind. This is the case with the other changes.
Contributor
Author
There was a problem hiding this comment.
oh nooooo!!!!
what a shit i've done 🤒
i'll fix it
Contributor
Author
There was a problem hiding this comment.
fixed
or better i hope so 😄
Quy
reviewed
Nov 18, 2019
| ->join('LEFT', $db->quoteName('#__languages', 'l') . ' ON ' . $db->quoteName('l.lang_code') . ' = ' . $db->quoteName($fields['language'])); | ||
| ->join('LEFT', | ||
| $db->quoteName('#__languages', 'l'), | ||
| $db->quoteName('l.lang_code') . ' = ' . $fields['language'] |
Contributor
There was a problem hiding this comment.
Apply $db->quoteName() as before this PR.
Contributor
|
I have tested this item ✅ successfully on 1389b94 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27088. |
Contributor
|
I have tested this item ✅ successfully on 4edff27 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27088. |
Contributor
|
RTC. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27088. |
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary of Changes
use prepared statement for SQL
Testing Instructions
test com_associations
Expected result
work as before
Actual result
N/A