Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101588452
20151223.proj.05.updatekeys.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
Tue, Feb 11, 20:16
Size
582 B
Mime Type
text/x-php
Expires
Thu, Feb 13, 20:16 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24193536
Attached To
rPH Phabricator
20151223.proj.05.updatekeys.php
View Options
<?php
$table
=
new
PhabricatorProject
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
foreach
(
new
LiskMigrationIterator
(
$table
)
as
$project
)
{
$path
=
$project
->
getProjectPath
();
$key
=
$project
->
getProjectPathKey
();
if
(
strlen
(
$path
)
&&
(
$key
!==
"
\0\0\0\0
"
))
{
continue
;
}
$path_key
=
PhabricatorHash
::
digestForIndex
(
$project
->
getPHID
());
$path_key
=
substr
(
$path_key
,
0
,
4
);
queryfx
(
$conn_w
,
'UPDATE %T SET projectPath = %s, projectPathKey = %s WHERE id = %d'
,
$project
->
getTableName
(),
$path_key
,
$path_key
,
$project
->
getID
());
}
Event Timeline
Log In to Comment