mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 11:22:40 +01:00
21 lines
553 B
PHP
21 lines
553 B
PHP
|
<?php
|
||
|
|
||
|
$key = 'metamta.maniphest.public-create-email';
|
||
|
echo "Migrating `$key` to new application email infrastructure...\n";
|
||
|
$value = PhabricatorEnv::getEnvConfigIfExists($key);
|
||
|
$maniphest = new PhabricatorManiphestApplication();
|
||
|
|
||
|
if ($value) {
|
||
|
try {
|
||
|
PhabricatorMetaMTAApplicationEmail::initializeNewAppEmail(
|
||
|
PhabricatorUser::getOmnipotentUser())
|
||
|
->setAddress($value)
|
||
|
->setApplicationPHID($maniphest->getPHID())
|
||
|
->save();
|
||
|
} catch (AphrontDuplicateKeyQueryException $ex) {
|
||
|
// already migrated?
|
||
|
}
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|