Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18794681
20140323.harbor.1.renames.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
830 B
Referenced Files
None
Subscribers
None
20140323.harbor.1.renames.php
View Options
<?php
$names
=
array
(
'CommandBuildStepImplementation'
,
'LeaseHostBuildStepImplementation'
,
'PublishFragmentBuildStepImplementation'
,
'SleepBuildStepImplementation'
,
'UploadArtifactBuildStepImplementation'
,
'WaitForPreviousBuildStepImplementation'
,
);
$tables
=
array
(
id
(
new
HarbormasterBuildStep
())->
getTableName
(),
id
(
new
HarbormasterBuildTarget
())->
getTableName
(),
);
echo
pht
(
'Renaming Harbormaster classes...'
).
"
\n
"
;
$conn_w
=
id
(
new
HarbormasterBuildStep
())->
establishConnection
(
'w'
);
foreach
(
$names
as
$name
)
{
$old
=
$name
;
$new
=
'Harbormaster'
.
$name
;
echo
pht
(
'Renaming %s -> %s...'
,
$old
,
$new
).
"
\n
"
;
foreach
(
$tables
as
$table
)
{
queryfx
(
$conn_w
,
'UPDATE %T SET className = %s WHERE className = %s'
,
$table
,
$new
,
$old
);
}
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Oct 19, 12:20 AM (22 h, 13 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8225324
Default Alt Text
20140323.harbor.1.renames.php (830 B)
Attached To
Mode
rP Phabricator
Attached
Detach File
Event Timeline
Log In to Comment