removed unused code#1631
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
WalkthroughRemoved module activation/deactivation handling from the admin modules workflow: backend no longer propagates or applies Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
htdocs/modules/system/templates/admin/system_modules_confirm.tpl (1)
27-27:⚠️ Potential issue | 🟡 MinorStale
colspan="3"— table is now single-column.The footer
<td>still spans 3 columns, but the 3-column layout (Module / Action / Order) no longer exists after this cleanup. It should be updated tocolspan="1"(or just dropped, since it has no effect on a single-column table).🛠️ Proposed fix
- <td colspan="3"> + <td>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@htdocs/modules/system/templates/admin/system_modules_confirm.tpl` at line 27, The footer cell in the admin modules confirmation template still uses colspan="3" even though the table is now single-column; update the footer <td> in system_modules_confirm.tpl to remove or change the colspan attribute to "1" (or omit it entirely) so it no longer incorrectly spans three columns—look for the <td colspan="3"> element in the template and replace it with a plain <td> or <td colspan="1"> to match the single-column layout.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@htdocs/modules/system/templates/admin/system_modules_confirm.tpl`:
- Line 27: The footer cell in the admin modules confirmation template still uses
colspan="3" even though the table is now single-column; update the footer <td>
in system_modules_confirm.tpl to remove or change the colspan attribute to "1"
(or omit it entirely) so it no longer incorrectly spans three columns—look for
the <td colspan="3"> element in the template and replace it with a plain <td> or
<td colspan="1"> to match the single-column layout.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
htdocs/modules/system/admin/modulesadmin/main.phphtdocs/modules/system/templates/admin/system_modules_confirm.tpl
💤 Files with no reviewable changes (1)
- htdocs/modules/system/admin/modulesadmin/main.php
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
There was a problem hiding this comment.
Pull request overview
This PR removes unused code from the module administration confirmation workflow. The confirmation page previously displayed three columns (Module, Action, Order) but only the Module name changes were actually processed. Status changes (activate/deactivate) and ordering are now handled through JavaScript/AJAX on the main list page via drag-and-drop and toggle buttons.
Changes:
- Removed Action and Order columns from the confirmation table
- Removed backend processing code for status and weight changes in the submit operation
- Fixed indentation in several template sections
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| htdocs/modules/system/templates/admin/system_modules_confirm.tpl | Removed Action and Order column headers and cells, removed hidden form fields for status/weight, improved indentation |
| htdocs/modules/system/admin/modulesadmin/main.php | Removed newstatus assignment in confirm case and all status change logic in submit case |
Copyable Unit Test EditsCopyable Editstests/unit/htdocs/modules/system/admin/modulesadmin/MainControllerTest.phpThis is a new file. tests/unit/htdocs/modules/system/admin/modulesadmin/README_TESTS.mdThis is a new file. tests/unit/htdocs/modules/system/templates/SystemModulesConfirmTemplateTest.phpThis is a new file. |
Review of PR #1631 — "removed unused code"OverviewThe PR removes dead code from the module admin confirmation workflow. The confirmation page previously had 3 columns (Module, Action, Order), but
The removal is internally consistent — no dangling references remain. The generic POST extraction at Issues Found1. Stale
|
Static analysis tests for main.php (54 tests) covering security checks, operation routing, input sanitization, and all CRUD operations. Template tests for system_modules_confirm.tpl (39 tests) covering structure, Smarty syntax, hidden fields, and regression checks. Based on CodeRabbit suggestions from PR XOOPS#1631, adapted for correct path resolution, XOOPS Smarty delimiters, and aligned source formatting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
@ggoffy Thank you! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1631 +/- ##
==============================
==============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



in module admin you can change module name and sorting of modules.
if you change the module name and click on "Submit" you will be redirected to confirm page.
on confirm page under "Action" there is always "No changes" as the information about oldstatus isn't provided anymore by moduladmin.php&op=confirm, status change is handled on list page of moduladmin with js
also there is never a value in column "Order" as the necessary information is also not provided by moduladmin.php&op=confirm anymore, as the weighting is handled by drag&drop
moduladmin.php&op=submit handles only changes in names
therefore the columns and the dead code can be removed
Summary by CodeRabbit
Bug Fixes
UI/UX