Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F116864544
20130507.releephrqmailkeypop.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, Jun 9, 18:42
Size
575 B
Mime Type
text/x-php
Expires
Wed, Jun 11, 18:42 (2 d)
Engine
blob
Format
Raw Data
Handle
26669684
Attached To
rPH Phabricator
20130507.releephrqmailkeypop.php
View Options
<?php
echo
"Populating Releeph requests with mail keys...
\n
"
;
$table
=
new
ReleephRequest
();
$table
->
openTransaction
();
// From ponder-mailkey-populate.php...
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$rq
)
{
$id
=
$rq
->
getID
();
echo
"RQ{$id}: "
;
if
(!
$rq
->
getMailKey
())
{
queryfx
(
$rq
->
establishConnection
(
'w'
),
'UPDATE %T SET mailKey = %s WHERE id = %d'
,
$rq
->
getTableName
(),
Filesystem
::
readRandomCharacters
(
20
),
$id
);
echo
(
"Generated Key
\n
"
);
}
else
{
echo
"-
\n
"
;
}
}
$table
->
saveTransaction
();
echo
"Done.
\n
"
;
Event Timeline
Log In to Comment