chore(pm): retire the pre-2013 configuration page - #6416
Open
e107help[bot] wants to merge 1 commit into
Open
Conversation
pm_conf.php is the private messenger's original admin page and nothing reaches it any more. plugin.xml links admin_config.php and nothing else, the plugin ships no legacy plugin.php for the $eplug_conffile route, and no tracked file outside pm_conf.php named it. It had also stopped working on its own terms. Its include of the admin language file was commented out, and boot.php skips the admin-language load for any plugin that ships a global language file, which pm does, so nothing defined the ADLAN_PM_* constants the page printed. On PHP 8 an undefined constant is fatal, so the page died on the first one it reached. What it still held that mattered was a second copy of the orphaned attachment sweep, reading e107_plugins/pm/attachments/ while attachments have stored into the media tree since 2013. Keeping it meant maintaining two wrong sweeps for a page with no reader. The copy that survives in admin_config.php is the better one: the retired page posted its maximum send under the wrong field name, so that setting was never saveable from it, and the only pref it edited that admin_config.php does not is dropdown, which nothing reads. One string was worth rescuing. ADLAN_PM_82 explains what happens above pm_max_send, that the rest of a send is queued for the cron task, and the retired page was the only screen that showed it; admin_config.php left that field's help empty, so the field carries it now. The surviving sweep is left exactly as it is, legacy path and FIXME included: correcting it would turn a maintenance button into a bulk delete of every file stranded on a live site, and that is a decision for the maintainer rather than part of retiring a dead page. The two acceptance-test comments that described the retired page's copy of the sweep now name the one that remains. The six admin language entries this leaves unused stay in English_admin.php. They are captions in an array admin_config.php shares, which already carried unused keys, and pruning numbered keys from a shared language file is a tidy with a translation cost and no behaviour behind it. Refs #6159
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.
Why
The private messenger ships two admin pages, and only one of them is reachable.
plugin.xmldeclaresadmin_config.phpas the plugin's single admin link (plugin.xmlL6-L8), the plugin ships no legacyplugin.phpfor the old$eplug_conffileroute, and nothing in the tree namespm_conf.phpoutside itself.It had also stopped working on its own terms. Its include of the plugin's admin language file is commented out (
pm_conf.phpL112), and the admin bootstrap skips the admin-language load for any plugin that ships a global language file (boot.phpL274-L280), which pm does. Nothing defined theADLAN_PM_*constants the page printed, and an undefined constant is fatal on PHP 8, so the page died on the first one it reached.What it still held that mattered was a second copy of the orphaned attachment sweep, reading
e107_plugins/pm/attachments/while attachments have stored into the media tree since 2013 (pm_conf.phpL792). Keeping the page meant maintaining two wrong sweeps for a screen with no reader.@Deltik settled this on 2026-09-12: retire the page rather than correct its sweep.
Refs #6159
What Changed
e107_plugins/pm/pm_conf.phpis deleted.e107_plugins/pm/admin_config.phpkeeps its legacy sweep path and its//FIXME wrong path.exactly as they are (admin_config.phpL727). Correcting that path is the half of PM attachments are stored in the media tree and deleted from the plugin directory, so every attachment outlives its message #6159 that is not a bot's to take.ADLAN_PM_82says what happens above the maximum send, that the rest of a send is queued for the cron task, and the retired page was the only screen that showed it (English_admin.phpL66). The surviving page left that field's help empty (admin_config.phpL144), so the field carries it now.plugin.xmltakes the date of this commit. The version stays at 3.1, which was already bumped after the last tag.Nothing else of the page is lost. Its maintenance half was a copy of
admin_config.php's, differing in whitespace and a builder rewrite, and the retired copy was the broken one: its maximum-send field posted under the namepm_option-vrather thanpm_max_send(pm_conf.phpL401), so that setting was never saveable from it. The only pref it edited thatadmin_config.phpdoes not isdropdown, which nothing reads.Six admin language entries are left unused by the deletion. They stay: they are captions in an array
admin_config.phpshares, that file already carried unused keys, and pruning numbered keys from a language file is a tidy with a translation cost and no behaviour behind it.How It Was Tested
There is no reproduction test, because a page nothing reaches and that fatals on load has no behaviour to red. What the change is measured against instead is what still reads it: a tree-wide search for the file name returns nothing after the deletion, and
plugin.xmlwas already the only thing that decided which page the Configure button opens.The whole unit suite ran green on PHP 8.5 with MariaDB 10.11, along with PHP lint on the changed files and the downgrade check. The acceptance suite, which is where the two repointed comments live, did not run locally; CI is its first run and the first run of the full matrix.
Backwards Compatibility
Rendered HTML is untouched on every page that survives. No class, method, signature or pref changes, so a theme or a plugin reading the pm prefs sees what it saw before.
A site that upgrades by unpacking a release over its own tree keeps its copy of the deleted file, because core has no obsolete-file list to hang a deletion on. That is not a new hazard: the stale page's sweep reads the same legacy directory the surviving sweep keeps by decision, its prefs form merges rather than replaces, and it fatals on PHP 8 anyway. Whether a retirement like this should reach installed sites through the plugin's upgrade hook is a wider question than this PR, and @Deltik's.
AI Model
Claude Opus 5 (claude-opus-5), as e107help.
Checklist
masterat aa36836 before changing anything