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

Phabricator event timeline removed

Summary: Removed related files and references

Test Plan: Crossed my fingers

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2003

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

Conflicts:
src/__phutil_library_map__.php
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php

authored by

Lauri-Henrik Jalonen and committed by
epriestley
93e37e90 37b13ef2

+6 -230
+1
resources/sql/patches/20130709.droptimeline.sql
··· 1 + DROP DATABASE {$NAMESPACE}_timeline;
+1 -1
src/__celerity_resource_map__.php
··· 3011 3011 ), 3012 3012 'people-profile-css' => 3013 3013 array( 3014 - 'uri' => '/res/1f0e94c5/rsrc/css/application/people/people-profile.css', 3014 + 'uri' => '/res/d50d9502/rsrc/css/application/people/people-profile.css', 3015 3015 'type' => 'css', 3016 3016 'requires' => 3017 3017 array(
-10
src/__phutil_library_map__.php
··· 1566 1566 'PhabricatorTime' => 'infrastructure/time/PhabricatorTime.php', 1567 1567 'PhabricatorTimeGuard' => 'infrastructure/time/PhabricatorTimeGuard.php', 1568 1568 'PhabricatorTimeTestCase' => 'infrastructure/time/__tests__/PhabricatorTimeTestCase.php', 1569 - 'PhabricatorTimelineCursor' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineCursor.php', 1570 - 'PhabricatorTimelineDAO' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineDAO.php', 1571 - 'PhabricatorTimelineEvent' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineEvent.php', 1572 - 'PhabricatorTimelineEventData' => 'infrastructure/daemon/timeline/storage/PhabricatorTimelineEventData.php', 1573 1569 'PhabricatorTimelineEventView' => 'view/layout/PhabricatorTimelineEventView.php', 1574 1570 'PhabricatorTimelineExample' => 'applications/uiexample/examples/PhabricatorTimelineExample.php', 1575 - 'PhabricatorTimelineIterator' => 'infrastructure/daemon/timeline/cursor/PhabricatorTimelineIterator.php', 1576 1571 'PhabricatorTimelineView' => 'view/layout/PhabricatorTimelineView.php', 1577 1572 'PhabricatorToken' => 'applications/tokens/storage/PhabricatorToken.php', 1578 1573 'PhabricatorTokenController' => 'applications/tokens/controller/PhabricatorTokenController.php', ··· 3512 3507 'PhabricatorTestStorageEngine' => 'PhabricatorFileStorageEngine', 3513 3508 'PhabricatorTestWorker' => 'PhabricatorWorker', 3514 3509 'PhabricatorTimeTestCase' => 'PhabricatorTestCase', 3515 - 'PhabricatorTimelineCursor' => 'PhabricatorTimelineDAO', 3516 - 'PhabricatorTimelineDAO' => 'PhabricatorLiskDAO', 3517 - 'PhabricatorTimelineEvent' => 'PhabricatorTimelineDAO', 3518 - 'PhabricatorTimelineEventData' => 'PhabricatorTimelineDAO', 3519 3510 'PhabricatorTimelineEventView' => 'AphrontView', 3520 3511 'PhabricatorTimelineExample' => 'PhabricatorUIExample', 3521 - 'PhabricatorTimelineIterator' => 'Iterator', 3522 3512 'PhabricatorTimelineView' => 'AphrontView', 3523 3513 'PhabricatorToken' => 3524 3514 array(
-4
src/applications/differential/editor/DifferentialCommentEditor.php
··· 613 613 'actor_phid' => $actor_phid, 614 614 ); 615 615 616 - // TODO: Get rid of this 617 - id(new PhabricatorTimelineEvent('difx', $event_data)) 618 - ->recordEvent(); 619 - 620 616 id(new PhabricatorFeedStoryPublisher()) 621 617 ->setStoryType('PhabricatorFeedStoryDifferential') 622 618 ->setStoryData($event_data)
-2
src/applications/differential/editor/DifferentialRevisionEditor.php
··· 414 414 : $this->getComments(), 415 415 'actor_phid' => $revision->getAuthorPHID(), 416 416 ); 417 - id(new PhabricatorTimelineEvent('difx', $event_data)) 418 - ->recordEvent(); 419 417 420 418 $mailed_phids = array(); 421 419 if (!$this->silentUpdate) {
-7
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
··· 307 307 $data->save(); 308 308 $commit->saveTransaction(); 309 309 310 - $event = new PhabricatorTimelineEvent( 311 - 'cmit', 312 - array( 313 - 'id' => $commit->getID(), 314 - )); 315 - $event->recordEvent(); 316 - 317 310 $this->insertTask($repository, $commit); 318 311 319 312 queryfx(
-100
src/infrastructure/daemon/timeline/cursor/PhabricatorTimelineIterator.php
··· 1 - <?php 2 - 3 - final class PhabricatorTimelineIterator implements Iterator { 4 - 5 - protected $cursorName; 6 - protected $eventTypes; 7 - 8 - protected $cursor; 9 - 10 - protected $index = -1; 11 - protected $events = array(); 12 - 13 - const LOAD_CHUNK_SIZE = 128; 14 - 15 - public function __construct($cursor_name, array $event_types) { 16 - $this->cursorName = $cursor_name; 17 - $this->eventTypes = $event_types; 18 - } 19 - 20 - protected function loadEvents() { 21 - if (!$this->cursor) { 22 - $this->cursor = id(new PhabricatorTimelineCursor())->loadOneWhere( 23 - 'name = %s', 24 - $this->cursorName); 25 - if (!$this->cursor) { 26 - $cursor = new PhabricatorTimelineCursor(); 27 - $cursor->setName($this->cursorName); 28 - $cursor->setPosition(0); 29 - $cursor->save(); 30 - 31 - $this->cursor = $cursor; 32 - } 33 - } 34 - 35 - $event = new PhabricatorTimelineEvent('NULL'); 36 - $event_data = new PhabricatorTimelineEventData(); 37 - $raw_data = queryfx_all( 38 - $event->establishConnection('r'), 39 - 'SELECT event.*, event_data.eventData eventData 40 - FROM %T event 41 - LEFT JOIN %T event_data ON event_data.id = event.dataID 42 - WHERE event.id > %d AND event.type in (%Ls) 43 - ORDER BY event.id ASC LIMIT %d', 44 - $event->getTableName(), 45 - $event_data->getTableName(), 46 - $this->cursor->getPosition(), 47 - $this->eventTypes, 48 - self::LOAD_CHUNK_SIZE); 49 - 50 - $events = $event->loadAllFromArray($raw_data); 51 - $events = mpull($events, null, 'getID'); 52 - $raw_data = ipull($raw_data, 'eventData', 'id'); 53 - foreach ($raw_data as $id => $data) { 54 - if ($data) { 55 - $decoded = json_decode($data, true); 56 - $events[$id]->setData($decoded); 57 - } 58 - } 59 - 60 - $this->events = $events; 61 - 62 - if ($this->events) { 63 - $this->events = array_values($this->events); 64 - $this->index = 0; 65 - } else { 66 - $this->cursor = null; 67 - } 68 - } 69 - 70 - public function current() { 71 - return $this->events[$this->index]; 72 - } 73 - 74 - public function key() { 75 - return $this->events[$this->index]->getID(); 76 - } 77 - 78 - public function next() { 79 - if ($this->valid()) { 80 - $this->cursor->setPosition($this->key()); 81 - $this->cursor->save(); 82 - } 83 - 84 - $this->index++; 85 - if (!$this->valid()) { 86 - $this->loadEvents(); 87 - } 88 - } 89 - 90 - public function valid() { 91 - return isset($this->events[$this->index]); 92 - } 93 - 94 - public function rewind() { 95 - if (!$this->valid()) { 96 - $this->loadEvents(); 97 - } 98 - } 99 - 100 - }
-26
src/infrastructure/daemon/timeline/storage/PhabricatorTimelineCursor.php
··· 1 - <?php 2 - 3 - final class PhabricatorTimelineCursor extends PhabricatorTimelineDAO { 4 - 5 - protected $name; 6 - protected $position; 7 - 8 - public function getIDKey() { 9 - return 'name'; 10 - } 11 - 12 - public function getConfiguration() { 13 - return array( 14 - self::CONFIG_IDS => self::IDS_MANUAL, 15 - self::CONFIG_TIMESTAMPS => false, 16 - ) + parent::getConfiguration(); 17 - } 18 - 19 - public function shouldInsertWhenSaved() { 20 - if ($this->position == 0) { 21 - return true; 22 - } 23 - return false; 24 - } 25 - 26 - }
-9
src/infrastructure/daemon/timeline/storage/PhabricatorTimelineDAO.php
··· 1 - <?php 2 - 3 - abstract class PhabricatorTimelineDAO extends PhabricatorLiskDAO { 4 - 5 - public function getApplicationName() { 6 - return 'timeline'; 7 - } 8 - 9 - }
-55
src/infrastructure/daemon/timeline/storage/PhabricatorTimelineEvent.php
··· 1 - <?php 2 - 3 - final class PhabricatorTimelineEvent extends PhabricatorTimelineDAO { 4 - 5 - protected $type; 6 - protected $dataID; 7 - 8 - private $data; 9 - 10 - public function __construct($type, $data = null) { 11 - parent::__construct(); 12 - 13 - if (strlen($type) !== 4) { 14 - throw new Exception("Event types must be exactly 4 characters long."); 15 - } 16 - 17 - $this->type = $type; 18 - $this->data = $data; 19 - } 20 - 21 - public function getConfiguration() { 22 - return array( 23 - self::CONFIG_TIMESTAMPS => false, 24 - ) + parent::getConfiguration(); 25 - } 26 - 27 - public function recordEvent() { 28 - if ($this->getID()) { 29 - throw new Exception("Event has already been recorded!"); 30 - } 31 - 32 - // Save the data first and point to it from the event to avoid a race 33 - // condition where we insert the event before the data and a consumer reads 34 - // it immediately. 35 - if ($this->data !== null) { 36 - $data = new PhabricatorTimelineEventData(); 37 - $data->setEventData($this->data); 38 - $data->save(); 39 - 40 - $this->setDataID($data->getID()); 41 - } 42 - 43 - $this->save(); 44 - } 45 - 46 - public function setData($data) { 47 - $this->data = $data; 48 - return $this; 49 - } 50 - 51 - public function getData() { 52 - return $this->data; 53 - } 54 - 55 - }
-16
src/infrastructure/daemon/timeline/storage/PhabricatorTimelineEventData.php
··· 1 - <?php 2 - 3 - final class PhabricatorTimelineEventData extends PhabricatorTimelineDAO { 4 - 5 - protected $eventData; 6 - 7 - public function getConfiguration() { 8 - return array( 9 - self::CONFIG_SERIALIZATION => array( 10 - 'eventData' => self::SERIALIZATION_JSON, 11 - ), 12 - self::CONFIG_TIMESTAMPS => false, 13 - ) + parent::getConfiguration(); 14 - } 15 - 16 - }
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1430 1430 'type' => 'php', 1431 1431 'name' => $this->getPatchPath('20130703.legalpaddocdenorm.php'), 1432 1432 ), 1433 + '20130709.droptimeline.sql' => array( 1434 + 'type' => 'sql', 1435 + 'name' => $this->getPatchPath('20130709.droptimeline.sql'), 1436 + ), 1433 1437 ); 1434 1438 } 1435 1439 }