Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97250647
081.filekeys.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:21
Size
523 B
Mime Type
text/x-php
Expires
Sun, Jan 5, 19:21 (2 d)
Engine
blob
Format
Raw Data
Handle
23364753
Attached To
rPH Phabricator
081.filekeys.php
View Options
<?php
echo
"Generating file keys...
\n
"
;
$table
=
new
PhabricatorFile
();
$table
->
openTransaction
();
$table
->
beginReadLocking
();
$files
=
$table
->
loadAllWhere
(
'secretKey IS NULL'
);
echo
count
(
$files
).
' files to generate keys for'
;
foreach
(
$files
as
$file
)
{
queryfx
(
$file
->
establishConnection
(
'w'
),
'UPDATE %T SET secretKey = %s WHERE id = %d'
,
$file
->
getTableName
(),
$file
->
generateSecretKey
(),
$file
->
getID
());
echo
'.'
;
}
$table
->
endReadLocking
();
$table
->
saveTransaction
();
echo
"
\n
Done.
\n
"
;
Event Timeline
Log In to Comment