Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F467545
20140106.macromailkey.2.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
519 B
Referenced Files
None
Subscribers
None
20140106.macromailkey.2.php
View Options
<?php
echo
pht
(
'Adding mailkeys to macros.'
).
"
\n
"
;
$table
=
new
PhabricatorFileImageMacro
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
$iterator
=
new
LiskMigrationIterator
(
$table
);
foreach
(
$iterator
as
$macro
)
{
$id
=
$macro
->
getID
();
echo
pht
(
'Populating macro %d...'
,
$id
).
"
\n
"
;
if
(!
$macro
->
getMailKey
())
{
queryfx
(
$conn_w
,
'UPDATE %T SET mailKey = %s WHERE id = %d'
,
$table
->
getTableName
(),
Filesystem
::
readRandomCharacters
(
20
),
$id
);
}
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 6, 3:17 AM (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
75485
Default Alt Text
20140106.macromailkey.2.php (519 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment