mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
23 lines
650 B
PHP
23 lines
650 B
PHP
|
<?php
|
||
|
|
||
|
$key = 'metamta.maniphest.default-public-author';
|
||
|
echo "Migrating `$key` to new application email infrastructure...\n";
|
||
|
$value = PhabricatorEnv::getEnvConfigIfExists($key);
|
||
|
$maniphest = new PhabricatorManiphestApplication();
|
||
|
$config_key =
|
||
|
PhabricatorMetaMTAApplicationEmail::CONFIG_DEFAULT_AUTHOR;
|
||
|
|
||
|
if ($value) {
|
||
|
$app_emails = id(new PhabricatorMetaMTAApplicationEmailQuery())
|
||
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||
|
->withApplicationPHIDs($maniphest->getPHID())
|
||
|
->execute();
|
||
|
|
||
|
foreach ($app_emails as $app_email) {
|
||
|
$app_email->setConfigValue($config_key, $value);
|
||
|
$app_email->save();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|