User tests: Successful: Unsuccessful:
Pull Request for Issue # .
This pull request (PR) removes misleading information from a code comment.
We once have implemented the ExtensionHelper to safely determine if an extension is core or not because the formerly used criterion "extension_id < 10000" is not fulfilled on sites with a longer update history where the "copy the files, run the database fixer and do a discovery installation" method once was used when that method was documented to be valid.
All checks for "extension_id < 10000" have been replaced by using the ExtensionHelper.
But the comment fixed by this PR here still tells the old way, and this is dangerous in case if someone with old experience wants to contribute and finds it and thinks that's the way it has to be done.
In addition this PR extends the same comment regarding discovered extensions so it's more clear (as suggested by @brianteeman ).
Code review: Check that the SQL statement below the comment changed by this PR does not use any hard-coded value of 10000 in the where
but uses
->where($db->quoteName('extension_id') . ' NOT IN (' . $joomlaCoreExtensionIds . ')')
to limit the extension_id
to get core extensions only.
Comment tells that core extensions have an extension_id lower than 10000 but that's not always true.
Misleading part of the comment removed.
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_installer |
Are you sure that the second part is always true. (excludes discovered extensions)
I just tested one of my sites with lots of discovered extensions and they are all in the extensions and updatesites table
@brianteeman That's the ->where($db->quoteName('state') . ' != -1');
doing.
If you have discovered an extension but haven't installed yet, there is already created a record in the extensions table, and that has status -1.
@brianteeman Should I change the and discovered extensions
into and discovered but not yet installed extensions
?
Labels |
Added:
?
|
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Merging thanks.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-08-06 18:36:18 |
Closed_By | ⇒ | zero-24 | |
Labels |
Added:
?
?
Removed: ? |
Are you sure that the second part is always true. (excludes discovered extensions)
I just tested one of my sites with lots of discovered extensions and they are all in the extensions and updatesites table