Page MenuHomePhorge

D25448.1734837556.diff
No OneTemporary

D25448.1734837556.diff

diff --git a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
--- a/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
+++ b/src/applications/calendar/editor/PhabricatorCalendarImportEditEngine.php
@@ -83,12 +83,6 @@
$engine = $object->getEngine();
$can_trigger = $engine->supportsTriggers($object);
- // calendar URI import
- // note that it can contains a secret token
- // if we are here you have enough privileges to edit and see the value
- $uri_key = PhabricatorCalendarImportICSURITransaction::PARAMKEY_URI;
- $uri = $object->getParameter($uri_key);
-
$fields = array(
id(new PhabricatorTextEditField())
->setKey('name')
@@ -100,15 +94,6 @@
->setConduitTypeDescription(pht('New import name.'))
->setPlaceholder($object->getDisplayName())
->setValue($object->getName()),
- id(new PhabricatorTextEditField())
- ->setKey('uri')
- ->setLabel(pht('URI'))
- ->setDescription(pht('URI to import.'))
- ->setTransactionType(
- PhabricatorCalendarImportICSURITransaction::TRANSACTIONTYPE)
- ->setConduitDescription(pht('URI to import.'))
- ->setConduitTypeDescription(pht('New URI.'))
- ->setValue($uri),
id(new PhabricatorBoolEditField())
->setKey('disabled')
->setOptions(pht('Active'), pht('Disabled'))
diff --git a/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php b/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php
--- a/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php
+++ b/src/applications/calendar/import/PhabricatorCalendarICSURIImportEngine.php
@@ -58,16 +58,19 @@
PhabricatorCalendarImport $import) {
$fields = array();
- if ($engine->getIsCreate()) {
- $fields[] = id(new PhabricatorTextEditField())
- ->setKey('uri')
- ->setLabel(pht('URI'))
- ->setDescription(pht('URI to import.'))
- ->setTransactionType(
- PhabricatorCalendarImportICSURITransaction::TRANSACTIONTYPE)
- ->setConduitDescription(pht('URI to import.'))
- ->setConduitTypeDescription(pht('New URI.'));
- }
+ // If you are here, you already have the "can edit" capability.
+ // So you are supposed to be able to edit again your Calendar import URI.
+ $uri_key = PhabricatorCalendarImportICSURITransaction::PARAMKEY_URI;
+ $uri = $import->getParameter($uri_key);
+ $fields[] = id(new PhabricatorTextEditField())
+ ->setKey('uri')
+ ->setLabel(pht('URI'))
+ ->setDescription(pht('URI to import.'))
+ ->setTransactionType(
+ PhabricatorCalendarImportICSURITransaction::TRANSACTIONTYPE)
+ ->setConduitDescription(pht('URI to import.'))
+ ->setConduitTypeDescription(pht('New URI.'))
+ ->setValue($uri);
return $fields;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 03:19 (19 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1025272
Default Alt Text
D25448.1734837556.diff (2 KB)

Event Timeline