Skip to content

[4.0][com_associations] convert to prepared statement#27088

Merged
wilsonge merged 11 commits intojoomla:4.0-devfrom
alikon:patch-121
Dec 3, 2019
Merged

[4.0][com_associations] convert to prepared statement#27088
wilsonge merged 11 commits intojoomla:4.0-devfrom
alikon:patch-121

Conversation

@alikon
Copy link
Contributor

@alikon alikon commented Nov 16, 2019

Summary of Changes

use prepared statement for SQL

Testing Instructions

test com_associations

Expected result

work as before

Actual result

N/A

@Quy
Copy link
Contributor

Quy commented Nov 17, 2019

Go to Components > Multilingual Associations

27088

$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)
Copy link
Contributor

Choose a reason for hiding this comment

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

$fields['id'] is the column name and not column value. It should not be bind. This is the case with the other changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh nooooo!!!!
what a shit i've done 🤒
i'll fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed
or better i hope so 😄

->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']
Copy link
Contributor

Choose a reason for hiding this comment

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

Apply $db->quoteName() as before this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

damned right.... 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

quoted

@Quy
Copy link
Contributor

Quy commented Nov 18, 2019

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.

@SharkyKZ
Copy link
Contributor

SharkyKZ commented Dec 2, 2019

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.

@SharkyKZ
Copy link
Contributor

SharkyKZ commented Dec 2, 2019

RTC.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27088.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Dec 2, 2019
@wilsonge wilsonge merged commit 4ca1d77 into joomla:4.0-dev Dec 3, 2019
@wilsonge
Copy link
Contributor

wilsonge commented Dec 3, 2019

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Dec 3, 2019
@wilsonge wilsonge added this to the Joomla 4.0 milestone Dec 3, 2019
@alikon alikon deleted the patch-121 branch December 3, 2019 14:38
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.

6 participants