Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F80993635
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
Tue, Sep 3, 16:18
Size
598 B
Mime Type
text/x-php
Expires
Thu, Sep 5, 16:18 (2 d)
Engine
blob
Format
Raw Data
Handle
20492677
Attached To
rPH Phabricator
20130507.releephrqmailkeypop.php
View Options
<?php
echo
pht
(
'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
pht
(
'Generated Key'
).
"
\n
"
;
}
else
{
echo
"-
\n
"
;
}
}
$table
->
saveTransaction
();
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment