Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102361706
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
Wed, Feb 19, 22:07
Size
598 B
Mime Type
text/x-php
Expires
Fri, Feb 21, 22:07 (2 d)
Engine
blob
Format
Raw Data
Handle
24272325
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