mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 23:40:57 +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";
|