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

at recaptime-dev/main 48 lines 1.0 kB view raw
1<?php 2 3$table = new PhabricatorAuditTransaction(); 4$conn = $table->establishConnection('w'); 5 6$status_map = array( 7 0 => 'none', 8 1 => 'needs-audit', 9 2 => 'concern-raised', 10 3 => 'partially-audited', 11 4 => 'audited', 12 5 => 'needs-verification', 13); 14 15$state_type = DiffusionCommitStateTransaction::TRANSACTIONTYPE; 16 17foreach (new LiskMigrationIterator($table) as $xaction) { 18 if ($xaction->getTransactionType() !== $state_type) { 19 continue; 20 } 21 22 $old_value = $xaction->getOldValue(); 23 $new_value = $xaction->getNewValue(); 24 25 $any_change = false; 26 27 if (isset($status_map[$old_value])) { 28 $old_value = $status_map[$old_value]; 29 $any_change = true; 30 } 31 32 if (isset($status_map[$new_value])) { 33 $new_value = $status_map[$new_value]; 34 $any_change = true; 35 } 36 37 if (!$any_change) { 38 continue; 39 } 40 41 queryfx( 42 $conn, 43 'UPDATE %T SET oldValue = %s, newValue = %s WHERE id = %d', 44 $table->getTableName(), 45 phutil_json_encode($old_value), 46 phutil_json_encode($new_value), 47 $xaction->getID()); 48}