mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
4d4712b58d
Summary: This commit removes ChatLog entirely. All of the application files are removed, and the migrations used are stubbed out. I stubbed the migrations as that allows for existing installs to make no changes, but new installs will not create the database. Fixes T15126 Test Plan: Loaded up http://phorge.local/chatlog and confirmed the 404. Loaded up http://phorge.local/applications/view/PhabricatorChatLogApplication and confirmed the 404. Created a new database prefix and ran `bin/storage upgrade` against it, confirmed that the chatlog database was not created. Restored another prefix (an old one) and ran `bin/storage upgrade` and confirmed database was not deleted. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: avivey, tobiaswiese, valerio.bozzolan, Cigaryno Maniphest Tasks: T15126 Differential Revision: https://we.phorge.it/D25480
126 lines
2.6 KiB
PHP
126 lines
2.6 KiB
PHP
<?php
|
|
|
|
$applications = array(
|
|
'Audit',
|
|
'Auth',
|
|
'Calendar',
|
|
'Conduit',
|
|
'Config',
|
|
'Conpherence',
|
|
'Countdown',
|
|
'Daemons',
|
|
'Dashboard',
|
|
'Differential',
|
|
'Diffusion',
|
|
'Diviner',
|
|
'Doorkeeper',
|
|
'Drydock',
|
|
'Fact',
|
|
'Feed',
|
|
'Files',
|
|
'Flags',
|
|
'Harbormaster',
|
|
'Help',
|
|
'Herald',
|
|
'Home',
|
|
'Legalpad',
|
|
'Macro',
|
|
'MailingLists',
|
|
'Maniphest',
|
|
'Applications',
|
|
'MetaMTA',
|
|
'Notifications',
|
|
'Nuance',
|
|
'OAuthServer',
|
|
'Owners',
|
|
'Passphrase',
|
|
'Paste',
|
|
'People',
|
|
'Phame',
|
|
'Phlux',
|
|
'Pholio',
|
|
'Phortune',
|
|
'PHPAST',
|
|
'Phragment',
|
|
'Phrequent',
|
|
'Phriction',
|
|
'Policy',
|
|
'Ponder',
|
|
'Project',
|
|
'Releeph',
|
|
'Repositories',
|
|
'Search',
|
|
'Settings',
|
|
'Slowvote',
|
|
'Subscriptions',
|
|
'Support',
|
|
'System',
|
|
'Test',
|
|
'Tokens',
|
|
'Transactions',
|
|
'Typeahead',
|
|
'UIExamples',
|
|
'XHProf',
|
|
);
|
|
$map = array();
|
|
|
|
foreach ($applications as $application) {
|
|
$old_name = 'PhabricatorApplication'.$application;
|
|
$new_name = 'Phabricator'.$application.'Application';
|
|
$map[$old_name] = $new_name;
|
|
}
|
|
|
|
|
|
/* -( User preferences )--------------------------------------------------- */
|
|
|
|
|
|
// This originally migrated pinned applications in user preferences, but was
|
|
// removed to simplify preference changes after about 22 months.
|
|
|
|
|
|
/* -( Dashboard installs )------------------------------------------------- */
|
|
|
|
// This originally migrated dashboard install locations, but was removed
|
|
// after about 5 years.
|
|
|
|
/* -( Phabricator configuration )------------------------------------------ */
|
|
|
|
$config_key = 'phabricator.uninstalled-applications';
|
|
echo pht('Migrating `%s` config...', $config_key)."\n";
|
|
|
|
$config = PhabricatorConfigEntry::loadConfigEntry($config_key);
|
|
$old_config = $config->getValue();
|
|
$new_config = array();
|
|
|
|
if ($old_config) {
|
|
foreach ($old_config as $application => $uninstalled) {
|
|
$new_config[idx($map, $application, $application)] = $uninstalled;
|
|
}
|
|
|
|
$config
|
|
->setIsDeleted(0)
|
|
->setValue($new_config)
|
|
->save();
|
|
}
|
|
|
|
|
|
/* -( phabricator.application-settings )----------------------------------- */
|
|
|
|
$config_key = 'phabricator.application-settings';
|
|
echo pht('Migrating `%s` config...', $config_key)."\n";
|
|
|
|
$config = PhabricatorConfigEntry::loadConfigEntry($config_key);
|
|
$old_config = $config->getValue();
|
|
$new_config = array();
|
|
|
|
if ($old_config) {
|
|
foreach ($old_config as $application => $settings) {
|
|
$application = preg_replace('/^PHID-APPS-/', '', $application);
|
|
$new_config['PHID-APPS-'.idx($map, $application, $application)] = $settings;
|
|
}
|
|
|
|
$config
|
|
->setIsDeleted(0)
|
|
->setValue($new_config)
|
|
->save();
|
|
}
|