? PR-4.3-dev Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
5 Mar 2023

Pull Request for Issue # .

Summary of Changes

This PR makes some cleanup and code improvement to Tour model base on my code review:

  • Use $this->getCurrentUser() to replace deprecated Factory::getUser()
  • Fixed + simplify edit state check. The code if (!$canEditState || !empty($item->default)) { seems to be copied from somewhere, very likely from com_workflow code.
  • Removed $user->authorise('core.create', '__guidedtour_steps') permission check. There is no asset __guidedtour_steps, so that check is useless
  • Rename variable from $tour_id to $tourId to follow camel case naming convention.
  • Some other small improvements

Testing Instructions

  1. Use Joomla 4.3 nightly build or any Joomla 4.3-dev installation has Guided Tours available
  2. Apply patch, try to add/edit Tour and make sure nothing is broken

Actual result BEFORE applying this Pull Request

Contains some bad/not optimized code

Expected result AFTER applying this Pull Request

Cleaner code.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [z] No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2023
Category Administration
avatar joomdonation joomdonation - open - 5 Mar 2023
avatar joomdonation joomdonation - change - 5 Mar 2023
Status New Pending
avatar joomdonation joomdonation - change - 5 Mar 2023
Labels Added: PR-4.3-dev
avatar obuisard obuisard - test_item - 9 Mar 2023 - Tested successfully
avatar obuisard
obuisard - comment - 9 Mar 2023

I have tested this item successfully on 816db2c


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

avatar khu5h1 khu5h1 - test_item - 9 Mar 2023 - Tested successfully
avatar khu5h1
khu5h1 - comment - 9 Mar 2023

I have tested this item successfully on 816db2c


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

avatar Quy Quy - change - 9 Mar 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 9 Mar 2023

RTC


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

avatar obuisard obuisard - change - 9 Mar 2023
Labels Added: ?
avatar obuisard obuisard - change - 9 Mar 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-03-09 23:56:54
Closed_By obuisard
avatar obuisard obuisard - close - 9 Mar 2023
avatar obuisard obuisard - merge - 9 Mar 2023
avatar obuisard
obuisard - comment - 9 Mar 2023

Thank you so much Tuan @joomdonation

Add a Comment

Login with GitHub to post a comment