? ? Pending

User tests: Successful: Unsuccessful:

avatar Ayesh
Ayesh
2 Nov 2020

Pull Request for Issue # .

Summary of Changes

PHP 5.3 adds support for the __DIR__ magic constant, and its result is identical to dirname(__FILE__). The former is more clearer and does not has a function call, giving a tiny performance advantage as well.

Testing Instructions

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Documentation Changes Required

avatar Ayesh Ayesh - open - 2 Nov 2020
avatar Ayesh Ayesh - change - 2 Nov 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2020
Category Administration com_joomlaupdate Front End Plugins
avatar richard67
richard67 - comment - 3 Nov 2020

PHP 5.3 adds support for the __DIR__ magic constant, and its result is identical to dirname(__FILE__).

Can we be sure that this is true for symbolic links, too?

avatar Ayesh
Ayesh - comment - 3 Nov 2020

PHP 5.3 adds support for the __DIR__ magic constant, and its result is identical to dirname(__FILE__).

Can we be sure that this is true for symbolic links, too?

Hi @richard67 - yes. __DIR__ will have the same result as if we were to dirname(__FILE__).

Both __FILE__ and __DIR__ resolve symlink, and always use realpaths; not the symlink paths.

avatar zero-24
zero-24 - comment - 3 Nov 2020

Please revert the changes in the restore.php as that is threated as external code. The change in the action logs would than be fine but why do we use that constant there directly anyway?

Did't we use a different constant in other places?

avatar Ayesh Ayesh - change - 3 Nov 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 3 Nov 2020
Category Administration com_joomlaupdate Front End Plugins Front End Plugins
avatar Ayesh
Ayesh - comment - 3 Nov 2020

Hi @zero-24, I force-pushed with changes in restore.php reverted.
I don't really know the answer to the second question, sorry. I was randomly checking out the code and wanted to send a PR for the odd improvement I came across.

avatar SharkyKZ SharkyKZ - test_item - 3 Nov 2020 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 3 Nov 2020

I have tested this item successfully on 8dafe8e


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

avatar Quy Quy - test_item - 4 Nov 2020 - Tested successfully
avatar Quy
Quy - comment - 4 Nov 2020

I have tested this item successfully on 8dafe8e


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

avatar Quy Quy - change - 4 Nov 2020
The description was changed
Status Pending Ready to Commit
avatar Quy
Quy - comment - 4 Nov 2020

RTC


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

avatar Quy Quy - edited - 4 Nov 2020
avatar HLeithner HLeithner - merge - 18 Nov 2020
avatar HLeithner HLeithner - change - 18 Nov 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-11-18 21:00:27
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 18 Nov 2020
avatar HLeithner
HLeithner - comment - 18 Nov 2020

Thanks

Add a Comment

Login with GitHub to post a comment