Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/editor/PhabricatorRepositoryEditor.php
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | final class PhabricatorRepositoryEditor | ||||
protected function applyFinalEffects( | protected function applyFinalEffects( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
array $xactions) { | array $xactions) { | ||||
// If the repository does not have a local path yet, assign it one based | // If the repository does not have a local path yet, assign it one based | ||||
// on its ID. We can't do this earlier because we won't have an ID yet. | // on its ID. We can't do this earlier because we won't have an ID yet. | ||||
$local_path = $object->getLocalPath(); | $local_path = $object->getLocalPath(); | ||||
if (!strlen($local_path)) { | if ($local_path === null || !strlen($local_path)) { | ||||
$local_key = 'repository.default-local-path'; | $local_key = 'repository.default-local-path'; | ||||
$local_root = PhabricatorEnv::getEnvConfig($local_key); | $local_root = PhabricatorEnv::getEnvConfig($local_key); | ||||
$local_root = rtrim($local_root, '/'); | $local_root = rtrim($local_root, '/'); | ||||
$id = $object->getID(); | $id = $object->getID(); | ||||
$local_path = "{$local_root}/{$id}/"; | $local_path = "{$local_root}/{$id}/"; | ||||
Show All 30 Lines |