@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<?php
2
3$table = new DifferentialRevision();
4$conn = $table->establishConnection('w');
5
6$drafts = $table->loadAllWhere(
7 'status = %s',
8 DifferentialRevisionStatus::DRAFT);
9foreach ($drafts as $draft) {
10 $properties = $draft->getProperties();
11
12 $properties[DifferentialRevision::PROPERTY_SHOULD_BROADCAST] = false;
13
14 queryfx(
15 $conn,
16 'UPDATE %T SET properties = %s WHERE id = %d',
17 id(new DifferentialRevision())->getTableName(),
18 phutil_json_encode($properties),
19 $draft->getID());
20}