Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97248974
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
Fri, Jan 3, 19:05
Size
575 B
Mime Type
text/x-php
Expires
Sun, Jan 5, 19:05 (2 d)
Engine
blob
Format
Raw Data
Handle
23364357
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