Changeset View
Changeset View
Standalone View
Standalone View
scripts/sql/manage_storage.php
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
if (strlen($host)) { | if (strlen($host)) { | ||||
$ref = null; | $ref = null; | ||||
$refs = PhabricatorDatabaseRef::getLiveRefs(); | $refs = PhabricatorDatabaseRef::getLiveRefs(); | ||||
// Include the master in case the user is just specifying a redundant | // Include the master in case the user is just specifying a redundant | ||||
// "--host" flag for no reason and does not actually have a database | // "--host" flag for no reason and does not actually have a database | ||||
// cluster configured. | // cluster configured. | ||||
$refs[] = PhabricatorDatabaseRef::getMasterDatabaseRef(); | foreach (PhabricatorDatabaseRef::getMasterDatabaseRefs() as $master_ref) { | ||||
$refs[] = $master_ref; | |||||
} | |||||
foreach ($refs as $possible_ref) { | foreach ($refs as $possible_ref) { | ||||
if ($possible_ref->getHost() == $host) { | if ($possible_ref->getHost() == $host) { | ||||
$ref = $possible_ref; | $ref = $possible_ref; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |