@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.

Make "DifferentialDiff->properties" a proper "attachable" property

Summary:
See PHI498. This should be initialized to "self::ATTACHABLE" like other attachable properties, but is currently initialized to "array()".

Initialize it the normal way and try to catch all code paths which may have accessed it without actually loading and attaching it.

Also, remove UI for the very old "excuse" property, which "arc" has not written for well more than a year.

Test Plan: Grepped for affected symbols, loaded various revision pages. Somewhat tricky to be 100% sure that every pathway is caught, but it should be obvious if I missed anything once someone hits the code path.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

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

+5 -29
+1 -7
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 1282 1282 } 1283 1283 1284 1284 private function buildUnitMessagesView( 1285 - $diff, 1285 + DifferentialDiff $diff, 1286 1286 DifferentialRevision $revision) { 1287 1287 $viewer = $this->getViewer(); 1288 1288 ··· 1310 1310 return null; 1311 1311 } 1312 1312 1313 - $excuse = null; 1314 - if ($diff->hasDiffProperty('arc:unit-excuse')) { 1315 - $excuse = $diff->getProperty('arc:unit-excuse'); 1316 - } 1317 - 1318 1313 return id(new HarbormasterUnitSummaryView()) 1319 1314 ->setViewer($viewer) 1320 - ->setExcuse($excuse) 1321 1315 ->setBuildable($diff->getBuildable()) 1322 1316 ->setUnitMessages($diff->getUnitMessages()) 1323 1317 ->setLimit(5)
+4 -1
src/applications/differential/storage/DifferentialDiff.php
··· 42 42 private $unsavedChangesets = array(); 43 43 private $changesets = self::ATTACHABLE; 44 44 private $revision = self::ATTACHABLE; 45 - private $properties = array(); 45 + private $properties = self::ATTACHABLE; 46 46 private $buildable = self::ATTACHABLE; 47 47 48 48 private $unitMessages = self::ATTACHABLE; ··· 338 338 } 339 339 340 340 public function attachProperty($key, $value) { 341 + if (!is_array($this->properties)) { 342 + $this->properties = array(); 343 + } 341 344 $this->properties[$key] = $value; 342 345 return $this; 343 346 }
-21
src/applications/harbormaster/view/HarbormasterUnitSummaryView.php
··· 5 5 private $buildable; 6 6 private $messages; 7 7 private $limit; 8 - private $excuse; 9 8 private $showViewAll; 10 9 11 10 public function setBuildable(HarbormasterBuildable $buildable) { ··· 20 19 21 20 public function setLimit($limit) { 22 21 $this->limit = $limit; 23 - return $this; 24 - } 25 - 26 - public function setExcuse($excuse) { 27 - $this->excuse = $excuse; 28 22 return $this; 29 23 } 30 24 ··· 86 80 87 81 if ($this->limit) { 88 82 $table->setLimit($this->limit); 89 - } 90 - 91 - $excuse = $this->excuse; 92 - if (strlen($excuse)) { 93 - $excuse_icon = id(new PHUIIconView()) 94 - ->setIcon('fa-commenting-o red'); 95 - 96 - $table->setNotice( 97 - array( 98 - $excuse_icon, 99 - ' ', 100 - phutil_tag('strong', array(), pht('Excuse:')), 101 - ' ', 102 - $excuse, 103 - )); 104 83 } 105 84 106 85 $box->setTable($table);