Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106642359
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
Sat, Mar 29, 05:27
Size
519 B
Mime Type
text/x-php
Expires
Mon, Mar 31, 06:27 (2 d)
Engine
blob
Format
Raw Data
Handle
25235907
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