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

API for editing edge data

Summary: Add the ``PhabricatorEdgeDataEditor`` that allows you to edit the data attached to an edge and its inverse.

Test Plan: Create several edges and update the data attached. Once duplicating the data on both the edge and its inverse, and once setting different value for both.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1279

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

authored by

Juan Pablo Civile and committed by
epriestley
6115756e 5320d853

+4 -3
+4 -3
src/infrastructure/edges/editor/PhabricatorEdgeEditor.php
··· 33 33 /** 34 34 * Add a new edge (possibly also adding its inverse). Changes take effect when 35 35 * you call @{method:save}. If the edge already exists, it will not be 36 - * overwritten. Removals queued with @{method:removeEdge} are executed before 36 + * overwritten, but if data is attached to the edge it will be updated. 37 + * Removals queued with @{method:removeEdge} are executed before 37 38 * adds, so the effect of removing and adding the same edge is to overwrite 38 39 * any existing edge. 39 40 * ··· 280 281 foreach (array_chunk($sql, 256) as $chunk) { 281 282 queryfx( 282 283 $conn_w, 283 - 'INSERT IGNORE INTO %T (src, type, dst, dateCreated, seq, dataID) 284 - VALUES %Q', 284 + 'INSERT INTO %T (src, type, dst, dateCreated, seq, dataID) 285 + VALUES %Q ON DUPLICATE KEY UPDATE dataID = VALUES(dataID)', 285 286 PhabricatorEdgeConfig::TABLE_NAME_EDGE, 286 287 implode(', ', $chunk)); 287 288 }