? ? Pending

User tests: Successful: 0 Unsuccessful: 0

avatar alikon
alikon
21 Jul 2019

Summary of Changes

use prepared statement for SQL

Testing Instructions

test com_actionlogs

Expected result

work as before

Actual result

N/A

avatar alikon alikon - open - 21 Jul 2019
avatar alikon alikon - change - 21 Jul 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Jul 2019
Category Administration
avatar richard67
richard67 - comment - 21 Jul 2019

I have tested this item successfully on ff662ca


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

avatar richard67 richard67 - test_item - 21 Jul 2019 - Tested successfully
avatar richard67
richard67 - comment - 21 Jul 2019

I have not tested this item.

Will test later again after code review changes.


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

avatar richard67 richard67 - test_item - 21 Jul 2019 - Not tested
avatar alikon alikon - change - 22 Jul 2019
Labels Added: ?
avatar richard67
richard67 - comment - 22 Jul 2019

@alikon I get a PHP notice as follows when testing your PR now:

[Mon Jul 22 19:02:51.665201 2019] [php7:notice] [pid 933] [client 192.168.98.1:50765] PHP Notice: Undefined property: stdClass::$name in /home/richard/lamp/public_html/joomla-cms-4.0-dev/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php on line 66, referer: https://www.joomla-40-dev.vmnet2.local/administrator/index.php?option=com_actionlogs&view=actionlogs

I will update my 4.0-dev branch to latest changes and set up my testing environment from scratch and test again.

avatar alikon
alikon - comment - 22 Jul 2019

Sorry folks for all the issues my pr's raise, I will learn a more user
friendly way to make pr's to lower my shit and reduce the community
efforts, but thanks for your efforts to help

Il lun 22 lug 2019, 19:06 Richard Fath notifications@github.com ha
scritto:

@alikon https://github.com/alikon I get a PHP notice as follows when
testing your PR now:

[Mon Jul 22 19:02:51.665201 2019] [php7:notice] [pid 933] [client
192.168.98.1:50765] PHP Notice: Undefined property: stdClass::$name in
/home/richard/lamp/public_html/joomla-cms-4.0-dev/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php
on line 66, referer:
https://www.joomla-40-dev.vmnet2.local/administrator/index.php?option=com_actionlogs&view=actionlogs

I will update my 4.0-dev branch to latest changes and set up my testing
environment from scratch and test again.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/joomla/joomla-cms/pull/25671?email_source=notifications&email_token=AABMLMKNHZVFFAXAX4XVVZTQAXSJZA5CNFSM4IFQ7H6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2QQSNA#issuecomment-513870132,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABMLMPTIK3E53NLSWS36W3QAXSJZANCNFSM4IFQ7H6A
.

avatar richard67
richard67 - comment - 22 Jul 2019

Just don't code in trains ... especially not in Italian ones ? ... joking ... German trains are even worse ... so I would recommend to use Swiss trains ;-) Ah, and maybe more important: Never code on mobile phone, I never would do that, never. It is simply too small for such works.

avatar richard67
richard67 - comment - 22 Jul 2019

I have tested this item ? unsuccessfully on 25c3a3e

When doing CSV export of all action log entries, I get a PHP warning as follows:

PHP Notice: Undefined property: stdClass::$name in /home/richard/lamp/public_html/joomla-cms-4.0-dev/administrator/components/com_actionlogs/Helper/ActionlogsHelper.php on line 66, referer: https://www.joomla-40-dev.vmnet2.local/administrator/index.php?option=com_actionlogs&view=actionlogs

Without this PR I don't get that.

From reading code I did not find the reason for that yet. Will continue to try to find it, but maybe someone else is faster.


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

avatar richard67 richard67 - test_item - 22 Jul 2019 - Tested unsuccessfully
avatar richard67
richard67 - comment - 22 Jul 2019

@alikon Beside the PHP notice for which I haven't found the reason yet: Is there any reason why you haven't converted the query here to prepared?

avatar richard67
richard67 - comment - 22 Jul 2019

@SharkyKZ I tried to test this PR but got a PHP notice, details see my test result above. I've tried to find the reason, but I was not successful. Maybe you can have a look?

avatar alikon
alikon - comment - 23 Jul 2019

@richard67 there is nothing to be prepared there

(i.e. there are no variables to be binded)

avatar richard67
richard67 - comment - 23 Jul 2019

Sorry, check line 111 3 lines below the one l’ve linked.

avatar alikon
alikon - comment - 23 Jul 2019

if you mean this ->leftJoin('#__users AS u ON a.user_id = u.id'); previuos answer is still valid, maybe you can argue that should be ->join('LEFT' and quoteName 'd

avatar HLeithner
HLeithner - comment - 23 Jul 2019

I think he mean

			->select('a.*, u.name')
			->from('#__action_logs AS a')
			->leftJoin('#__users AS u ON a.user_id = u.id');
		// Get ordering
		$fullorderCol = $this->state->get('list.fullordering', 'a.id DESC');

to

			->select('a.*,' . $db->quoteName('u.name'))
			->from($db->quoteName('#__action_logs', 'a'))
			->leftJoin($db->quoteName('#__users', 'u'), $db->quoteName('a.user_id') .' = ' . $db->quoteName('u.id'));
		// Get ordering
		$fullorderCol = $this->state->get('list.fullordering', $db->quoteName('a.id') . ' DESC');
avatar richard67
richard67 - comment - 23 Jul 2019

@alikon You are right, nothing to be prepared statement there. My mistake. But as Harald said, quoting would be nice.

avatar alikon
alikon - comment - 23 Jul 2019

@richard67 can you confirm that #25671 (comment) has been fixed by my last commit...... if so i'll update your last cs comment accordindlngly

avatar richard67
richard67 - comment - 23 Jul 2019

@alikon I will test a bit later after eating. What do you mean with my last cs comment?

avatar alikon
alikon - comment - 23 Jul 2019

buon appetito
this one #25671 (comment)

avatar richard67
richard67 - comment - 23 Jul 2019

I have tested this item successfully on 8289497


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

avatar richard67 richard67 - test_item - 23 Jul 2019 - Tested successfully
avatar Quy
Quy - comment - 23 Jul 2019

I have tested this item successfully on 8289497


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

avatar Quy Quy - test_item - 23 Jul 2019 - Tested successfully
avatar Quy Quy - change - 23 Jul 2019
The description was changed
Status Pending Ready to Commit
avatar Quy Quy - edited - 23 Jul 2019
avatar Quy Quy - edited - 23 Jul 2019
avatar Quy
Quy - comment - 23 Jul 2019

RTC


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

avatar alikon
alikon - comment - 23 Jul 2019

pleas wait 1 sec

avatar alikon alikon - change - 23 Jul 2019
Labels Added: ?
avatar alikon
alikon - comment - 23 Jul 2019

please a quick retest when you can, updated with the last discover

avatar richard67
richard67 - comment - 23 Jul 2019

I have tested this item successfully on 5125c15


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

avatar richard67
richard67 - comment - 23 Jul 2019

I have tested this item successfully on 5125c15


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

avatar richard67 richard67 - test_item - 23 Jul 2019 - Tested successfully
avatar Quy
Quy - comment - 23 Jul 2019

I have tested this item successfully on 4bf5324


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

avatar Quy Quy - test_item - 23 Jul 2019 - Tested successfully
avatar alikon
alikon - comment - 23 Jul 2019

RTC


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

avatar alikon
alikon - comment - 23 Jul 2019

RTC


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

avatar wilsonge wilsonge - change - 24 Jul 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-07-24 12:38:22
Closed_By wilsonge
avatar wilsonge wilsonge - close - 24 Jul 2019
avatar wilsonge wilsonge - merge - 24 Jul 2019
avatar wilsonge
wilsonge - comment - 24 Jul 2019

Thanks!

Add a Comment

Login with GitHub to post a comment