Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Code Simplify For Article view #32538

Merged
merged 1 commit into from Mar 10, 2021

Conversation

joomdonation
Copy link
Contributor

Pull Request for Issue # .

Summary of Changes

This PR improves code of Article view abit:

  • Use a standard way to check if the current active menu item is linked to article (same with code on other places, not use strpos like before.
  • Remove repeating code (the case for there is no active menu item and active menu item is not linked to article is the same, can be moved into single else block)

Testing Instructions

  1. Apply patch
  2. Access to an article on the site. Make sure it is still working as before

Alternative, code review should be enough.

@toivo
Copy link
Contributor

toivo commented Feb 27, 2021

I have tested this item ✅ successfully on 22f97ef

Tested successfully in Beta8-dev of 27 February using PHP 8.0.2.


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

@ceford
Copy link
Contributor

ceford commented Mar 10, 2021

I have tested this item ✅ successfully on 22f97ef


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

@joomdonation
Copy link
Contributor Author

Could someone mark this PR as RTC so that it could be merged if it is possible? There is still bad code in the view and I want to work on further clean up after this one get merged. Thanks !

@alikon
Copy link
Contributor

alikon commented Mar 10, 2021

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 10, 2021
@Quy Quy added the PR-4.0-dev label Mar 10, 2021
@rdeutz rdeutz merged commit 0220b8b into joomla:4.0-dev Mar 10, 2021
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Mar 10, 2021
@rdeutz rdeutz added this to the Joomla 4.0 milestone Mar 10, 2021
@joomdonation joomdonation deleted the article_view_code_simplify branch March 11, 2021 01:04
dgrammatiko pushed a commit to dgrammatiko/joomla-cms that referenced this pull request Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants