[Code Style] mod_mod_random_image : varioous codestyle fixes#4574
Closed
marcodings wants to merge 36 commits intojoomla:stagingfrom
marcodings:mod_random_image
Closed
[Code Style] mod_mod_random_image : varioous codestyle fixes#4574marcodings wants to merge 36 commits intojoomla:stagingfrom marcodings:mod_random_image
marcodings wants to merge 36 commits intojoomla:stagingfrom
marcodings:mod_random_image
Conversation
Replace php trim method with JFilterInput TRIM filter to deal with non-breaking and multibyte spaces
Suppose you have a web server using Joomla where this web server is both reachable via http://www.example.org/ and http:/example.org/. With the current implementation of the redirection plugin you need to define two redirections within the redirect manager component for every page you want to automatically redirect from its old location to its new location: old page: http://www.example.org/path/to/old/page.html => new page: http://www.example.org/path/to/new/page.html old page: http://example.org/path/to/old/page.html => new page: http://example.org/path/to/new/page.html With my proposed file change it would be sufficient to define only one redirection in this case: old server-relative page: /path/to/old/page.html => new server-relative page: /path/to/new/page.html line 75: tabs removed check redirect found whether published
#4221 was incorrectly using str_replace() to remove the default language code when needed. As str_replace acts globally on the subject, the language code was removed also out of context (e.g. when part of an alias). With this PR I use instead preg_replace with the limit of one substitution. due to the fact that the /language-code string to be replaced appears just after the host name and cannot be part of it (due to the/), this should guarantee the correct replacements of the language code only. I took the occasion to make a bit of clean-up by aggregating some redundantly duplicated code
Codestyle fixes for plugins Cleanup PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Code Style] mod_mod_random_image : varioous codestyle fixes