2014-07-23 02:03:09 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$applications = array(
|
|
|
|
'Audit',
|
|
|
|
'Auth',
|
|
|
|
'Calendar',
|
|
|
|
'ChatLog',
|
|
|
|
'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 )--------------------------------------------------- */
|
|
|
|
|
|
|
|
|
Convert some loadPreferences() to getUserSetting()
Summary:
Ref T4103. This doesn't get everything, but takes care of most of the easy stuff.
The tricky-ish bit here is that I need to move timezones, pronouns and translations to proper settings. I expect to pursue that next.
Test Plan:
- Grepped for `loadPreferences` to identify callsites.
- Changed start-of-week setting, loaded Calendar, saw correct start.
- Visited welcome page, read "Adjust Settings" point.
- Loaded Conpherence -- I changed behavior here slightly (switching threads drops the title glyph) but it wasn't consistent to start with and this seems like a good thing to push to the next version of Conpherence.
- Enabled Filetree, toggled in Differential.
- Disabled Filetree, no longer visible in Differential.
- Changed "Unified Diffs" preference to "Small Screens" vs "Always".
- Toggled filetree in Diffusion.
- Edited a task, saw sensible projects in policy dropdown.
- Viewed user profile, uncollapsed/collapsed side nav, reloaded page, sticky'd.
- Toggled "monospaced textareas", used a comment box, got appropriate fonts.
- Toggled durable column.
- Disabled title glyphs.
- Changed monospaced font to 18px/36px impact.
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T4103
Differential Revision: https://secure.phabricator.com/D16004
2016-06-01 22:59:08 +02:00
|
|
|
// This originally migrated pinned applications in user preferences, but was
|
|
|
|
// removed to simplify preference changes after about 22 months.
|
2014-07-23 02:03:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
/* -( Dashboard installs )------------------------------------------------- */
|
|
|
|
|
2019-04-26 00:34:42 +02:00
|
|
|
// This originally migrated dashboard install locations, but was removed
|
|
|
|
// after about 5 years.
|
2014-07-23 02:03:09 +02:00
|
|
|
|
|
|
|
/* -( Phabricator configuration )------------------------------------------ */
|
|
|
|
|
|
|
|
$config_key = 'phabricator.uninstalled-applications';
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Migrating `%s` config...', $config_key)."\n";
|
2014-07-23 02:03:09 +02:00
|
|
|
|
|
|
|
$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';
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Migrating `%s` config...', $config_key)."\n";
|
2014-07-23 02:03:09 +02:00
|
|
|
|
|
|
|
$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();
|
|
|
|
}
|