Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93916936
20140815.cancdncase.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
Mon, Dec 2, 12:12
Size
658 B
Mime Type
text/x-php
Expires
Wed, Dec 4, 12:12 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
22724230
Attached To
rPH Phabricator
20140815.cancdncase.php
View Options
<?php
// This corrects files which incorrectly had a 'cancdn' property written;
// the property should be 'canCDN'.
$table
=
new
PhabricatorFile
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$file
)
{
$id
=
$file
->
getID
();
echo
pht
(
"Updating capitalization of %s property for file %d...
\n
"
,
'canCDN'
,
$id
);
$meta
=
$file
->
getMetadata
();
if
(
isset
(
$meta
[
'cancdn'
]))
{
$meta
[
'canCDN'
]
=
$meta
[
'cancdn'
];
unset
(
$meta
[
'cancdn'
]);
queryfx
(
$conn_w
,
'UPDATE %T SET metadata = %s WHERE id = %d'
,
$table
->
getTableName
(),
json_encode
(
$meta
),
$id
);
}
}
Event Timeline
Log In to Comment