Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92999910
20140106.macromailkey.2.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 25, 12:03
Size
519 B
Mime Type
text/x-php
Expires
Wed, Nov 27, 12:03 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22555151
Attached To
rPH Phabricator
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
"
;
Event Timeline
Log In to Comment