Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93544783
20140113.legalpadsig.2.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, Nov 29, 15:01
Size
545 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 15:01 (2 d)
Engine
blob
Format
Raw Data
Handle
22663110
Attached To
rPH Phabricator
20140113.legalpadsig.2.php
View Options
<?php
echo
pht
(
'Adding secretkeys to legalpad document signatures.'
).
"
\n
"
;
$table
=
new
LegalpadDocumentSignature
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
$iterator
=
new
LiskMigrationIterator
(
$table
);
foreach
(
$iterator
as
$sig
)
{
$id
=
$sig
->
getID
();
echo
pht
(
'Populating signature %d...'
,
$id
).
"
\n
"
;
if
(!
$sig
->
getSecretKey
())
{
queryfx
(
$conn_w
,
'UPDATE %T SET secretKey = %s WHERE id = %d'
,
$table
->
getTableName
(),
Filesystem
::
readRandomCharacters
(
20
),
$id
);
}
}
echo
pht
(
'Done.'
).
"
\n
"
;
Event Timeline
Log In to Comment