? Success

User tests: Successful: Unsuccessful:

avatar richard67
richard67
19 Apr 2019

Pull Request for no issue.

Summary of Changes

With PR #22374 the usage of hard coded extension IDs has been removed. Thanks to @laoneo for this great work.

With that PR, statements for deleting old extensions in the schema update SQL scripts have been changed so they use the value of the element column in the extensions table to identify the record to be deleted.

Unfortunately the element value is not unique, e.g. languages have same element name for admin and site, and so there is no unique constraint which keeps any 3rd party extensions from using same element name as other extensions do. And so using the element as the only criteria in the delete statements is theoretically unsafe. Practically all works as it is now with PR #22374 , but for future schema updates using the existing ones as a template for deleting extensions it might not be granted that they are safe.

This PR here extends the where clauses in the delete statements which have been modified by PR #22374 in schema updates by additional criteria which make them as safe as possible for the particular extension type.

In addition, it changes the insert statements in schema updates for new postinstall messages to the same statements as used for new installation, so the postinstall messages have the correct extension_id = the one of files_joomla.

Testing Instructions

Code review.

@wilsonge and if possible @laoneo please review.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 19 Apr 2019
avatar richard67 richard67 - change - 19 Apr 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Apr 2019
Category SQL Administration com_admin Postgresql
avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
Safer extensions deletion in schema updates
[4.0] Safer extensions deletion in schema updates
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar richard67
richard67 - comment - 19 Apr 2019

@franz-wohlkoenig Thanks for title update. Sorry I had forgotten the "[4.0] ".

avatar richard67 richard67 - change - 19 Apr 2019
Labels Added: ?
avatar richard67 richard67 - change - 19 Apr 2019
Title
[4.0] Safer extensions deletion in schema updates
[4.0] Safer extensions deletion and better post install messages insertion in schema updates
avatar richard67 richard67 - edited - 19 Apr 2019
avatar richard67 richard67 - change - 19 Apr 2019
The description was changed
avatar richard67 richard67 - edited - 19 Apr 2019
avatar richard67
richard67 - comment - 19 Apr 2019

@zero-24 Thanks.

avatar wilsonge wilsonge - change - 20 Apr 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-04-20 22:53:27
Closed_By wilsonge
avatar wilsonge wilsonge - close - 20 Apr 2019
avatar wilsonge wilsonge - merge - 20 Apr 2019
avatar wilsonge
wilsonge - comment - 20 Apr 2019

Thanks!

Add a Comment

Login with GitHub to post a comment