Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106100179
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
Sat, Mar 22, 10:07
Size
598 B
Mime Type
text/x-php
Expires
Mon, Mar 24, 10:07 (2 d)
Engine
blob
Format
Raw Data
Handle
25098793
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