@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 39 lines 736 B view raw
1<?php 2 3$pull = new PhabricatorRepositoryPullEvent(); 4$push = new PhabricatorRepositoryPushEvent(); 5 6$conn_w = $pull->establishConnection('w'); 7 8$log_types = array($pull, $push); 9foreach ($log_types as $log) { 10 foreach (new LiskMigrationIterator($log) as $row) { 11 $addr = $row->getRemoteAddress(); 12 13 $addr = (string)$addr; 14 if (!strlen($addr)) { 15 continue; 16 } 17 18 if (!ctype_digit($addr)) { 19 continue; 20 } 21 22 if (!(int)$addr) { 23 continue; 24 } 25 26 $ip = long2ip($addr); 27 if (!is_string($ip) || !strlen($ip)) { 28 continue; 29 } 30 31 $id = $row->getID(); 32 queryfx( 33 $conn_w, 34 'UPDATE %T SET remoteAddress = %s WHERE id = %d', 35 $log->getTableName(), 36 $ip, 37 $id); 38 } 39}