@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove "AlmanacPropertyInterface" from "AlmanacNamespace"

Summary:
See <https://discourse.phabricator-community.org/t/i-cant-create-almanac-space/4424/>.

Almanac namespaces have never really had property support, but they implemented the interface in the original implementation.

At the time, this had no effect. Later changes integrated properties into the edit flows and broke this no-op integration.

Remove the interface for now. They could be given property support later, but need a bit of support code.

This feature is very rarely used and primarily useful for Phacility instances.

Test Plan: Created new namespaces and edited namespaces, browsed namespace UI.

Differential Revision: https://secure.phabricator.com/D21543

+1 -53
-1
src/__phutil_library_map__.php
··· 6115 6115 'PhabricatorPolicyInterface', 6116 6116 'PhabricatorApplicationTransactionInterface', 6117 6117 'PhabricatorProjectInterface', 6118 - 'AlmanacPropertyInterface', 6119 6118 'PhabricatorDestructibleInterface', 6120 6119 'PhabricatorNgramsInterface', 6121 6120 'PhabricatorConduitResultInterface',
+1 -52
src/applications/almanac/storage/AlmanacNamespace.php
··· 6 6 PhabricatorPolicyInterface, 7 7 PhabricatorApplicationTransactionInterface, 8 8 PhabricatorProjectInterface, 9 - AlmanacPropertyInterface, 10 9 PhabricatorDestructibleInterface, 11 10 PhabricatorNgramsInterface, 12 11 PhabricatorConduitResultInterface { ··· 17 16 protected $viewPolicy; 18 17 protected $editPolicy; 19 18 20 - private $almanacProperties = self::ATTACHABLE; 21 - 22 19 public static function initializeNewNamespace() { 23 20 return id(new self()) 24 21 ->setViewPolicy(PhabricatorPolicies::POLICY_USER) 25 - ->setEditPolicy(PhabricatorPolicies::POLICY_ADMIN) 26 - ->attachAlmanacProperties(array()); 22 + ->setEditPolicy(PhabricatorPolicies::POLICY_ADMIN); 27 23 } 28 24 29 25 protected function getConfiguration() { ··· 110 106 } 111 107 112 108 return $namespace; 113 - } 114 - 115 - 116 - /* -( AlmanacPropertyInterface )------------------------------------------- */ 117 - 118 - 119 - public function attachAlmanacProperties(array $properties) { 120 - assert_instances_of($properties, 'AlmanacProperty'); 121 - $this->almanacProperties = mpull($properties, null, 'getFieldName'); 122 - return $this; 123 - } 124 - 125 - public function getAlmanacProperties() { 126 - return $this->assertAttached($this->almanacProperties); 127 - } 128 - 129 - public function hasAlmanacProperty($key) { 130 - $this->assertAttached($this->almanacProperties); 131 - return isset($this->almanacProperties[$key]); 132 - } 133 - 134 - public function getAlmanacProperty($key) { 135 - return $this->assertAttachedKey($this->almanacProperties, $key); 136 - } 137 - 138 - public function getAlmanacPropertyValue($key, $default = null) { 139 - if ($this->hasAlmanacProperty($key)) { 140 - return $this->getAlmanacProperty($key)->getFieldValue(); 141 - } else { 142 - return $default; 143 - } 144 - } 145 - 146 - public function getAlmanacPropertyFieldSpecifications() { 147 - return array(); 148 - } 149 - 150 - public function newAlmanacPropertyEditEngine() { 151 - throw new PhutilMethodNotImplementedException(); 152 - } 153 - 154 - public function getAlmanacPropertySetTransactionType() { 155 - throw new PhutilMethodNotImplementedException(); 156 - } 157 - 158 - public function getAlmanacPropertyDeleteTransactionType() { 159 - throw new PhutilMethodNotImplementedException(); 160 109 } 161 110 162 111