Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F442678
20130801.pastexactions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
20130801.pastexactions.php
View Options
<?php
$table
=
new
PhabricatorPaste
();
$x_table
=
new
PhabricatorPasteTransaction
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
$conn_w
->
openTransaction
();
echo
pht
(
'Adding transactions for existing paste objects...'
).
"
\n
"
;
$rows
=
new
LiskRawMigrationIterator
(
$conn_w
,
'pastebin_paste'
);
foreach
(
$rows
as
$row
)
{
$id
=
$row
[
'id'
];
echo
pht
(
'Adding transactions for paste id %d...'
,
$id
).
"
\n
"
;
$xaction_phid
=
PhabricatorPHID
::
generateNewPHID
(
PhabricatorApplicationTransactionTransactionPHIDType
::
TYPECONST
);
queryfx
(
$conn_w
,
'INSERT INTO %T (phid, authorPHID, objectPHID, viewPolicy, editPolicy,
transactionType, oldValue, newValue,
contentSource, metadata, dateCreated, dateModified,
commentVersion)
VALUES (%s, %s, %s, %s, %s, %s, %ns, %ns, %s, %s, %d, %d, %d)'
,
$x_table
->
getTableName
(),
$xaction_phid
,
$row
[
'authorPHID'
],
$row
[
'phid'
],
'public'
,
$row
[
'authorPHID'
],
PhabricatorPasteTransaction
::
TYPE_CONTENT
,
'null'
,
$row
[
'filePHID'
],
PhabricatorContentSource
::
newForSource
(
PhabricatorContentSource
::
SOURCE_LEGACY
,
array
())->
serialize
(),
'[]'
,
$row
[
'dateCreated'
],
$row
[
'dateCreated'
],
0
);
}
$conn_w
->
saveTransaction
();
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, May 4, 9:21 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
64761
Default Alt Text
20130801.pastexactions.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment