Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F45864954
T361997
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
Aklapper
Apr 11 2024, 12:14 PM
2024-04-11 12:14:01 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
T361997
View Options
diff --git a/src/applications/diffusion/controller/DiffusionCloneController.php b/src/applications/diffusion/controller/DiffusionCloneController.php
index bf118bcf6d..7378383b25 100644
--- a/src/applications/diffusion/controller/DiffusionCloneController.php
+++ b/src/applications/diffusion/controller/DiffusionCloneController.php
@@ -23,24 +23,44 @@ final class DiffusionCloneController extends DiffusionController {
$warning = null;
$uris = $repository->getURIs();
- foreach ($uris as $uri) {
- if ($uri->getIsDisabled()) {
- continue;
- }
- if ($uri->getEffectiveDisplayType() == $display_never) {
- continue;
+ // If Differential is uninstalled and the repo is observed (=not hosted),
+ // only expose its external canonical URI, ignoring each URI's display
+ // preferences and ignoring if the canonical URI to observe is enabled.
+ if (!id(new PhabricatorDifferentialApplication())->isInstalled() &&
+ !$repository->isHosted()) {
+ foreach ($uris as $uri) {
+ if ($uri->getEffectiveIOType() == PhabricatorRepositoryURI::IO_OBSERVE) {
+ if ($repository->isSVN()) {
+ $label = phutil_tag_div('diffusion-clone-label', pht('Checkout'));
+ } else {
+ $label = phutil_tag_div('diffusion-clone-label', pht('Clone'));
+ }
+ $view->addProperty(
+ $label,
+ $this->renderCloneURI($repository, $uri));
+ break;
+ }
}
-
- if ($repository->isSVN()) {
- $label = phutil_tag_div('diffusion-clone-label', pht('Checkout'));
- } else {
- $label = phutil_tag_div('diffusion-clone-label', pht('Clone'));
+ } else {
+ foreach ($uris as $uri) {
+ if ($uri->getIsDisabled()) {
+ continue;
+ }
+
+ if ($uri->getEffectiveDisplayType() == $display_never) {
+ continue;
+ }
+
+ if ($repository->isSVN()) {
+ $label = phutil_tag_div('diffusion-clone-label', pht('Checkout'));
+ } else {
+ $label = phutil_tag_div('diffusion-clone-label', pht('Clone'));
+ }
+
+ $view->addProperty(
+ $label,
+ $this->renderCloneURI($repository, $uri));
}
-
- $view->addProperty(
- $label,
- $this->renderCloneURI($repository, $uri));
}
if (!$view->hasAnyProperties()) {
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15679890
Default Alt Text
T361997 (2 KB)
Attached To
Mode
P59764 T361997
Attached
Detach File
Event Timeline
Log In to Comment