[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/config/check/ -> PhabricatorSetupCheckRepositories.php (source)

   1  <?php
   2  
   3  final class PhabricatorSetupCheckRepositories extends PhabricatorSetupCheck {
   4  
   5    protected function executeChecks() {
   6      $repo_path = PhabricatorEnv::getEnvConfig('repository.default-local-path');
   7  
   8      if (!$repo_path) {
   9        $summary = pht(
  10          "The configuration option '%s' is not set.",
  11          'repository.default-local-path');
  12        $this->newIssue('repository.default-local-path.empty')
  13          ->setName(pht('Missing Repository Local Path'))
  14          ->setSummary($summary)
  15          ->addPhabricatorConfig('repository.default-local-path');
  16        return;
  17      }
  18  
  19      if (!Filesystem::pathExists($repo_path)) {
  20        $summary = pht(
  21          'The path for local repositories does not exist, or is not '.
  22          'readable by the webserver.');
  23        $message = pht(
  24          "The directory for local repositories (%s) does not exist, or is not ".
  25          "readable by the webserver. Phabricator uses this directory to store ".
  26          "information about repositories. If this directory does not exist, ".
  27          "create it:\n\n".
  28          "%s\n".
  29          "If this directory exists, make it readable to the webserver. You ".
  30          "can also edit the configuration below to use some other directory.",
  31          phutil_tag('tt', array(), $repo_path),
  32          phutil_tag('pre', array(), csprintf('$ mkdir -p %s', $repo_path)));
  33  
  34        $this->newIssue('repository.default-local-path.empty')
  35          ->setName(pht('Missing Repository Local Path'))
  36          ->setSummary($summary)
  37          ->setMessage($message)
  38          ->addPhabricatorConfig('repository.default-local-path');
  39      }
  40  
  41    }
  42  
  43  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1