Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php $applications = array( 'Audit', 'Auth', 'Calendar', 'ChatLog', 'Conduit',..

Decoded Output download

<?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  )--------------------------------------------------- */


// 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)."
";

$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)."
";

$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();
}
 ?>

Did this file decode correctly?

Original Code

<?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  )--------------------------------------------------- */


// 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();
}

Function Calls

pht 1

Variables

$map [{'key': 'PhabricatorApplicationAudit', 'value': 'PhabricatorAuditApplication'}]
$new_name PhabricatorAuditApplication
$old_name PhabricatorApplicationAudit
$config_key phabricator.uninstalled-applications
$application XHProf
$applications [{'key': 0, 'value': 'Audit'}, {'key': 1, 'value': 'Auth'}, {'key': 2, 'value': 'Calendar'}, {'key': 3, 'value': 'ChatLog'}, {'key': 4, 'value': 'Conduit'}, {'key': 5, 'value': 'Config'}, {'key': 6, 'value': 'Conpherence'}, {'key': 7, 'value': 'Countdown'}, {'key': 8, 'value': 'Daemons'}, {'key': 9, 'value': 'Dashboard'}, {'key': 10, 'value': 'Differential'}, {'key': 11, 'value': 'Diffusion'}, {'key': 12, 'value': 'Diviner'}, {'key': 13, 'value': 'Doorkeeper'}, {'key': 14, 'value': 'Drydock'}, {'key': 15, 'value': 'Fact'}, {'key': 16, 'value': 'Feed'}, {'key': 17, 'value': 'Files'}, {'key': 18, 'value': 'Flags'}, {'key': 19, 'value': 'Harbormaster'}, {'key': 20, 'value': 'Help'}, {'key': 21, 'value': 'Herald'}, {'key': 22, 'value': 'Home'}, {'key': 23, 'value': 'Legalpad'}, {'key': 24, 'value': 'Macro'}, {'key': 25, 'value': 'MailingLists'}, {'key': 26, 'value': 'Maniphest'}, {'key': 27, 'value': 'Applications'}, {'key': 28, 'value': 'MetaMTA'}, {'key': 29, 'value': 'Notifications'}, {'key': 30, 'value': 'Nuance'}, {'key': 31, 'value': 'OAuthServer'}, {'key': 32, 'value': 'Owners'}, {'key': 33, 'value': 'Passphrase'}, {'key': 34, 'value': 'Paste'}, {'key': 35, 'value': 'People'}, {'key': 36, 'value': 'Phame'}, {'key': 37, 'value': 'Phlux'}, {'key': 38, 'value': 'Pholio'}, {'key': 39, 'value': 'Phortune'}, {'key': 40, 'value': 'PHPAST'}, {'key': 41, 'value': 'Phragment'}, {'key': 42, 'value': 'Phrequent'}, {'key': 43, 'value': 'Phriction'}, {'key': 44, 'value': 'Policy'}, {'key': 45, 'value': 'Ponder'}, {'key': 46, 'value': 'Project'}, {'key': 47, 'value': 'Releeph'}, {'key': 48, 'value': 'Repositories'}, {'key': 49, 'value': 'Search'}, {'key': 50, 'value': 'Settings'}, {'key': 51, 'value': 'Slowvote'}, {'key': 52, 'value': 'Subscriptions'}, {'key': 53, 'value': 'Support'}, {'key': 54, 'value': 'System'}, {'key': 55, 'value': 'Test'}, {'key': 56, 'value': 'Tokens'}, {'key': 57, 'value': 'Transactions'}, {'key': 58, 'value': 'Typeahead'}, {'key': 59, 'value': 'UIExamples'}, {'key': 60, 'value': 'XHProf'}]

Stats

MD5 c8f97a4802940438da952ea436479cca
Eval Count 0
Decode Time 212 ms