Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F973009
20170811.differential.03.modernxaction.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
850 B
Referenced Files
None
Subscribers
None
20170811.differential.03.modernxaction.php
View Options
<?php
$map
=
array
(
'0'
=>
'needs-review'
,
'1'
=>
'needs-revision'
,
'2'
=>
'accepted'
,
'3'
=>
'published'
,
'4'
=>
'abandoned'
,
'5'
=>
'changes-planned'
,
);
$table
=
new
DifferentialTransaction
();
$conn
=
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$xaction
)
{
$type
=
$xaction
->
getTransactionType
();
if
((
$type
!=
'differential:status'
)
&&
(
$type
!=
'differential.revision.status'
))
{
continue
;
}
$old
=
$xaction
->
getOldValue
();
$new
=
$xaction
->
getNewValue
();
$old
=
idx
(
$map
,
$old
,
$old
);
$new
=
idx
(
$map
,
$new
,
$new
);
queryfx
(
$conn
,
'UPDATE %T SET transactionType = %s, oldValue = %s, newValue = %s
WHERE id = %d'
,
$table
->
getTableName
(),
'differential.revision.status'
,
json_encode
(
$old
),
json_encode
(
$new
),
$xaction
->
getID
());
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Jun 18, 6:33 AM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227580
Default Alt Text
20170811.differential.03.modernxaction.php (850 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment