Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F959756
20210715.harborcommand.01.xactions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
864 B
Referenced Files
None
Subscribers
None
20210715.harborcommand.01.xactions.php
View Options
<?php
// See T13072. Turn the old "process a command" transaction into modular
// transactions that each handle one particular type of command.
$xactions_table
=
new
HarbormasterBuildTransaction
();
$xactions_conn
=
$xactions_table
->
establishConnection
(
'w'
);
$row_iterator
=
new
LiskRawMigrationIterator
(
$xactions_conn
,
$xactions_table
->
getTableName
());
$map
=
array
(
'"pause"'
=>
'message/pause'
,
'"abort"'
=>
'message/abort'
,
'"resume"'
=>
'message/resume'
,
'"restart"'
=>
'message/restart'
,
);
foreach
(
$row_iterator
as
$row
)
{
if
(
$row
[
'transactionType'
]
!==
'harbormaster:build:command'
)
{
continue
;
}
$raw_value
=
$row
[
'newValue'
];
if
(
isset
(
$map
[
$raw_value
]))
{
queryfx
(
$xactions_conn
,
'UPDATE %R SET transactionType = %s WHERE id = %d'
,
$xactions_table
,
$map
[
$raw_value
],
$row
[
'id'
]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 10:28 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224405
Default Alt Text
20210715.harborcommand.01.xactions.php (864 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment