Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorStorageSetupCheck.php
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | final class PhabricatorStorageSetupCheck extends PhabricatorSetupCheck { | ||||
private function checkS3() { | private function checkS3() { | ||||
$access_key = PhabricatorEnv::getEnvConfig('amazon-s3.access-key'); | $access_key = PhabricatorEnv::getEnvConfig('amazon-s3.access-key'); | ||||
$secret_key = PhabricatorEnv::getEnvConfig('amazon-s3.secret-key'); | $secret_key = PhabricatorEnv::getEnvConfig('amazon-s3.secret-key'); | ||||
$region = PhabricatorEnv::getEnvConfig('amazon-s3.region'); | $region = PhabricatorEnv::getEnvConfig('amazon-s3.region'); | ||||
$endpoint = PhabricatorEnv::getEnvConfig('amazon-s3.endpoint'); | $endpoint = PhabricatorEnv::getEnvConfig('amazon-s3.endpoint'); | ||||
$how_many = 0; | $how_many = 0; | ||||
if (strlen($access_key)) { | if (phutil_nonempty_string($access_key)) { | ||||
$how_many++; | $how_many++; | ||||
} | } | ||||
if (strlen($secret_key)) { | if (phutil_nonempty_string($secret_key)) { | ||||
$how_many++; | $how_many++; | ||||
} | } | ||||
if (strlen($region)) { | if (phutil_nonempty_string($region)) { | ||||
$how_many++; | $how_many++; | ||||
} | } | ||||
if (strlen($endpoint)) { | if (phutil_nonempty_string($endpoint)) { | ||||
$how_many++; | $how_many++; | ||||
} | } | ||||
// Nothing configured, no issues here. | // Nothing configured, no issues here. | ||||
if ($how_many === 0) { | if ($how_many === 0) { | ||||
return; | return; | ||||
} | } | ||||
Show All 22 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0