User tests: Successful: Unsuccessful:
This optimizes the routing slightly in the languagefilter plugin. The buildRule() method only does anything when SEF is enabled and thus we can drop those checks and instead make the call to the method conditional based on SEF being enabled. This also further optimizes the onAfterRoute() call, since that second setVar() call is unnecessary.
Unfortunately this is nearly untestable and should be merged on a code review.
This has come up while trying to look at a change to remove the trailing slash in our URLs.
Status | New | ⇒ | Pending |
Category | ⇒ | Front End Plugins |
It doesn't change anything. All URLs stay the same. But the code of that method only does something when we have SEF enabled. For that it checks that mode_sef parameter each time it is called, which could potentially be a few hundred times for each pageload. We can drop that check and instead only add the method to our pipeline when SEF is enabled. Long story short: This change improves the readability of what buildRule() does and is a tiny performance improvement.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-02 17:03:51 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Merged on careful review!
Some of the patch are indeed obvious.
This part below, can you explain a bit more and what will it change concretely? URL example.
Note: see my NOTE for J4 here:
#28814 (comment)
which is a BUG imho.