Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/site/PhabricatorPlatformSite.php
<?php | <?php | ||||
final class PhabricatorPlatformSite extends PhabricatorSite { | final class PhabricatorPlatformSite extends PhabricatorSite { | ||||
public function getDescription() { | public function getDescription() { | ||||
return pht('Serves the core platform and applications.'); | return pht('Serves the core platform and applications.'); | ||||
} | } | ||||
public function getPriority() { | public function getPriority() { | ||||
return 1000; | return 1000; | ||||
} | } | ||||
public function newSiteForRequest(AphrontRequest $request) { | public function newSiteForRequest(AphrontRequest $request) { | ||||
// If no base URI has been configured yet, match this site so the user | // If no base URI has been configured yet, match this site so the user | ||||
// can follow setup instructions. | // can follow setup instructions. | ||||
$base_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri'); | $base_uri = PhabricatorEnv::getEnvConfig('phabricator.base-uri'); | ||||
if (!strlen($base_uri)) { | if (!phutil_nonempty_string($base_uri)) { | ||||
return new PhabricatorPlatformSite(); | return new PhabricatorPlatformSite(); | ||||
} | } | ||||
$uris = array(); | $uris = array(); | ||||
$uris[] = $base_uri; | $uris[] = $base_uri; | ||||
$uris[] = PhabricatorEnv::getEnvConfig('phabricator.production-uri'); | $uris[] = PhabricatorEnv::getEnvConfig('phabricator.production-uri'); | ||||
$allowed = PhabricatorEnv::getEnvConfig('phabricator.allowed-uris'); | $allowed = PhabricatorEnv::getEnvConfig('phabricator.allowed-uris'); | ||||
Show All 32 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