@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Unknown Database Configuration Options: Show Delete command

Summary:
Phorge shows instructions how to delete an "Unknown Configuration Option" in the configuration source "Local Config".
It does not show instructions how to delete an "Unknown Configuration Option" in the configuration source "Database".
Add such instructions, as an alternative to updating/editing a value and keeping that option.

Closes T16294

Test Plan:
* `use phabricator_config;`
* `INSERT INTO config_entry (phid, namespace, configKey, value, isDeleted, dateCreated, dateModified) VALUES ('PHID-CONF-00000000000000000000', 'default', 'broken.config-key', 'true', 0, 1760260409, 1760260409);`
* Look at http://phorge.localhost/config/issue/config.unknown.broken.config-key/ before and after this patch
* Follow the new instructions to delete that config option again

Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan

Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16294

Differential Revision: https://we.phorge.it/D26414

+15
+8
src/applications/config/check/PhabricatorExtraConfigSetupCheck.php
··· 85 85 86 86 if ($found_database) { 87 87 $issue->addPhabricatorConfig($key); 88 + 89 + $command = hsprintf( 90 + '<tt>%s $</tt>./bin/config delete --database %s', 91 + PlatformSymbols::getPlatformServerPath(), 92 + $key); 93 + $issue->addCommand($command); 94 + 95 + 88 96 } 89 97 } 90 98
+7
src/applications/config/view/PhabricatorSetupIssueView.php
··· 54 54 } 55 55 56 56 $commands = $issue->getCommands(); 57 + 58 + $or = null; 59 + if ($configs && $commands) { 60 + $or = pht('Or:'); 61 + } 62 + 57 63 if ($commands) { 58 64 $run_these = pht('Run these %d command(s):', count($commands)); 59 65 $description[] = phutil_tag( ··· 62 68 'class' => 'setup-issue-config', 63 69 ), 64 70 array( 71 + phutil_tag('p', array(), $or), 65 72 phutil_tag('p', array(), $run_these), 66 73 phutil_tag('pre', array(), phutil_implode_html("\n", $commands)), 67 74 ));