Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93649837
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, Nov 30, 10:46
Size
519 B
Mime Type
text/x-php
Expires
Mon, Dec 2, 10:46 (2 d)
Engine
blob
Format
Raw Data
Handle
22683327
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