Page MenuHomePhabricator

D15866.id38220.diff
No OneTemporary

D15866.id38220.diff

diff --git a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
--- a/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
+++ b/src/applications/diffusion/editor/DiffusionRepositoryEditEngine.php
@@ -165,6 +165,35 @@
return $pages;
}
+ protected function willConfigureFields($object, array $fields) {
+ // Change the default field order so related fields are adjacent.
+ $after = array(
+ 'policy.edit' => array('policy.push'),
+ );
+
+ $result = array();
+ foreach ($fields as $key => $value) {
+ $result[$key] = $value;
+
+ if (!isset($after[$key])) {
+ continue;
+ }
+
+ foreach ($after[$key] as $next_key) {
+ if (!isset($fields[$next_key])) {
+ continue;
+ }
+
+ unset($result[$next_key]);
+ $result[$next_key] = $fields[$next_key];
+ unset($fields[$next_key]);
+ }
+ }
+
+ return $result;
+ }
+
+
protected function buildCustomEditFields($object) {
$viewer = $this->getViewer();
diff --git a/src/applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php
--- a/src/applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php
+++ b/src/applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php
@@ -49,6 +49,7 @@
return array(
'policy.view',
'policy.edit',
+ 'spacePHID',
'policy.push',
);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 4:56 PM (18 h, 35 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6914762
Default Alt Text
D15866.id38220.diff (1 KB)

Event Timeline