Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122695544
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, Jul 21, 15:11
Size
519 B
Mime Type
text/x-php
Expires
Wed, Jul 23, 15:11 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27547369
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